no mms are received

I noticed this with ModemManager as well as monitor-ofono test script, it seems MMS sent to me aren't noticed at all by my device.

Here is a log of mmsd -dn

$ dbus-launch /usr/libexec/mmsd -dn 2>&1 | tee -a ~/mmsd-debug.log
mmsd[9567]: MMS daemon version 0.0
mmsd[9567]: src/service.c:__mms_service_init()
mmsd[9567]: src/plugin.c:__mms_plugin_init()
mmsd[9567]: src/plugin.c:add_plugin() Plugin ofono loaded
mmsd[9567]: plugins/ofono.c:ofono_connect()
mmsd[9567]: src/service.c:mms_service_create() service 0xffff8875d920
mmsd[9567]: plugins/ofono.c:create_modem() path /gobi_0
mmsd[9567]: plugins/ofono.c:check_interfaces() path /gobi_0 sim 1
mmsd[9567]: plugins/ofono.c:check_interfaces() path /gobi_0 gprs 1
mmsd[9567]: plugins/ofono.c:check_interfaces() path /gobi_0 push 1
mmsd[9567]: plugins/ofono.c:create_agent() path /gobi_0
mmsd[9567]: plugins/ofono.c:register_agent() path /gobi_0
mmsd[9567]: plugins/ofono.c:check_sim_present() SIM present 1
mmsd[9567]: src/service.c:mms_service_set_identity() service 0xffff8875d920 identity 310260756209867
mmsd[9567]: src/service.c:mms_service_register() service 0xffff8875d920
mmsd[9567]: src/service.c:emit_service_added() service 0xffff8875d920
mmsd[9567]: src/service.c:mms_message_register() message registered /org/ofono/mms/310260756209867/B863495E36F070
mmsd[9567]: src/service.c:activate_bearer() service 0xffff8875d920
mmsd[9567]: plugins/ofono.c:check_gprs_attached() GPRS attached 1
mmsd[9567]: src/service.c:mms_service_set_bearer_handler() service 0xffff8875d920 handler 0xaaaab53b4000
mmsd[9567]: plugins/ofono.c:register_agent_reply() path /gobi_0

voice/sms do work for me just fine in either case. Do you think your patches to mmsd for TMO would help? I am using TMO.

Any other diagnostics you can think of to perform to debug?

Assigned to
2 years ago
2 years ago
mmsd user support

~unrznbl 2 years ago

I just realized I didn't have mobile data on. It would make sense to me that this would be required but I'm not sure how things interact. I quickly scanned your mmsd changes and saw some connection related changes so maybe that could help as well.

~unrznbl 2 years ago

I ensured that mobile data was working somewhat (I can ping but can't lynx duckduckgo.com, so somewhat there).

I think regardless of that I am getting some notice in ofonod when MMS are sent to me:

ofonod[2561]: drivers/qmimodem/sms.c:event_notify()
ofonod[2561]: drivers/qmimodem/sms.c:event_notify() ack_required 0 transaction id 3
ofonod[2561]: drivers/qmimodem/sms.c:event_notify() msg format 6 PDU length 155
ofonod[2561]: src/sms.c:ofono_sms_deliver_notify() len 155 tpdu len 155
ofonod[2561]: src/sms.c:handle_deliver()

So likely I'll check out your mmsd changes and see if any might help get notifications over to mmsd and processed.

~anteater 2 years ago*

I'm suspicious of using dbus-launch to run mmsd. You should start your user DBus session from your login scripts or display manager, otherwise MMSD will be in its own DBus session and isolated from other programs expecting to find it on the session bus.

I'm also curious what environment you're running on. The modem path /gobi_0 is not what I would expect for a PinePhone (which usually has /quectelqmi_0). Do ofonod logs list any other modem paths?

The handle_deliver and related messages from ofonod look correct.

~anteater referenced this from #55 2 years ago

~unrznbl 2 years ago

I am not using a display manager or login scripts as far as I am aware, just plain postmarketos with the shelli UI (which is essentially no UI).

I am testing on motorola harpia as well as lg hammerhead with postmarketos. /gobi_0 certainly works for other operations such as voice/sms. The log seems to indicate no problem having mmsd getting a connection via dbus with ofonod. I'm wondering if there is something special that mmsd needs to do to listen for these notifications. I'll look more tomorrow. Thanks!

~unrznbl 2 years ago

Looking at the output of dbus-monitor --system when I startup mmsd I see what looks good in terms of mmsd registering a PushNotification agent

method call time=1605068124.998781 sender=:1.68 -> destination=org.ofono serial=13 path=/gobi_0; interface=org.ofono.SimManager; member=GetProperties
method call time=1605068124.998841 sender=:1.68 -> destination=org.ofono serial=14 path=/gobi_0; interface=org.ofono.ConnectionManager; member=GetProperties
method call time=1605068124.999477 sender=:1.68 -> destination=org.ofono serial=15 path=/gobi_0; interface=org.ofono.PushNotification; member=RegisterAgent

But still when a push notification happens in ofonod -dn I don't see any activity in mmsd.

I'll try and debug this more in a couple of days.

Oddly, when I try the ofono test script test-push-notifications I get nothing when an MMS is sent

harpia:/usr/lib/ofono/test$ ./test-push-notification 
Agent registered

nothing when I send an MMS and see

ofonod[2578]: drivers/qmimodem/sms.c:event_notify() 
ofonod[2578]: drivers/qmimodem/sms.c:event_notify() ack_required 0 transaction id 6
ofonod[2578]: drivers/qmimodem/sms.c:event_notify() msg format 6 PDU length 155
ofonod[2578]: src/sms.c:ofono_sms_deliver_notify() len 155 tpdu len 155
ofonod[2578]: src/sms.c:handle_deliver() 

in ofonod -dn output.

I'll see if maybe there is some code/patch I am missing in ofono that I am using: https://gitlab.com/postmarketOS/pmaports/-/tree/master/temp/ofono

~unrznbl 2 years ago

Looking at ofono code it feels like maybe something isn't quite right. That notification seems like it is associated with an incoming MMS but isn't getting sent to the registered PushNotification agent. I'll dig around again soon.

~unrznbl 2 years ago

Thinking about this a bit more it seems like I should learn what is in the event message (PDU of length 155) and see why handle_deliver() doesn't cause a message to be delivered to mmsd/pushnotification. Seems like the PDU should contain a URL for the MMS but maybe the format is not understood by ofono for t-mobile?

~unrznbl 2 years ago

After taking some effort to reproduce the postmarketos build on-device I was able to gdb step through receiving an MMS and get what looked "right" in ofono/src/sms.c ofono_sms_deliver_notify(). An sms struct with some good looking bits in it like mms = 1, type = SMS_TYPE_DELIVER, a ud variable which had application/vnd.wap.mms-message and a phone number, TYPE=PLMN all of which I'm a bit familiar with from previous encoding/decoding of MMS messages. So now I can debug and maybe fix ofono for me with TMO. Am getting an ATT MVNO sim soon as well so can adjust for both if needed.

Register here or Log in to comment, or comment via email.