dsms
dsms is a TUI for receiving and sending SMS throught your Android phone.

★ Releases
★ 
3-Clause BSD license
★ Changelog
★ Software metrics
★ Issues
★ Mailing List
★ Credits
★
★
★
★ 
★
★
★ 
Features
- Recieves and displays texts forwarded by the SMS Forwarder Android app, available in F-Droid
- Sends texts via the RestSMS Android app, available in F-Droid
- Presents a familiar chat view of texts
- Persists texts between runs
- Detects RestSMS if its running with Network Discovery Service enabled
- Registers itself as an SMS receiver under the instance name
dsms on ZeroConf. Currently, this does nothing because SMS Forwarder doesn't look for receivers. But it's there in case it does, someday!
Limitations
- Requires setting up two mobile apps
- Should really only be used on a LAN; neither SMS Forwarder nor RestSMS are big on security. In particular, while RestSMS does have token authentication, it's passed as an HTML parameter, which means it's visible to anyone sniffing network traffic. Over a VPN should be fine, but don't use this over an unsecured WAN. https will not help you!! http query parameters are always sent unencrypted. SMS Forwarder has no authentication suppport, at all1
- dsms can only know about messages that are sent and received while it is running. SMS Forwarder provides no way to get message history. Messages received while dsms is offline or inaccessible, or while SMS Forwarder is stopped, will never reach dsms.
- dsms does not have access to contact information, so you only see telephone numbers.
- This is a beta application. Creature comforts are missing.
Requirements
For this to work, two applications need to be running on your phone. Both are available in F-Droid:
- RestSMS, which runs a server on your phone that accepts HTTP requests, and sends texts. Ideally, when you set this up, go into the settings and turn on Network Discovery Service; this will make running
dsms easier.
- SMS Forward, which forwards SMS messages received on the phone to a web service.
dsms runs a web service for receiving texts forwarded by SMS Forward, provides a chat-like TUI for selecting numbers and viewing conversations, and allows you to type messages in and send them through RestSMS.
Building
dsms is written in Go, and can be installed with the command:
go install ser1.net/dsms@latest
Or this repository can be checked out and built on the command line:
hg clone https://hg.sr.ht/~ser/dsms
cd dsms
go build .
Running
There is a -help command that shows the options. There is also a (nearly identical) man page in the repository. The arguments that allow dsms to talk to your phone are:
-listen where you provide the interface and port to which SMS Forward will send texts. You should be able to omit this one; by default, dsms will listen on 0.0.0.0:9192.
- Either
-restSmsUrl needs to be provided (which includes the address of your phone), or RestSMS must have Network Service Discovery enabled, in which case you can use the -a flag. If you use the restSmsUrl argument, it is a full URL, including scheme and path: for example, http://192.168.1.112:8090/send.
-token is a security token you configure in RestSMS, and provides security so that randos can't send texts. It's any string you set; it's basically a password. There are no restrictions set by RestSMS, so there are none in dsms
You'll configure where SMS Forward sends texts in that app; it'll be the IP of your desktop, and whatever port you set on the dsms command line. You'll have to figure out what your phone's IP on the LAN is, and configure RestSMS with the port you want it to listen on and the secret token you'll pass to dsms.
There are other, optional, arguments which are described by -help.
You really should try to use the ZeroConf option; it's much more of a pain without it. If you are using it, dsms tries to be smart about finding RestSMS. If it loses connection with the phone -- for example if you leave and come home and your router gives your phone a new IP -- dsms will try to look up the RestSMS service again, trying 5 times before it gives up.
Bindings
Eventually, there'll be a help dialog, access to log messages, ZeroConf refresh hotkeys, and probably a kitchen sink. In the meantime, the key bindings are:
- Ctrl-c will (cleanly) exit the program
contacts column
- up and down navigate the phone numbers
- Enter will load the stored conversation for that phone number
- Tab will load the conversation and focus the message entry field
- Right arrow will load the conversation and focus the chat history field
telephone number entry field
- Tab will activate the contacts pane
- Enter will activate the message entry field. If a new telephone number has been entered, it will be added to the contacts list.
chat history field
- Up and down will navigate the entries
- Tab will activate the contacts column
- Enter on a message opens up a diaog where you can see long-line messages
message dialog
- Esc closes the dialog
- Arrows scroll if it's really long
message entry field
- Tab will activate the telephone number field
- Enter will send the text to the currently active contact
Development
Issues are by-and-large embedded in the code. legume (in AUR) can be used to list and inspect the tickets; when the changelog is updated, the list also gets updated, but it may not be current.
There are no unit tests. Yet.
The change log is generated with changelog.