Small progress if you wanted to take the script to the next level as far as actually sending an SMS goes. See discussion here: Librem 5 Capabilities That No Other Phone Has - #7 by Skalman
So the full logic would be approximately:
- if destination number is missing (in the QR code decode result) then prompt for it
- if text content is missing then prompt for it
- get confirmation from user to go ahead (essential if neither field was missing, desirable in any case)
- kill
chatty - create the SMS (I found that it worked without using a full international number, and nor does the number need to be in single quotes)
- read the SMS message number (index) in the response to the create
- request that message number to actually be sent
- list messages in order to verify that the message was sent
- delete the specified message
sudo mmcli -m any --messaging-delete-sms=Nwhere N is the message number - restart
chatty
Yeah, it’s not clean but …