Comment by ~unrznbl on ~anteater/mms-stack-bugs
Sure. That makes sense. I'll read through the other tickets and try to make some progress there.
Comment by ~unrznbl on ~anteater/mms-stack-bugs
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 hadapplication/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.
Comment by ~unrznbl on ~anteater/mms-stack-bugs
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?
Comment by ~unrznbl on ~anteater/mms-stack-bugs
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.
Comment by ~unrznbl on ~anteater/mms-stack-bugs
Looking at the output of
dbus-monitor --system
when I startup mmsd I see what looks good in terms of mmsd registering a PushNotification agentmethod 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
Comment by ~unrznbl on ~anteater/mms-stack-bugs
So far when I use mmsd/test/send-message script I get nothing in mmsd -dn output and this in monitor-mms output
{Service} [/org/ofono/mms/310260756209867/FC3B83C18BCC01FCA8E42730DE18005D396C6392] MessageAdded dbus.Dictionary({dbus.String('Status'): dbus.String('draft', variant_level=1), dbus.String('Date'): dbus.String('1970-01-01T00:00:00+0000', variant_level=1), dbus.String('Recipients'): dbus.Array([dbus.String('+12223334444'), dbus.String('+15556667777')], signature=dbus.Signature('s'), variant_level=1), dbus.String('Attachments'): dbus.Array([dbus.Struct((dbus.String('SMIL'), dbus.String('Content-Type: "application/smil";charset=utf-8'), dbus.String('/home/user/.mms/310260756209867/FC3B83C18BCC01FCA8E42730DE18005D396C6392'), dbus.UInt64(161), dbus.UInt64(302)), signature=None), dbus.Struct((dbus.String('cid-1'), dbus.String('Content-Type: "text/plain";charset=utf-8'), dbus.String('/home/user/.mms/310260756209867/FC3B83C18BCC01FCA8E42730DE18005D396C6392'), dbus.UInt64(479), dbus.UInt64(18)), signature=None), dbus.Struct((dbus.String('cid-2'), dbus.String('Content-Type: "image/jpeg"'), dbus.String('/home/user/.mms/310260756209867/FC3B83C18BCC01FCA8E42730DE18005D396C6392'), dbus.UInt64(512), dbus.UInt64(7671)), signature=None)], signature=dbus.Signature('(ssstt)'), variant_level=1)}, signature=dbus.Signature('sv'))
I will check on the flow of code around sending and receiving and look at your patch for TMO.
Comment by ~unrznbl on ~anteater/mms-stack-bugs
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!
Comment by ~unrznbl on ~anteater/mms-stack-bugs
Yes. I will test with my mmsd as well as your branch tomorrow and will include logs.
Ticket created by ~unrznbl on ~anteater/mms-stack-bugs
When I use the test scripts in mmsd I can create a draft message that is returned with get-messages test script but they are always in draft and not actually sent. I have mobile data setup and the proper APN in ofono as far as I can tell.
[ /org/ofono/mms/xxxx/99B25DF5E30632528B281F80B07796A680E3DDDE ] Status = draft Date = 1970-01-01T00:00:00+0000 Recipients = dbus.Array([dbus.String('+nnn'), dbus.String('+nnn')], signature=dbus.Signature('s'), variant_level=1) Attachments = dbus.Array([dbus.Struct((dbus.String('SMIL'), dbus.String('Content-Type: "application/smil";charset=utf-8'), dbus.String('/home/user/.mms/xxxx/99B25DF5E30632528B281F80B07796A680E3DDDE'), dbus.UInt64(161), dbus.UInt64(302)), signature=None), dbus.Struct((dbus.String('cid-1'), dbus.String('Content-Type: "text/plain";charset=utf-8'), dbus.String('/home/user/.mms/xxxx/99B25DF5E30632528B281F80B07796A680E3DDDE'), dbus.UInt64(479), dbus.UInt64(18)), signature=None), dbus.Struct((dbus.String('cid-2'), dbus.String('Content-Type: "image/jpeg"'), dbus.String('/home/user/.mms/xxxx/99B25DF5E30632528B281F80B07796A680E3DDDE'), dbus.UInt64(512), dbus.UInt64(7671)), signature=None)], signature=dbus.Signature('(ssstt)'), variant_level=1)
I'll try again when I can and attach any logs from ofonod/mmsd/monitor-mms.
Also will try your branch of mmsd.
Comment by ~unrznbl on ~anteater/mms-stack-bugs
I ensured that mobile data was working somewhat (I can ping 8.8.8.8 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.