Beta support: MMS on chatty/mmsd on Modem Manager - help/testing wanted!
(01-28-2021, 05:16 PM)kop316 Wrote: So good news! I think I have the Telus issue resolved. Thank you Futurebucket for your help resolving it.


Np, Thanks for your work on MMSD!

For reference I've tested
  • Group chats texts
  • Group chats Pictures
  • Group chats Lots of pictures and text
  • 1:1 pictures
  • 1:1 lots of pictures and text.


If anyone wants to play around, the below python3 code should get you most of the way there. IIRC, all you need to change is "/org/freedesktop/ModemManager1/SMS/40" to be the sms ID. Run the listen script first to get the reply then run the send script.

to "receive" an MMS you take the "data" part of the SMS off modem manager and you forward that to mmds over the dbus.

It'll reply on a different interface with an mms file and the information you need to extract it.


Send SMS data to MMSD
Code:
#!/usr/bin/python3
import dbus

bus = dbus.SystemBus()

modem = bus.get_object('org.freedesktop.ModemManager1', '/org/freedesktop/ModemManager1/SMS/40')
bus_iface = dbus.Interface(modem, dbus_interface='org.freedesktop.DBus.Properties')

props = bus_iface.GetAll("org.freedesktop.ModemManager1.Sms")



array_de_bytes = dbus.Array([])
for byte in props['Data']:
  print("byte " +chr(byte))
  array_de_bytes.append(dbus.Byte(byte))

session_bus = dbus.SessionBus()
dbus_mmmms_object = session_bus.get_object('org.ofono.mms.ModemManager', '/org/ofono/mms')
dbus_mmmms_properties = dbus.Interface(dbus_mmmms_object, dbus_interface='org.ofono.mms.ModemManager')
sms_properties = dbus_mmmms_properties.PushNotify(array_de_bytes)


And listen for the reply
Code:
#!/usr/bin/python3

#for dbus listening - sms/mms recieve.
from gi.repository import GLib
import dbus
import dbus.mainloop.glib

def mm_message_added(dbus_sms_path, sms_type):
  #sms_type 1 == receive
  #sms_type 0 == send
  print(dbus_sms_path)
  print(sms_type)


dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_signal_receiver(  handler_function = mm_message_added,
                          bus_name="org.ofono.mms",
                          path = "/org/ofono/mms/modemmanager",
                          dbus_interface = "org.ofono.mms.Service",
                          signal_name = "MessageAdded")
                         
mainloop = GLib.MainLoop()
mainloop.run()
  Reply
In case folks have been wondering what I have been up to. I have been working to help integrate MMS support into a future elease of chatty:

https://source.puri.sm/mohammed.sadiq/ch...mm-account

I have a patch in the attachment.

I will warn you: This is in very much a beta state! Additionally, if you compile and run this, it convert's your message database irreversably! so if you want to try this out, BACK UP your $HOME/.purple/ folder!!!!

Right now receiving works for MMS support, but sending is still a WIP to support. Thankfully most of the work was already done in purple-mm-sms, so it is a matter of porting over.


Attached Files
.txt   0001-Add-MMSD-support.txt (Size: 51.54 KB / Downloads: 178)
  Reply
Well for some good news, I got mmsd packaged up for Debian!

you can find it here: https://source.puri.sm/kop316/mmsd/-/tre...ger/latest
  Reply
I have made a fair amount of progress on the chatty integration! It is on feature parity with purple-mm-sms, but work is needed to polish it (and to get mm-account ready for general usage).

It is here:

https://source.puri.sm/kop316/chatty/-/t...mm-account

I warn you, BACK UP your $(HOME)/.purple if you try this! the new chatty converts the database into a newer format, which will not work on older ones.
  Reply
(02-08-2021, 05:55 PM)kop316 Wrote: I have made a fair amount of progress on the chatty integration! It is on feature parity with purple-mm-sms, but work is needed to polish it (and to get mm-account ready for general usage).

It is here:

https://source.puri.sm/kop316/chatty/-/t...mm-account

I warn you, BACK UP your $(HOME)/.purple if you try this! the new chatty converts the database into a newer format, which will not work on older ones.

