[SOLVED] Re: Simplest way to read SMSes-content from a QMI-modem
Ajay Garg
ajaygargnsit at gmail.com
Sun Aug 14 13:24:05 UTC 2016
Sorry, my bad.
Following works seamlessly ::
##############################################################################
root at logic-desktop:~# *mmcli -s /org/freedesktop/ModemManager1/SMS/22*
SMS '/org/freedesktop/ModemManager1/SMS/22'
-----------------------------------
Content | number: '+919818782593'
| text: 'Trying again'
-----------------------------------
Properties | PDU type: 'deliver'
| state: 'received'
| storage: 'me'
| smsc: '+919810051829'
| timestamp: '160808142935+05'
##############################################################################
Sorry for the noise.
Thanks and Regards,
Ajay
On Sun, Aug 14, 2016 at 6:38 PM, Ajay Garg <ajaygargnsit at gmail.com> wrote:
> Hi All.
>
> I can tetrieve the metadata of the SMSes, via
>
>
> #########################################################
> logic at logic-desktop:~$ *mmcli -m 0 --messaging-list-sms*
>
> Found 14 SMS messages:
> /org/freedesktop/ModemManager1/SMS/34 (received)
> /org/freedesktop/ModemManager1/SMS/35 (received)
> /org/freedesktop/ModemManager1/SMS/36 (received)
> /org/freedesktop/ModemManager1/SMS/37 (received)
> /org/freedesktop/ModemManager1/SMS/38 (received)
> /org/freedesktop/ModemManager1/SMS/39 (received)
> /org/freedesktop/ModemManager1/SMS/40 (received)
> /org/freedesktop/ModemManager1/SMS/41 (received)
> /org/freedesktop/ModemManager1/SMS/42 (received)
> /org/freedesktop/ModemManager1/SMS/43 (received)
> /org/freedesktop/ModemManager1/SMS/44 (received)
> /org/freedesktop/ModemManager1/SMS/45 (receiving)
> /org/freedesktop/ModemManager1/SMS/46 (received)
> /org/freedesktop/ModemManager1/SMS/47 (received)
> #########################################################
>
> But how do I actually read the SMS-content?
>
>
> I tried using https://raw.githubusercontent.com/openshine/ModemManager/
> master/test/sms-get.py, but it gives errors as follows ::
>
> #########################################################
> logic at logic-desktop:~$ *python sms-get.py
> /org/freedesktop/ModemManager1/Modem/0*
> Traceback (most recent call last):
> File "sms-get.py", line 43, in <module>
> proxy = bus.get_object(MM_DBUS_SERVICE, objpath)
> File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in
> get_object
> follow_name_owner_changes=follow_name_owner_changes)
> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in
> __init__
> self._named_service = conn.activate_name_owner(bus_name)
> File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in
> activate_name_owner
> self.start_service_by_name(bus_name)
> File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in
> start_service_by_name
> 'su', (bus_name, flags)))
> File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651,
> in call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown:
> The name org.freedesktop.ModemManager was not provided by any .service files
> #########################################################
>
>
> What is the simplest/most-recommended way to read the SMS-contents?
>
> Will be grateful for pointers.
>
> Thanks and Regards,
> Ajay
>
--
Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20160814/db08e0c7/attachment.html>
More information about the ModemManager-devel
mailing list