FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
900 views 0 comments
by

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)

 079XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (76),23

1 Answer

0 votes
by anonymous

Hello,

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