Skip to content

Fix sending SMS messages when some other AT commands get in the way

If AT commands are queued in between our AT+CMGS and the actual raw SMS data sent, we would end up breaking the SMS send operation badly.

  [1556246081.786284] (ttyACM2): --> 'AT+CMGS=70<CR>'
  [1556246081.814861] (ttyACM2): <-- '<CR><LF>> '
  [1556246081.819382] (ttyACM2): --> 'ATD1234567890;<CR>'
  [1556246081.839685] (ttyACM2): <-- '<CR><LF>> '
  [1556246081.840123] Couldn't start call : 'Couldn't start the call: Unhandled response '> ''
  [1556246081.856254] (ttyACM2): --> '0001000D810..............
  [1556246081.922470] (ttyACM2): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'

These fixes will change this logic so that "raw commands" are never added at the end of the queue of pending commands, they will be always added at the head. This logic makes sense because raw commands in the AT port are really exclusively used for the SMS send/store operations, where we want the SMS data to be sent right away after our last AT command.

Merge request reports

Loading