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
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 2,533 10-18-2023, 08:37 AM
Last Post: luppivega
  A/B testing or Unit testing gulshan212 0 977 08-29-2023, 03:36 AM
Last Post: gulshan212
  Article: NuttX RTOS for PinePhone: 4G LTE Modem lupyuen 2 1,595 04-10-2023, 10:19 PM
Last Post: lupyuen
  changing from bullseye to bookworm to install mmsd-tng jyoung 8 3,019 04-09-2023, 06:08 PM
Last Post: zetabeta
Sad Modem is always visible/connected but stops working after a while dante404 6 3,174 11-08-2022, 09:12 AM
Last Post: dante404
  Downsides of the open-source modem firmware? alpineduck 4 2,683 10-25-2022, 05:28 PM
Last Post: Zebulon Walton
  Pinephone: OpenGL support? orbital 2 2,239 08-25-2022, 04:09 PM
Last Post: vortex
  Latest firmware for PinePhone modem! Subsentient 104 130,546 07-20-2022, 05:32 AM
Last Post: zetabeta
  Which PP OS currently has the best podcast support? kujo_marble 3 2,092 07-14-2022, 07:09 AM
Last Post: tophneal
  Help wanted: location of calls and chatty data files dukla2000 3 4,706 06-13-2022, 02:01 PM
Last Post: israel

Forum Jump:


Users browsing this thread: 2 Guest(s)