LiveGTech / gShell

Interactive graphical desktop environment for LiveG OS.
https://liveg.tech/os
Other
15 stars 3 forks source link

Test reception of WEA/cell broadcast alerts with modem #29

Closed James-Livesey closed 1 year ago

James-Livesey commented 1 year ago

With the UK Government planning to test the Emergency Alerts service at 3 PM on 23 April 2023, it will be a great opportunity for us to see if we can receive the planned cell broadcast. Here are the planned contents of it:

This is a test of Emergency Alerts, a new UK government service that will warn you if there’s a life-threatening emergency nearby.

In a real emergency, follow the instructions in the alert to keep yourself and others safe.

Visit gov.uk/alerts for more information.

This is a test. You do not need to take any action.

We can ensure that we receive all cell broadcasts by running the following command to accept all CB Message Identifiers:

sudo mmcli -G DEBUG
sudo mmcli -m 0 --command='AT+CSCB=0,"0-6000","0-15"'

To ensure a stable cell connection, we can run:

sudo mmcli -m 0 --signal-setup=10
sudo mmcli -m 0 --signal-get
sudo mmcli -m 0 --3gpp-ussd-initiate='*100#'

Ensure that a USSD response is received after running this (for example, for giffgaff, we can use *100# to reliably get the PAYG credit balance information). A response indicates that there is a working connection.

To check the logs for the cell broadcast and other information (such as USSD responses and incoming SMS messages), run:

sudo journalctl -u ModemManager.service

Tip: Press Shfit + G to jump to end of log output.

Interestingly, while the phone is asleep and it receives an SMS message, the modem will wake the main phone up using a GPIO wake line. We can observe when this is activated as the screen no longer sleeps and turns on. This indicates that the modem is always active during sleep, and so the cell broadcast should still be received.

James-Livesey commented 1 year ago

Test result:

According to the ModemManager logs, this is likely because the modem had become powered off at 14:12, which affects the modem's ability to receive cell broadcasts, but is not the result of receiving the cell broadcast. Hopefully we can re-test this on other planned test dates for minor tests in the future.

James-Livesey commented 1 year ago

Further inspection shows that the CB might have been received, but ModemManager restarted and debug logging was therefore turned off before the CB was received.