I have been following this thread(among others) with great anticipation.  I have briefly attempted to test this a few times and can appreciate the progress.

for me, MMS is essential for being able to use the pinephone as a daily driver.
as my carrier uses MMS to send group messages.  I cannot miss important group messages.
I am sure there are many people like me that need this MMS function to work.

I just wanted to say thank you for all your work as well as your updates.
  Reply
(02-09-2021, 07:46 AM)mnjm97 Wrote:
(02-08-2021, 05:55 PM)kop316 Wrote: I have made a fair amount of progress on the chatty integration! It is on feature parity with purple-mm-sms, but work is needed to polish it (and to get mm-account ready for general usage).

It is here:

https://source.puri.sm/kop316/chatty/-/t...mm-account

I warn you, BACK UP your $(HOME)/.purple if you try this! the new chatty converts the database into a newer format, which will not work on older ones.

I have been following this thread(among others) with great anticipation.  I have briefly attempted to test this a few times and can appreciate the progress.

for me, MMS is essential for being able to use the pinephone as a daily driver.
as my carrier uses MMS to send group messages.  I cannot miss important group messages.
I am sure there are many people like me that need this MMS function to work.

I just wanted to say thank you for all your work as well as your updates.

Hello!

Thank you for the kind words, and I am glad you like seeing it. I am in the same boat as you, without MMS the pinephone is really a secondary electronic at best, which is why I decided to take on this project. I am very hopeful that MMS support within chatty will be done within the next few months.

I will also offer that any help, via testing/packaging/porting/developing is more than welcome. I have had several people help me out to make sure that mms works across several carriers, different distros, and to package it up! I am truly grateful to the pinephone community for their help and support.
  Reply
So a few notes:
  • I added a bunch of new info on the first post: How to try out the new version of chatty with MMS directly integrated, and how to package mmsd as a deb package.
  • I added a maximum sending size limit within mmsd. It is user configurable, but I have noticed on Android that the maximum sending limit is around 1 Megabyte. I therefore chose that as my default, but you are welcome to try and see if there is a value that works for your carrier. I will warn you, setting it too big will make your carrier silently reject your send, so use at your own risk!
As an issue I am requesting help with:
In my Debian package, I am able to get the systemd service to properly install/uninstall in mmsd, but I am unable to get mmsd to start on installation and stop on removal. If anyone knows how to get that to work (or has a better way to get mmsd to start as a daemon), feel free to let me know or show me how to do it!

Also, if you are curious to see the pmOS MR for mmsd: https://gitlab.com/postmarketOS/pmaports...uests/1840

And tor.sh is packaging it for Fedora: https://gitlab.com/fedora-mobile/mmsd/
  Reply
Hi,

I've setup mmsd as per Mobian's wiki (https://wiki.mobian-project.org/doku.php?id=mms), but the example modemmanager settings don't show exactly how to use the APN's proxy. I understand I put the proxy's IPTongueORT, but my provider also need username and password.

So "CarrierMMSProxy=" is the option for proxy, what are the ones for username and password ?

I've looked on internet and modemmanager man pages, but I cannot find this information...

Thanks
  Reply
(02-14-2021, 03:16 PM)bitsandnumbers Wrote: Hi,

I've setup mmsd as per Mobian's wiki (https://wiki.mobian-project.org/doku.php?id=mms), but the example modemmanager settings don't show exactly how to use the APN's proxy. I understand I put the proxy's IPTongueORT, but my provider also need username and password.

So "CarrierMMSProxy=" is the option for proxy, what are the ones for username and password ?

I've looked on internet and modemmanager man pages, but I cannot find this information...

Thanks

My intuition tells me that if you are logged in properly on your mobile data (i.e. phosh has all of that information), you will be fine (i.e. mmsd does not need this information).

If you find that is incorrect, please let me know!
  Reply
Thanks for your hard work on this! I unexpectedly had to start using the pinephone as my main phone and this has been a life saver! It's great to see this coming together so well! There are obviously a lot of rough edges with MMS right now, but I'm just glad to get them and appreciate your (any everyone else's) hard work!
  Reply


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

Forum Jump:


Users browsing this thread: 4 Guest(s)