Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD
#1
Hey all,

I've got a pretty rough python3 script that I'm working on right now. It takes SMS and MMS messages from the PinePhone (Tested on PMos and Mobian) and bridges them to a Matrix server.

for SMSes I talk directly to Modem Manager via the dbus and MMSes require mmsd from kop316 https://forum.pine64.org/showthread.php?tid=12491


I've uninstalled chatty on my testing device as it also interacts directly with the modem.I did this because i think it'll cause problems if its running at the same time. I'm still pretty new to programming and definitely not a developer. Just a Linux admin who hates using his cellphone when I'm already at a keyboard. So far no one else has written anything so I have to.

If you're interested in helping me please let me know! I'd love to get someone who has experience to make this better.

Cheers!
  Reply
#2
This looks really cool! Yeah I might be able to help you with this, especially since I've already worked on the code before. After what you said in the other thread, I was looking into switching to matrix-nio too, but I haven't had any spare time at all, so its great that you beat me to it.

The nice part about using purple is it integrates with the chatty ui, so messages sent on matrix show up in chatty and theoretically the other way around is possible, but I haven't implemented that. But since chatty is eventually going to be moving purple-mm-sms into chatty itself, my script will no longer work, so your method is future proof. I think there are plans to add a dbus api to chatty itself, but I'm not sure if it will have all the features needed for proper matrix bridging.

Either way thank you for doing this! I'll see if I can try it out at some point. And I've been meaning to checkout Chris's mmsd implementation(I'm over a month late on this), so this will force me to do that.
  Reply
#3
(02-09-2021, 10:06 PM)pacman99 Wrote: This looks really cool! Yeah I might be able to help you with this, especially since I've already worked on the code before. After what you said in the other thread, I was looking into switching to matrix-nio too, but I haven't had any spare time at all, so its great that you beat me to it.

The nice part about using purple is it integrates with the chatty ui, so messages sent on matrix show up in chatty and theoretically the other way around is possible, but I haven't implemented that. But since chatty is eventually going to be moving purple-mm-sms into chatty itself, my script will no longer work, so your method is future proof. I think there are plans to add a dbus api to chatty itself, but I'm not sure if it will have all the features needed for proper matrix bridging.

Either way thank you for doing this! I'll see if I can try it out at some point. And I've been meaning to checkout Chris's mmsd implementation(I'm over a month late on this), so this will force me to do that.

I would love for this to be an extension of Chatty! I was kind of hopeful that your work was doing that so I could use it. hahaha. Maybe we can integrate this into chatty??? or even build a GUI or something to replace chatty. I'd like to see messages sent on Matirx show up on the phone, however, that does not happen. I dont even think it will work with chatty running.

I'm open to everything and anything as long as I can text from matrix reliably. you're welcome to fork it and do your own thing or submit any PRs at all. if it works I'll merge it.

This script is a complete rewrite. The idea is the same but I did not take much from ofono-matrix-puppet so it might take a bit to get use to it.
  Reply
#4
I'm glad to see mmsd is getting some usage!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 3,827 10-18-2023, 08:37 AM
Last Post: luppivega
  Article: NuttX RTOS for PinePhone: 4G LTE Modem lupyuen 2 2,079 04-10-2023, 10:19 PM
Last Post: lupyuen
  changing from bullseye to bookworm to install mmsd-tng jyoung 8 4,218 04-09-2023, 06:08 PM
Last Post: zetabeta
Sad Modem is always visible/connected but stops working after a while dante404 6 4,078 11-08-2022, 09:12 AM
Last Post: dante404
  Downsides of the open-source modem firmware? alpineduck 4 3,376 10-25-2022, 05:28 PM
Last Post: Zebulon Walton
  Latest firmware for PinePhone modem! Subsentient 104 148,621 07-20-2022, 05:32 AM
Last Post: zetabeta
  Beta support: MMS on chatty/mmsd on Modem Manager - help/testing wanted! kop316 201 216,857 03-24-2022, 03:16 AM
Last Post: as365n4
  Python3 cli app to bridge SMS/MMS to matrix/riot.im FutureBucket 12 15,812 01-09-2022, 03:18 PM
Last Post: rmblror
  Problem Flashing the modem Firmware loreson 0 1,389 12-22-2021, 10:31 AM
Last Post: loreson
  Solutions to modem / connection problems Anna 3 3,704 12-10-2021, 01:42 AM
Last Post: AntonReiser

Forum Jump:


Users browsing this thread: 1 Guest(s)