Community discussions

MikroTik App
 
nemke
Member Candidate
Member Candidate
Topic Author
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

SMS over Dude

Thu Mar 24, 2022 7:21 pm

Hello
I settup in dude SMS command to Teltonika device using plink.exe
All work fine BUT if sms message field have SPACE, messing is not send.
Example
add Tool in DUDE
D:\Programi\putty\PLINK.exe 10.99.99.253 -P 22 -l xxxxx -pw Xxxxxxx "/tool sms send port=lte1 phone-number=[Device.CustomField1] message="[Device.Password] reboot" "
Above axamle don't work, SMS is not send BUT
D:\Programi\putty\PLINK.exe 10.99.99.253 -P 22 -l xxxxx -pw Xxxxxxx "/tool sms send port=lte1 phone-number=[Device.CustomField1] message="[Device.Password]reboot" "
Above example work.

So after some testing any combinations that have space (text 1111) in sms massage file never is send.
If I do same commnad on LTE divice over ssh
/tool sms send port=lte1 phone-number=[Device.CustomField1] message="[Device.Password] reboot" IT WORK
Do proble is in DUDE how "define" SPACE in code.

What can be used insted of space or how to solve this. SMS Command for Teltonika must have 2 words, "password reboot"

Thanks
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: SMS over Dude  [SOLVED]

Thu Mar 24, 2022 7:30 pm

try to use this syntax:

message="\"[Device.Password] reboot\""

and check if the password do not have some special characters that needs to be escaped on RouterOS strings, like \ or $
 
nemke
Member Candidate
Member Candidate
Topic Author
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

Re: SMS over Dude

Sun Mar 27, 2022 6:47 pm

message="\"[Device.Password] reboot\""

This solve problem. THANKS

Who is online

Users browsing this forum: No registered users and 12 guests