NB3700 User Manual 3.8
/* We are going to eavesdrop on the first serial port
* and turn on lights via a digital I/O output port ,
* otherwise we 'd have to send a short message .
*/
f o r ( attempts = 0; attempts < 3; attempts ++) {
if ( nb_serial_read (" serial0 ") == " Knock Knock !") {
nb_serial_write (" serial0 " , " Who 's there ?") ;
if ( nb_serial_read (" serial0 ") == " Santa " ) {
printf (" Hurray !\ n" );
nb_ dio_set (" out1 " , 1) ;
}
}
}
nb_s m s_send (" +12345678 9 " , "No presents this year :( ")
A set of example scripts can be downloaded directly from the router, you can find a list of
them in the appendix. The manual which can be obtained from the NetModule support
web page gives a detailed introduction of the language, including a description of all
available functions.
SDK API Functions
The current range of API functions can be used to implement the following features:
1. Send/Retrieve SMS
2. Send E-mail
3. Read/Write from/to serial device
4. Control digital input/output ports
5. Run TCP/UDP servers
6. Run IP/TCP/UDP clients
7. Access files of mounted media (e.g. an USB stick)
8. Retrieve status information from the system
9. Get or set configuration parameters
10. Write to syslog
11. Transfer files over HTTP/FTP
12. Perform config/software updates
13. Control the LEDs
14. Get system events, restart services or reboot system
15. Scan for networks in range
98