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


Messages In This Thread
RE: Beta support: MMS on chatty/mmsd on Modem Manager - help/testing wanted! - by FutureBucket - 02-01-2021, 11:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Solutions to modem / connection problems Anna 4 7,052 09-13-2026, 07:52 AM
Last Post: idice
  Latest firmware for PinePhone modem! Subsentient 106 243,640 04-03-2026, 08:37 AM
Last Post: baptx
  Difficulty with openSUSE Tumbleweed Install PinePhone Beta danm1988 0 1,274 11-17-2025, 07:49 AM
Last Post: danm1988
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 8,825 10-18-2023, 08:37 AM
Last Post: luppivega
  Article: NuttX RTOS for PinePhone: 4G LTE Modem lupyuen 2 4,813 04-10-2023, 10:19 PM
Last Post: lupyuen
  changing from bullseye to bookworm to install mmsd-tng jyoung 8 9,755 04-09-2023, 06:08 PM
Last Post: zetabeta
Sad Modem is always visible/connected but stops working after a while dante404 6 8,455 11-08-2022, 09:12 AM
Last Post: dante404
  Downsides of the open-source modem firmware? alpineduck 4 6,741 10-25-2022, 05:28 PM
Last Post: Zebulon Walton
  Pinephone: OpenGL support? orbital 2 5,186 08-25-2022, 04:09 PM
Last Post: vortex
  Which PP OS currently has the best podcast support? kujo_marble 3 5,511 07-14-2022, 07:09 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 2 Guest(s)