The AT daemon is now able to decode SMS messages! This required a bit of refactoring, as previously the data sent from the modem would be processed line by line for URCs and return codes. The +CMT URC yields two lines: one with the length of the message and one with the actual message, so this model no longer works. I added a separate function to advance the line no matter where in the program it is placed, which lets the +CMT handler get the next line.
In the past few hours I also managed to get a PDU encoder working as well. I was even able to test it on my phone and by sending myself a text to verify that it works properly.
As I said last week, most of the heavy lifting is done by procedures from
uqmi. It is not flawless: doesn't convert from ASCII to GSM, so some
characters will be messed up. Luckily alphanumeric characters will pass
Here's what's left for basic SMS support:
- atd socket interface - `smsd` to handle incoming messages (analogous to `calld`)
- atd socket interface - conversion from atd interface to AT commands
The ATD socket interface will work similarly to the call interface: a
program will be able to register with
atd as an "SMS Listener", and
receive SMS related events. Obviously
smsd will serve the role of the
listener, and probably just write to a file. Maybe down the line I can
have some sort of notification queue. Sending SMS messages will be simple,
because a program can just talk directly to
atd, just like calling.
A GUI for SMS will probably be the most complex graphical program in the system thus far. I might have to handle, gasp, scrolling!
It doesn't feel like a lot of work to make this happen considering I already did it for calls, and SMS is simpler because I don't have to worry about managing state. I've been getting side tracked and working on other things, which is why there hasn't been too much progress in the past few weeks. Hopefully I can get more work done here this week.