Beta support: MMS on chatty/mmsd on Modem Manager - help/testing wanted!
#41
Quick update. Think I've figured it out. The fix ends up requiring adding a line of code and commenting out another.

There were 2 issues.

1. The host name / ip address issue in gweb->do_request() I've already touched on. On that, I'm now 99% sure there will be no negative impacts from just commenting out the AI_NUMERICHOST flag and allowing the existing code to resolve the proxy host name. The explicit proxy host -> ip address conversion block is commented out and available if I'm wrong about that. It looks like this might come up again on sending messages, but I'm not there yet.

2. Requests to AT&T need to explicitly tell AT&T's servers to close connections. As a result, I was seeing absurdly long time-outs for every request. Fortunately mmsd has a parameter for that and the functionality is already there. I've added a line in service.c->mms_service_bearer_notify() to set the parameter. I am not sure if this will impact other carriers negatively.

Those two little tweaks has mmsd working quite well across AT&T's proxy now. If anyone wants to try out these changes on different carriers, I'd love to know if they break anything for anyone else.

My working repo is: https://source.puri.sm/Kent/mmsd
  Reply
#42
(01-08-2021, 12:10 PM)kent Wrote: Quick update. Think I've figured it out. The fix ends up requiring adding a line of code and commenting out another.

There were 2 issues.

1. The host name / ip address issue in gweb->do_request() I've already touched on. On that, I'm now 99% sure there will be no negative impacts from just commenting out the AI_NUMERICHOST flag and allowing the existing code to resolve the proxy host name. The explicit proxy host -> ip address conversion block is commented out and available if I'm wrong about that. It looks like this might come up again on sending messages, but I'm not there yet.

2. Requests to AT&T need to explicitly tell AT&T's servers to close connections. As a result, I was seeing absurdly long time-outs for every request. Fortunately mmsd has a parameter for that and the functionality is already there. I've added a line in service.c->mms_service_bearer_notify() to set the parameter. I am not sure if this will impact other carriers negatively.

Those two little tweaks has mmsd working quite well across AT&T's proxy now. If anyone wants to try out these changes on different carriers, I'd love to know if they break anything for anyone else.

My working repo is: https://source.puri.sm/Kent/mmsd

That's great!

If you could, could you do a MR with my repo so I can test the changes on T-Mobile? I don't expect that to affect T-mobile (since they don't use a proxy). You may want to also test it against my modem manager plugin as well (this is a lot more stable with Modem Manager):

https://source.puri.sm/kop316/mmsd/-/tree/ModemManager

EDIT: Or if I am understanding you right, I just need to add these two lines here:

https://source.puri.sm/Kent/mmsd/-/blob/...ce.c#L2531

and comment out this line:

https://source.puri.sm/Kent/mmsd/-/blob/...eb.c#L1336

And it is done to support AT&T right? If so, I will add it to the modem manager plugin.


Hey All,

I think I have a "0.1" release of the modem manager plugin! It is located here:

https://source.puri.sm/kop316/mmsd/-/tree/ModemManager

EDIT: Ok I got a bit excited, I now added a few things to ensure that you can understand the API and make sure the plugin is resiliant. Also as soon as I confirm the AT&T fixes, those will be added.
  Reply
#43
Thought I would try and give this a test drive before clearing my phone and reinstalling tomorrow.
I have been using the instructions for mmsd in the readme/install file from here https://source.puri.sm/kop316/mmsd/-/tree/ModemManager
However I cannot seem to follow them correctly as ./configure is not available?
I have not compiled many programs in the past so I am easily lost trying to follow the instructions.
  Reply
#44
(01-08-2021, 09:35 PM)antiX-Dave Wrote: Thought I would try and give this a test drive before clearing my phone and reinstalling tomorrow.
I have been using the instructions  for mmsd in the readme/install file from here https://source.puri.sm/kop316/mmsd/-/tree/ModemManager
However I cannot seem to follow them correctly as ./configure is not available?
I have not compiled many programs in the past so I am easily lost trying to follow the instructions.


Hello:

Use these instruction's:

Testing out this Program ===========================
To configure, run: ./bootstrap-configure --enable-debug --enable-maintainer-mode

Make it: make

Run daemon in foreground with debugging: ./src/mmsd -n -d 'src/*'
  Reply
#45
Kent,

I added your changes to make mmsd work with AT&T. I can confirm it does not interfere with T-Mobile!

https://source.puri.sm/kop316/mmsd/-/com...9d3bd3cb95

I think these were all the changes, please let me know if I was wrong.

UPDATE: if you are using mmsd with the modem manager plugin, please update. I fixed an annoying issue finally with it.
UPDATE: Mr. Stephen Hinton confirmed that this stack works with H2O wireless! Thank you! So we know Kent's contributions worked.
  Reply
#46
Thanks,
Looks like it is compiled and able to run. However when trying to run chatty via
G_MESSAGES_DEBUG=all chatty --debug --verbose
I receive a segmentation fault
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.681: got mmsd Manager
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.687: got service
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.687: Listening for new messages
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.688: Connected to mmsd ModemManager Plugin
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.745: pur_mmsd_get_all_mms_cb
Segmentation fault

Nothing is returned / printed via the mmsd -n output.

Opps, had a typo with the apn configuration.

Now with the programs working mms fails to download.
I suspect this is because the download is being attempted directly without the mms proxy as there is a 404 error. It does appear to be using the correct ip / wwan0 connection.

APN settings:
[Modem Manager]
CarrierMMSC=http://aliasredirect.net/proxy/mmsc
MMS_APN=sp.telus.com
CarrierMMSProxy=74.49.0.18:80

