ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 110 forks source link

Add support for Cell Broadcast #141

Open YougoCodes opened 7 years ago

YougoCodes commented 7 years ago

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

Flohack74 commented 7 years ago

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.

matv1 commented 6 years ago

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

dobey commented 6 years ago

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

NeoTheThird commented 6 years ago

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

wayneoutthere commented 6 years ago

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.

Flohack74 commented 6 years ago

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

dobey commented 6 years ago

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.

wayneoutthere commented 6 years ago

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 :(

matv1 commented 6 years ago

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

dobey commented 6 years ago

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

KronK0321 commented 3 years ago

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.

wayneoutthere commented 3 years ago

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.

lduboeuf commented 2 years ago

@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 commented 2 years ago

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

KronK0321 commented 2 years ago

@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!

lduboeuf commented 2 years ago

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 commented 2 years ago

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

Flohack74 commented 2 years ago

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

lduboeuf commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 )

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 commented 1 year ago

@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.