8751 questions

10397 answers


15438 members

0 votes
607 views 0 comments

Is it possible at all to be able to send a raw SMS PDU to a RUT240 (or similar) as well as get a notification (similar to http forwarding that exists) of received PDUs so that we can encode/decode them ourselves?

This will enable the ability for end-users to handle UCS2 encoding and multi-part message handling without having to make the gsmctl binary more complicated on the device itself.

It is somewhat possible already to send raw PDUs using the gsmctl -A however the parameter length is limited so it is not viable for reliable use with long PDUs

A simple post request with length and PDU as params will suffice, then all that is required is to wrap that in an AT+CMGS=<len>\r<PDU> command.

Similarly forward the raw PDU of new incoming messages as a http request to a specified URL, almost the same as your current SMS HTTP forwarding, but without the PDU to text conversion. The raw PDU can be seen when you use logread -f 

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color: #f2f2f2; background-color: #000000; background-color: rgba(0, 0, 0, 0.85)} span.s1 {font-variant-ligatures: no-common-ligatures}

Sun Nov 24 04:56:09 2019 local1.info gsmd[1707]: gsmd send: 'AT+CMGR=3' (10)


1 Answer

0 votes


Yes, you can send SMS PDU messages from RUT240. To do that, use the following SSH commands:

  • ifdown ppp
  • /etc/init.d/gsmd stop
  • microcom /dev/modem_cmd
  • ATE1  // Enable modem responses to AT commands
  • AT+CSCQ=0  // Disable modem's periodic messages, e.g. "+QCSQ: "LTE",85,-115,134,-11"
  • AT+CMGF=0 // Set PDU mode
  • AT+CSMS=0 // Check if modem supports SMS commands
  • AT+CMGS=17 // Send message, 17 octets (excluding the two initial zeros)
  • >069189674523F11100099121436587F90000AA04D4F29C0E<ctrl-z> // PDU string can be converted using online decoders, e.g:  http://www.twit88.com/home/utility/sms-pdu-encode-decode