ubuntu-touch icon indicating copy to clipboard operation
ubuntu-touch copied to clipboard

Add support for Cell Broadcast

Open YougoCodes opened this issue 7 years ago • 22 comments

Please add support for Cell Broadcast, so UT devices can receive, sound and display emergency alert messages (and other kinds) when enabled and configured by the user. https://en.wikipedia.org/wiki/Cell_Broadcast

YougoCodes avatar Jul 03 '17 13:07 YougoCodes

We need to find out if this is supported by Ofono. Basically this looks promising: https://github.com/intgr/ofono/blob/master/doc/cell-broadcast-api.txt Seems to be just another DBus message that needs to be accepted by the messaging-app.

Flohack74 avatar Jul 03 '17 13:07 Flohack74

And the Messaging-app Settings page needs a toggle to opt in or out of these messages

matv1 avatar Dec 05 '17 11:12 matv1

I don't think this should be part of messaging app.

dobey avatar Mar 03 '18 20:03 dobey

I agree, this is is a setting you usually find in the system settings under phone or carrier.

NeoTheThird avatar Mar 04 '18 11:03 NeoTheThird

wow. we need this definitely and soon. I was surprised to learn today that UT devices can receive but not display emergency messages! any help on this one is greatly appreciated.

wayneoutthere avatar Oct 03 '18 18:10 wayneoutthere

Its hard to test as in my country no provider uses that... and even if, those messages arrive rarely.

Flohack74 avatar Oct 03 '18 20:10 Flohack74

I don't get them often here in the US either. But it's easy enough to test if we implement the handling of the ofono interface correctly. There's probably also a script or something in ofono to simulate such messages, for testing at that level as well.

dobey avatar Oct 03 '18 20:10 dobey

surely some entity would have the means of help us test this if it would improve safety and save lives? I like to think there is a way to test this. In our city here we have a company that handles emergency calls and radio dispatching to police/fire. They are called 'ECOMM" I believe. I will contact them and see if they have a means of running a test like this even if it was a meaningless digit.. But yeah - I could see how this is really hard to test :(

wayneoutthere avatar Oct 04 '18 15:10 wayneoutthere

In the netherlands they send out occasional test messages but not that often. Next one december 3, 2018 at midday.

matv1 avatar Oct 04 '18 19:10 matv1

It's not that hard to test. ofono has a script for testing CBS right in the tree. Relax @wayneoutthere

dobey avatar Oct 04 '18 20:10 dobey

Canada had a test of our public alert system today and I noticed my UT device did not alert. A google search led me to this open issue.

Is this a case of waiting for an upstream project or are there actual testing roadblocks involved?

I ask because I have access to a test environment that is able to issue and receive cell broadcasts. I'm not a developer but would be willing to load dev builds and conduct tests.

KronK0321 avatar Nov 25 '20 20:11 KronK0321

I also can confirm that I did not get the emergency alert.  Vancouver / Canada

On 2020-11-25 12:29 p.m., jordan wrote:

Canada had a test of our public alert system today and I noticed my UT device did not alert. A google search led me to this open issue.

Is this a case of waiting for an upstream project or are there actual testing roadblocks involved?

I ask because I have access to a test environment that is able to issue and receive cell broadcasts. I'm not a developer but would be willing to load dev builds and conduct tests.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ubports/ubuntu-touch/issues/141#issuecomment-733932068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6POKXT5WLZ6SBKOGRG45LSRVSMHANCNFSM4DRRBTWQ.

wayneoutthere avatar Nov 26 '20 15:11 wayneoutthere

@KronK0321 hello, are you still around and still have access to the test environment ?. I'm giving a try to do the UI part ( nothing done yet, but we are pleased to know that the low level stuffs are already there [edit]: not tested )

lduboeuf avatar Jun 06 '22 20:06 lduboeuf

@KronK0321 and if you are confortable with command line. We can check if your device actually receive a notification

lduboeuf avatar Jun 06 '22 21:06 lduboeuf

@lduboeuf Yes, I still have access to a test environment and am comfortable with CLI.

I would need full instructions on what you wanted done but I'm happy to do it!

KronK0321 avatar Jun 08 '22 14:06 KronK0321

So first we need to make sure we can receive CellBroadcast and help me understand some points: First access to your device ( with adb or ssh ). In /usr/share/ofono/scripts run ./test-cbs , you can already check if the service is enabled by choosing "Get cbs properties", the "Powered" property should be set to "true". If not choose "Activate cbs".

then if you are able to test some broadcast messages, listen to broadcast events on the device: sudo dbus-monitor --system "type='signal',interface='org.ofono.CellBroadcast'"

And please paste somewhere the results if any. If its possible for you to test different kind of alert messages, would be great

lduboeuf avatar Jun 08 '22 14:06 lduboeuf

@KronK0321 if you are on Telegram, my handle is the same as the github's one

lduboeuf avatar Jun 08 '22 14:06 lduboeuf

We basically need the topic/channel IDs for all of those: grafik

Flohack74 avatar Jun 08 '22 22:06 Flohack74

List of ETWS/CMAS constants Android: https://github.com/aosp-mirror/platform_frameworks_base/blob/c5d02da0f6553a00da6b0d833b67d3bbe87341e0/telephony/java/com/android/internal/telephony/gsm/SmsCbConstants.java

Ofono seems no using the recent CMAS specification, even upstream. But i start to understand the logic.

lduboeuf avatar Jun 09 '22 07:06 lduboeuf

@KronK0321 hello, after some local tests, it appear that our stack does not receive broadcast event others than the ones defined in ETWS Alert system (only for japan iirc). So don't waste your time ^^, we will need further investigations

lduboeuf avatar Jun 22 '22 13:06 lduboeuf

@KronK0321 We finally fixes some issues, and the first basic step is ready for testing ( UI will still need some tweaks, but cell broadcast notifications should be displayed briefly and limited in height just like current notifications, we can retrieve them in messaging-app).

Here is the procedure: ( you have to be in devel channel )

  • sudo ubports-qa install PR_ofono_34 if you are with a legacy device or < Halium 9, otherwise if >=Halium 9 and not pinephone sudo ubports-qa install xenial_-_android9_-_cbschannelsmax
  • sudo ubports-qa install PR_telepathy-ofono_29
  • sudo ubports-qa install PR_telephony-service_60

Then reboot

Subscribe to all cell broadcast channels: dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.CellBroadcast.SetProperty string:'Topics' variant:string:'0-9999' You can check if all is setup correctly with: dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.CellBroadcast.GetProperties

(Note that /ril_0 may be not the correct modem on your device. You can check for available modems with /usr/share/ofono/list-modems

Now you are ready to receive any notifications from the Cell. If nothing happen with you test, please check if you see something with cat /home/phablet/.cache/upstart/dbus.log | grep onCellBroadcastIncomingMessage or anything usefull in syslog by looking for ofono

lduboeuf avatar Jul 04 '22 12:07 lduboeuf

@KronK0321 hello, we are still looking for someone who can reproduce the Cell Broadcast . Are you still OK to test CB ? It appears that only 20.04 devices have the correct patches to handle them. Please ping me if you can, i will tell you the procedure.

lduboeuf avatar Jan 02 '23 10:01 lduboeuf