Home/Support/Support Forum/Error while Receive SMS via python "SMS Received: xxx: POWER OFF,Not executed"
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Error while Receive SMS via python "SMS Received: xxx: POWER OFF,Not executed"

0 votes
Hello,

every time the modem receives a sms i get "Not executed" in Event Log.

Box "Send received SMS messages to the command interpreter" is ticked.
The python script is listed under "autorun commands".

Any ideas?
asked Jun 30 in Digi TransPort Cellular by Ba5tian New to the Community (4 points)

Please log in or register to answer this question.

2 Answers

0 votes
 
Best answer
Ba5tian, what are you trying to do exactly?

If you want to have SMS control of the router using the same commands as telnet/ssh then all you need to do is add your mobile number to the list "Allow CLI commands from the following SMS numbers."

under Configuration - Network > Interfaces > Mobile > SMS Settings

You can use wild cards here too.

If however you want to receive SMS in your python script then you need to add your number above but disable "Send received SMS messages to the command interpreter".

Confirm your python script is running with "pycfg scripts" via SSH/Telnet and you can see if it is running.

One thing to note is that python will exit after you initialise the callback so you need to have a while true loop that just sleeps for 1 second. This will stop your python exiting.
answered Jul 5 by NicholasYourIoT Seasoned Professional (192 points)
selected Jul 6 by Ba5tian
I want to receive a sms by python.

The script is running, confirmed it with "pycfg scripts".

I will try to disable "Send received SMS messages to the command interpreter".

The script did function but not anymore and i can't find the reason.
"while true loop" is used.


After adding the wildcard as mobile number under "Allow CLI commands from the following SMS numbers." the script was executed.
Problem solved.
0 votes
SMS control is done by OS, try a command line instruction used on the "Execute command" window on web interface with a browser.
____________________________________________________
send an SMS to your modem containing the line below

modemstat ?
____________________________________________________

the command "reboot" reboots obviously,
"pppstat 1" will give the IP if the WWAN in on ppp 1
ect..

Consult the list of Command Line Instructions for commands
answered Jul 2 by Bryonhu Seasoned Professional (197 points)
...