Hello! I’m playing with SMS features of RouterOS, using v6.40.3. I would like to know if there is a way to send an already encoded PDU (hex) string to RouterOS so that it can just forward the PDU Message without re-encoding it?
Regards,
Artur
Hello! I’m playing with SMS features of RouterOS, using v6.40.3. I would like to know if there is a way to send an already encoded PDU (hex) string to RouterOS so that it can just forward the PDU Message without re-encoding it?
Regards,
Artur
Hi!
I have the same feature request.
As I know there are no possibility send SMS via PDU mode by RouterOS. I’d like to send UCS-2 SMS but /tool sms does not supports it too ![]()
And there is no way to push AT commands to modem with PDU data, because there are no options to send Ctrl+Z to serial terminal via a script…
Here some my workaround about this problem. Very strange that so powerful and flexible device as Mikrotik has so problems with direct modem connectivity and SMSing via scripting ![]()
My solution as an example sends SMS with text “УСТЗАПРЕТ1” (cyrillic) to number 5151 (short number) via PDU mode. Tested with Telit H910-D modem.
# Send SMS Script #
:local pppName "ppp-out1";
:local pduLength "32";
:local pduMessage "07919712999090F01100048115150008FF1604230421042204170410041F0420041504220421041F";
:log info "[SMS] Sending SMS started via $pppName";
:local modemPort [/interface ppp-client get [/interface ppp-client find name=$pppName] port];
:local infoChan [/interface ppp-client get [/interface ppp-client find name=$pppName] info-channel];
:local smsReceiveEnabled [/tool sms get receive-enabled];
:log info "[SMS] Turning off SMS receive mode";
/tool sms set receive-enabled=no;
:if ([:len [/interface find name="SMSData1"]] = 0 ) do={
:log info "[SMS] Creating temporary ppp interface SMSData1";
/interface ppp-client add add-default-route=no comment="SMSData1" dial-on-demand=no dial-command="AT" disabled=yes data-channel=$infoChan name=SMSData1 port=$modemPort;
}
:local SMSData1id [/interface ppp-client find name="SMSData1"];
/interface ppp-client set modem-init="AT+CMGF=0;AT+CMGS=$pduLength\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r$pduMessage\1A" $SMSData1id;
/interface ppp-client enable $SMSData1id;
delay 2;
:log info "[SMS] Removing temporary ppp interface SMSData1";
/interface ppp-client remove $SMSData1id;
:log info "[SMS] Restore SMS receive mode";
/tool sms set receive-enabled=$smsReceiveEnabled;
:log info "[SMS] SMS was sent via $pppName";
PDU online encoder: http://smstools3.kekekasvi.com/topic.php?id=288
Dmitry, thank you very much for your decision!
After the purchase SXT LTE Kit, I am trying to figure out how to send an SMS such as USTZAPRET1 and the rest to the number 5151. (Carrier: Megafon)
I tried to execute the command by completely copying the code, but it did not work.
I can not understand what is wrong .. Please tell, what could be the matter?