Turris Omnia LTE SMS guide?

I have a Turris Omnia with the internal LTE modem (some Quectel model if it matters). I use it for 4G home broadband.

The telco has secured my login with 2FA via SMS, so I need to be able to see the codes they send me, preferably without having to disassemble the Omnia to dig out the SIM card to put into a phone.

Has anyone set something up to receive SMS messages? I don’t need any fancy GUIs or anything, if they get dumped as text files to a directory, or written to some log, that’d do. Sending texts is also not a priority, although I could probably think of some fun things to do with that.

I can probably spend a weekend figuring this stuff out - looks like smstools3 is the go-to OpenWRT package for this, but configuration looks hairy. If anyone could short-cut this for me with some Turris-specific notes or a wiki link, I’d be grateful. I don’t really know anything about OpenWRT or telecoms (AT commands etc) at this point.

2 Likes

OK, so here’s what I figured out.

I couldn’t get smstools3 (smsd) to do anything, but it did lead me to search for the Quectel AT command documentation for the modem: https://www.quectel.com/wp-content/uploads/2021/03/Quectel_EP06EG06EM06_GNSS_AT_Commands_Manual_V1.0.pdf

You can use the socat command line program to send AT commands to the modem. socat is already installed on the Omnia.

You need to know the device for the modem. A grep of dmesg messages shows the modem installed four devices:

root@turris:~# dmesg | grep USB
...
[   16.263785] usbserial: USB Serial support registered for GSM modem (1-port)
[   16.277544] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[   16.291292] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[   16.308579] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[   16.321956] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[   16.336198] usbserial: USB Serial support registered for Qualcomm USB modem
...

I know that /dev/ttyUSB2 is the device being used for my mobile broadband. I tried them all, but only /dev/ttyUSB3 worked:

root@turris:~# socat - /dev/ttyUSB3,crnl

At this point you can type AT commands.

To list all all the SMS messages:

AT+CMGL

This lists only unread messages, and marks them as read, so if you run it again, the messages won’t appear. To see the read messages again:

AT+CMGL="REC READ"

To delete all the messages:

AT+CMGD=0,1

For me, some messages were in plain text and others were encoded. The encoded messages were simply using a four-byte hex value for each character, e.g. “0048” = “H”

To decode these, I used the xxd program (on another machine, it wasn’t installed on the Omnia):

# echo -n '00480065007200652019007300200079006F007500720020006F006E0065002000740069006D0065002000700061007300730063006F00640065003A0020003700300031003500330039000A000A0054006800690073002000690073002000760061006C0069006400200066006F0072002000330020006D0069006E0075007400650073002E' | xxd -r -p
Here s your one time passcode: 701539

So not exactly the most user-friendly process, but it gets the job done.

3 Likes

Any other tips on this subject welcome. In fact, anything to do with using 4G & SMS more efficiently on the Omnia. What’s the current best 4G/5G modem in Feb 2024?

I’m ashamed to say that I did manage to read my SMS messages about two years ago, but have completely forgotten how I did it. I remember it not being as difficult as I’d expected. Must look into it again. What put me off was not running the ‘save to a file’ option. So, I read the few that were there and they promptly vanished into thin air :open_mouth:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.