Manually downloading using
curl --interface wwan0 --proxy 74.49.0.18:80 Download_URL_from_sms_in_mmsd_output -o test.mms;
recoverjpeg -b1 test.mms -o ./ -f test.jpg;
retrieved the test picture.
  Reply
#47
(01-10-2021, 10:37 AM)antiX-Dave Wrote: Thanks,
Looks like it is compiled and able to run. However when trying to run chatty via
G_MESSAGES_DEBUG=all chatty --debug --verbose
I receive a segmentation fault
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.681: got mmsd Manager
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.687: got service
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.687: Listening for new messages
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.688: Connected to mmsd ModemManager Plugin
(sm.puri.Chatty:1239): mm-sms-DEBUG: 11:34:57.745: pur_mmsd_get_all_mms_cb
Segmentation fault

Nothing is returned / printed via the mmsd -n output.

Opps, had a typo with the apn configuration.

Now with the programs working mms fails to download.
I suspect this is because the download is being attempted directly without the mms proxy as there is a 404 error. It does appear to be using the correct ip / wwan0 connection.

APN settings:
[Modem Manager]
CarrierMMSC=http://aliasredirect.net/proxy/mmsc
MMS_APN=sp.telus.com
CarrierMMSProxy=74.49.0.18:80

Manually downloading using
curl --interface wwan0 --proxy 74.49.0.18:80 Download_URL_from_sms_in_mmsd_output -o test.mms;
recoverjpeg -b1 test.mms -o ./ -f test.jpg;
retrieved the test picture.

I just fixed the segfault issue, that was in purple-mm-sms. There are still some sync issues in purple-mm-sms that I need to fix though, so if weird things happen, load mmsd then load chatty. EDIT: I fixed that issue, you can load chatty and mmsd in any order now.

Without seeing the mmsd debug output, I couldn't tell you what the issue is unfortunately. Kent was the one who figured out how to navigate the mmsproxy, T-Mobile doesn't have it. His repo is here, and it may provide clues as to how to solve this: https://source.puri.sm/Kent/mmsd

I know what I have works if the mmsproxy is a domain name vs. an ip address (It was tested on H2O), so it may have to do with the mmsproxy being a raw ip address? See what happens if you uncomment this line:

https://source.puri.sm/kop316/mmsd/-/blo...eb.c#L1313

Kent, do you have any ideas?
  Reply
#48
Since mmsd has a smarter plugin, I had to polish up purple-mm-sms to better sync with mmsd (and the modem manager plugin). I did just that, so the two should sync better (and the segfault issue has gone away).
  Reply
#49
OK I will pull the latest version and remake them.

"I know what I have works if the mmsproxy is a domain name vs. an ip address (It was tested on H2O), so it may have to do with the mmsproxy being a raw ip address? See what happens if you uncomment this line:"

Interesting. Perhaps I will try and make a random name mapped in the hosts file to use a domain name instead of the ip. Like:
/etc/hosts
mmsproxy 74.49.0.18

then in mmsd config
[Modem Manager]
CarrierMMSC=http://aliasredirect.net/proxy/mmsc
MMS_APN=sp.telus.com
CarrierMMSProxy=mmsproxy:80

Thoughts? Does it even look at the hosts file for dns resolution?
  Reply
#50
(01-10-2021, 06:07 PM)antiX-Dave Wrote: OK I will pull the latest version and remake them.

"I know what I have works if the mmsproxy is a domain name vs. an ip address (It was tested on H2O), so it may have to do with the mmsproxy being a raw ip address? See what happens if you uncomment this line:"

Interesting. Perhaps I  will try and make a random name mapped in the hosts file to use a domain name instead of the ip.  Like:
/etc/hosts
mmsproxy  74.49.0.18

then in mmsd config
[Modem Manager]
CarrierMMSC=http://aliasredirect.net/proxy/mmsc
MMS_APN=sp.telus.com
CarrierMMSProxy=mmsproxy:80

Thoughts? Does it even look at the hosts file for dns resolution?

This doesn't look at the hosts file, so that won't work. Did you try uncommenting that one line to see if it worked?

I unfortunately have not looked at this part a lot, kent knows it far better than me. He also comments on what he found in this thread, so I am hoping that helps....
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 2,333 10-18-2023, 08:37 AM
Last Post: luppivega
  A/B testing or Unit testing gulshan212 0 902 08-29-2023, 03:36 AM
Last Post: gulshan212
  Article: NuttX RTOS for PinePhone: 4G LTE Modem lupyuen 2 1,534 04-10-2023, 10:19 PM
Last Post: lupyuen
  changing from bullseye to bookworm to install mmsd-tng jyoung 8 2,875 04-09-2023, 06:08 PM
Last Post: zetabeta
Sad Modem is always visible/connected but stops working after a while dante404 6 3,052 11-08-2022, 09:12 AM
Last Post: dante404
  Downsides of the open-source modem firmware? alpineduck 4 2,571 10-25-2022, 05:28 PM
Last Post: Zebulon Walton
  Pinephone: OpenGL support? orbital 2 2,183 08-25-2022, 04:09 PM
Last Post: vortex
  Latest firmware for PinePhone modem! Subsentient 104 128,052 07-20-2022, 05:32 AM
Last Post: zetabeta
  Which PP OS currently has the best podcast support? kujo_marble 3 2,019 07-14-2022, 07:09 AM
Last Post: tophneal
  Help wanted: location of calls and chatty data files dukla2000 3 4,619 06-13-2022, 02:01 PM
Last Post: israel

Forum Jump:


Users browsing this thread: 1 Guest(s)