smssend is a cli tool which sends sms over dbus. The problem is to use ofono with dbus you need to be in the sailfish-radio group. In the version 0.0.1 the application userid is set to 0 (root) to be able to send a sms as a user. In the version 0.0.2 it uses a pkla file for org.ofono.MessageManager to be able to run under nemo user.
smssend number=+1xxxxxxxxx message='Hello this is hello sms world'
or when sending over sim slot2
smssend number=+1xxxxxxxxx message='Hello this is hello sms world' sim=2
In version 0.0.2 there is an experimental delivery report option. With report=1 it will activate delivery report and sends the sms and disables the delivery report again. I couldn't test because of my provider. When this is not working you could disable the set back of report option with rback=0 I don't know if it needs a delay.
Without a phone number it will not try to send a sms but would toggle the report bit if the option is set.
Attachment | Size | Date |
---|---|---|
smssend-0.0.1-1.armv7hl.rpm | 8.58 KB | 02/10/2019 - 19:27 |
smssend-0.0.2-1.armv7hl.rpm | 14.36 KB | 03/10/2019 - 20:16 |
Comments
Kabouik
Thu, 2019/10/03 - 02:34
Permalink
Would there be a way to use contact names instead of phone numbers in a future version? Would be very useful to send sms using ssh just to take advantage of a real PC keyboard.
halftux
Thu, 2019/10/03 - 20:00
Permalink
For something what you have in mind it would be better to start a new application which uses telepathy. I guess you also want a history.
Kabouik
Fri, 2019/10/11 - 00:32
Permalink
Not necessarily, I was just thinking about sending texts through ssh to take advantage of a full keyboard, history and incoming messages can be read on the phone itself. However it is true that it would be best if messages sent using smssend could show up in Telepathy history.
ade
Wed, 2019/10/02 - 19:48
Permalink
Just (temporarily) adding the sailfish-radio group to nemo might be a better approach.
halftux
Wed, 2019/10/02 - 20:46
Permalink
Thanks for this hint. But I don't know how this would be done. Do you have an example?
ade
Wed, 2019/10/02 - 21:31
Permalink
setregid should be usable. Here is an example: http://www.qnx.com/developers/docs/qnxcar2/index.jsp?topic=%2Fcom.qnx.do...
"Sudo" has the option to execute as non root with additional groups, so that source should also be usable.
olf
Wed, 2019/10/02 - 21:57
Permalink
Just an idea (which may be complete nonsense):
Isn't that also controllable by PolicyKit, i.e. by a PKLA file in /etc like this (though with a different group as "identity" and a different "action"), https://github.com/Olf0/crypto-sdcard/blob/master/polkit-1/localauthorit... ?
halftux
Thu, 2019/10/03 - 18:45
Permalink
Yes it is working with a PKLA file thank you for your suggestions.
ade
Wed, 2019/10/02 - 22:27
Permalink
I think that might also be an alternative.
The main issue is that nemo is no longer able to send an sms (without the sailfish-radio group). I doubt if you need to be root for dbus (as stated), as there a user session bus next to the system bus. But I am no dbus expert.