This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sdk:scripts:sms-control [2015/01/28 08:31] dotoli [Application] |
sdk:scripts:sms-control [2015/07/23 06:58] dotoli |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== SDK Script sms-control.are ====== | ====== SDK Script sms-control.are ====== | ||
- | You will also find this sample script on the router. | ||
<code c sms-control.are> | <code c sms-control.are> | ||
/* DESC: This script will execute commands received by SMS. | /* DESC: This script will execute commands received by SMS. | ||
Line 152: | Line 151: | ||
rc = nb_dio_set(sprintf("out%s", port), st); | rc = nb_dio_set(sprintf("out%s", port), st); | ||
if (rc) { | if (rc) { | ||
- | nb_syslog("Unable to set state %s for DIO output port %s\n", newstate, dout); | + | nb_syslog("Unable to set state %s for DIO output port %s\n", newstate, port); |
return -1; | return -1; | ||
} else { | } else { | ||
- | nb_syslog("Setting state %s for DIO output port %s\n", newstate, dout); | + | nb_syslog("Setting state %s for DIO output port %s\n", newstate, port); |
return 0; | return 0; | ||
} | } | ||
Line 269: | Line 268: | ||
</code> | </code> | ||
- | ------------------------------------------------------------------------------------------------------------------ | ||
- | ====== Application ====== | ||
- | |||
- | Scrips -->edit, Arguments: leave the field empty (by default) or type "noauth"\\ | ||
- | empty = the password is needed; 1. line = password, 2. line = command\\ | ||
- | noauth = no router password is needed, could be a security problem\\ | ||
- | |||
- | The SMS must be send to the SIM-card phone number. (e.g. +41791112233) | ||
- | |||
- | **SMS commands:**\\ | ||
- | status: Sends back the status.\\ | ||
- | connect: Builds up the data connection.\\ | ||
- | disconnect: Terminates the data connection.\\ | ||
- | reboot: Reboots the router.\\ | ||
- | output 1 on: Turns on/off the desired output port.(1/2 on/off)\\ | ||
- | |||
+ | Configuration:{{:sdk:sms-control.pdf|}} | ||