(01-03-2021, 01:44 PM)kent Wrote:(01-03-2021, 07:57 AM)kop316 Wrote:I don't have a matrix account ... but I'll look into it. Any help is appreciated, but mostly I'm logging progress here in case something I'm coming across is useful (and I'm enough of a noob I can't quite tell the difference yet). I don't expect you to stop what you are working on to solve everything.(01-02-2021, 09:40 PM)kent Wrote: Getting closer ... but not quite there. Chatty now creates a conversation with a message indicating a MMS notification has arrived via sms which Chatty is working to download and parse.
Based on the mmsd output, it looks like the request never actually goes out though.
Code:mmsd[6172]: src/service.c:mms_service_push_notify() did decode message
mmsd[6172]: src/service.c:mms_service_push_notify() is type NI?
mmsd[6172]: src/service.c:mms_service_push_notify() type is NI
mmsd[6172]: MMS transaction id: A20103012201500004000000000
mmsd[6172]: MMS version: 1.0
mmsd[6172]: From: +15555555555/TYPE=PLMN
mmsd[6172]: Subject:
mmsd[6172]: Class: Personal
mmsd[6172]: Size: 32768
mmsd[6172]: Expiry: 2021-01-06T01:22:04+0000
mmsd[6172]: Location: http://166.216.198.5:8004/Y/0103012201500004000000000
mmsd[6172]: src/service.c:mms_service_push_notify() about to store_meta_open 2
mmsd[6172]: src/service.c:mms_service_push_notify() did store_meta_open 2
mmsd[6172]: src/service.c:mms_service_push_notify() did create_request
mmsd[6172]: src/service.c:activate_bearer() service 0xaaab0c023bf0 setup 0 active 1
mmsd[6172]: src/service.c:process_request_queue() service 0xaaab0c023bf0
mmsd[6172]: src/service.c:process_request_queue() location http://166.216.198.5:8004/Y/0103012201500004000000000
request http://166.216.198.5:8004/Y/0103012201500004000000000
address proxy.mobile.att.net
port 80
host 166.216.198.5:8004
flags 0
request http://166.216.198.5:8004/Y/0103012201500004000000000
mmsd[6172]: Cannot process request (request type: 0)
The problem tracks back to the do_request() function call in gweb.c. There is a getaddrinfo() command failing with a "Name or service not known" error code trying to resolve the proxy host information, but I can't figure out exactly why (~line#1320) . I verified the values being passed for the name and port inputs look correct, and verified "proxy.mobile.att.net" host resolves fine with a manual ns lookup.
I'm stumped for the moment.
If you have a matrix account, I generally hang out on the mobian and pmOS channels. Perhaps me helping you live would be easier?
I figured out what's going on. There is an addr_info() flag requiring a numeric ip address, which disables DNS lookup. The easiest solution is to just comment out that flag so addr_info() resolves a text domain name. This seems to work, but I'm not sure if that will break something else. So I've put in a hack at that level to do a dns lookup and replace if the session->address is not a valid numeric ip address.
This hack probably isn't a great final solution for production though.
Also, turns out it is possible to make a bloody mess of the mmsd request queue. There probably needs to be logic that eventually removes queue entries that can't be resolved (e.g. 404 Message not found in database).
Sounds good! Don't worry about being a "noob", we all were there once (heck, that's how I felt about this whole thing before digging into it). I appreicate you digging in and looking at the code to figure it out!
I think the next logical place to work on is actually mmsd, and work on a more complete integration with it and modem manager (and possibly clean up the code too). So far, since I was able to send/recieve MMS, I have largely treated it as a black box (and I have made a huge mess of the request queue too). But purple-mm-sms is in good enough shape that it needs work to integrate into chatty, and I am waiting on Purism to look at the MR I sent to them.
So are you able to recieve MMS now then?