Yeay, I have a Pinephone! I don’t want to use one of the “mainstream” desktop environements for the phone (plasma mobile, phose, ubuntu touch/lomiri) so I’ll have to build up most of the environment myself. One of the things I need working for the phone to be of any use is the modem. What i’d like in that reagrd is a daemon running on the phone that abstracts the commands to send to the modem. It would be nice if it could be connected to my xmpp server so I can send and receive SMS/MMS from my computer (I think it also is possible to d voice calls with it, but I’m not sure, i’ll look into it)
A what commands ?
At commands are a set of commands used to control modems, I won’t go into details, this is juste for me a place to list the commands I have found and that are usefull. (I might add some explanation as to why a command is needed or stuff like that)
Here’s the wikipedia page on theme: https://en.wikipedia.org/wiki/Hayes_command_set
Atinout seems like a good tool for sending
commands to the moden; you can also use screen
if you want to do it
interactively (or cat | atinout - {modem_path} -
)
Pin settings
Asuming your pin code is 1337
Unlocking:
at+cpin=1337
Seting the pin to 1234
at+clck="SC","1234","1337"
Removing the pin
at+clck="SC",0,"1337"
For sms
To send an sms you can do:
at+cmgs="{phone_number}"
> TEXT
> TEXT
> TEXT<C-Z>
Listing all messages
at+cmgl="ALL"
Reading a message, where index is given by the previous command
at+cmgr={index}
Deleting a message, the index is the same as above
at+cmgd={index}
Sources
Here’s a bunch of link with usefull info, this kind of stuff is not often worked on by us the pleb nowaday, so much of what you can find only can be a bit outdated ¯\_(ツ)_/¯
- https://www.smssolutions.net/tutorials/gsm/receivesmsat/
- https://www.smssolutions.net/tutorials/gsm/sendsmsat/
- https://www.developershome.com/sms/ (this one is quite detailed)
- http://bicosyes.com/2012/07/remove-pin-code-with-at-commands/
- https://www.activexperts.com/sms-component/at/commands/?at=%2BCMGR paste your command at the end of this one to get an explanation, I like this one :3