Receiving MMS with AutoProcessSMSWAP=true not working on Librem 5
I am able to receive MMS on the Librem 5 after installing things as described here: Librem5/chatty#30 (comment 151962)
That was using a modified purple-mm-sms and with AutoProcessSMSWAP=false (the default setting).
Then I learned that it should be possible to use AutoProcessSMSWAP=true and then the modified purple-mm-sms should not be needed anymore. So I tried that, but it does not seem to work.
When an incoming MMS arrives, when I have AutoProcessSMSWAP=true and run mmsd with debug output, it shows approximately the following (I don't want to paste the whole thing here because it has so much details so I try to summarize the output a bit here):
mmsd[1489]: ModemManagerPlugin(): cb_sms_state_change: state received
mmsd[1489]: ModemManagerPlugin(): Received SMS WAP!
[...]
mmsd[1489]: src/store.c:mms_store() pathname /home/purism/.mms/modemmanager/6E50B75485A34D4B68A81FD4D71A2609FE3EA996
[...]
mmsd[1489]: Class: Personal
mmsd[1489]: Size: 293240 <-- this size looks good, similar to the size of the image file that the MMS contains
[...]
[header] Content-Length: 293408
[header] Content-Type: application/vnd.wap.mms-message
[header] Connection: close
[...]
bytes read 1373
[body] length 1373
bytes read 1553
[body] length 1553
bytes read 2047
[body] length 2047
bytes read 2047
[body] length 2047
bytes read 25
[body] length 25
[... many similar lines, presumably receiving the image file data in such chunks ...]
[...]
mmsd[1489]: src/service.c:web_get_cb() status: 200
mmsd[1489]: src/service.c:web_get_cb() data size = 293408
mmsd[1489]: src/service.c:web_get_cb() request->result_cb=0xaaaabe37f970 vs. retrieve_conf=0xaaaabe37f970/send_conf=0xaaaabe37db78/notify_resp=0xaaaabe37ffa0
mmsd[1489]: src/store.c:generate_uuid_from_pdu() pdu 0xffff86227000 len 293408
mmsd[1489]: src/store.c:mms_store_file() pathname /home/purism/.mms/modemmanager/D71B9138E4A3F72AA714B92028321BE4236D1CB5
[...]
[header] Content-Length: 0
[header] Content-Type: application/vnd.wap.mms-message
[header] Connection: close
[body] length 0
bytes read 0
mmsd[1489]: src/service.c:web_post_result_cb() Send </home/purism/.mms/send.0T1510.mms> complete
mmsd[1489]: src/service.c:web_get_cb() status: 200
mmsd[1489]: src/service.c:web_get_cb() data size = 0
mmsd[1489]: src/service.c:web_get_cb() request->result_cb=0xaaaabe37ffa0 vs. retrieve_conf=0xaaaabe37f970/send_conf=0xaaaabe37db78/notify_resp=0xaaaabe37ffa0
mmsd[1489]: src/service.c:mms_message_register() message registered /org/ofono/mms/modemmanager/D71B9138E4A3F72AA714B92028321BE4236D1CB5
mmsd[1489]: src/service.c:emit_message_added() message 0xaaaafcfa0c00
[...]
mmsd[1489]: src/service.c:append_message() appending pdu path /home/purism/.mms/modemmanager/D71B9138E4A3F72AA714B92028321BE4236D1CB5
mmsd[1489]: src/service.c:append_attachment_properties() content-id: <FOTE72D.jpg> <-- looks good, jpg file!
mmsd[1489]: src/service.c:process_request_queue() service 0xaaaafcf6fb30
mmsd[1489]: src/service.c:bearer_idle_timeout() service 0xaaaafcf6fb30
mmsd[1489]: src/service.c:deactivate_bearer() service 0xaaaafcf6fb30
mmsd[1489]: src/service.c:deactivate_bearer() service 0xaaaafcf6fb30
mmsd[1489]: ModemManagerPlugin(): Setting Context...
mmsd[1489]: src/service.c:mms_service_set_mmsc() service 0xaaaafcf6fb30 mmsc http://mmsc.tele2.se
mmsd[1489]: ModemManagerPlugin(): Max number of bearers: 1
mmsd[1489]: ModemManagerPlugin(): Current Context APN: 4g.tele2.se, mmsd settings MMS APN: 4g.tele2.se
mmsd[1489]: ModemManagerPlugin(): You are connected to the correct APN! Enabling context...
mmsd[1489]: ModemManagerPlugin(): At Bearer Handler: path /org/freedesktop/ModemManager1/Modem/0 active 0 context_active 1
mmsd[1489]: ModemManagerPlugin(): checking for failure
mmsd[1489]: ModemManagerPlugin(): No failures
mmsd[1489]: src/service.c:mms_service_bearer_notify() service=0xaaaafcf6fb30 active=0 iface=wwan0 proxy=130.244.202.30:8080
So lots of things happen and it looks to me like the image file data was actually received, which is promising. However, there is nothing created in the ~/mms directory and chatty does not show anything was received.
There are some files created in the /home/purism/.mms/modemmanager
directory:
purism@pureos:~$ ls -lrt /home/purism/.mms/modemmanager
total 592
-rw-r--r-- 1 purism purism 157 Apr 12 22:48 ModemManagerSettings
-rw------- 1 purism purism 294219 Apr 12 22:48 9C56493A0D2A29D97A6BEA495045166B058F3827
-rw-r--r-- 1 purism purism 63 Apr 12 22:48 9C56493A0D2A29D97A6BEA495045166B058F3827.status
-rw------- 1 purism purism 293408 Apr 12 22:49 D71B9138E4A3F72AA714B92028321BE4236D1CB5
-rw-r--r-- 1 purism purism 63 Apr 12 22:49 D71B9138E4A3F72AA714B92028321BE4236D1CB5.status
-rw-r--r-- 1 purism purism 67 Apr 12 22:50 mms
Note that one of those files has filesize 293408 which is the same as the "Content-Length: 293408" shown in the mmsd debug output. So I guess those files in the /home/purism/.mms/modemmanager
directory contain some halfway-processed received MMS data, that was not completely processed for some reason.
The D71B9138E4A3F72AA714B92028321BE4236D1CB5.status file contains the following:
purism@pureos:~$ cat .mms/modemmanager/D71B9138E4A3F72AA714B92028321BE4236D1CB5.status
[info]
read=false
state=received
date=2021-04-12T22:49:53+0000
How to troubleshoot further?
What could be causing it to stop processing the MMS before anything was created in the ~/mms directory?
Should I add some extra debug output to see in more detail what happens? In that case, are there some particular functions where it would be relevant to add debug output?