Reply
Thread Tools
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#1
I played the last days with dbus and org.ofono on sfos. So I want to share my outcome for learning purpose.
I don't know if it is the right way but I could not easy find another one. So telepathy could be also something interesting.

This application listens for incoming sms on sim card slot 1.
When an incoming sms phone number is in the whitelist.txt it will check the cmdlist.txt, if the sms message text matches an entry. If there is a match it runs the defined command in the cmdlist.txt.

/home/nemo/.config/smsrun/whitelist.txt
/home/nemo/.config/smsrun/cmdlist.txt

The whitelist.txt should contain per line only one phone number.
The cmdlist.txt has in one line the sms key word and the command seperated by a tabulator.

The application runs not as a deamon atm it is only for development purpose. Close it with ctrl+c or if it is running in the background kill the pid of smsrun.

D-Bus info:
service: org.ofono
path: /ril_0
interface: org.ofono.MessageManager
signal: IncomingMessage

It returns a string (the message) and a variant map [string,variant] which holds LocalSentTime, Sender, SentTime.


Sourcecode:
https://github.com/halftux/smsrun
Attached Files
File Type: rpm smsrun-0.0.1-1.armv7hl.rpm (15.0 KB, 221 views)

Last edited by Halftux; 2019-10-07 at 20:21. Reason: added links to the lists
 

The Following 3 Users Say Thank You to Halftux For This Useful Post:
Reply

Tags
control, message

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:26.