This is an old revision of the document!
NetModule routers are shipping with a Software Development Kit (SDK) which offers a simple and fast way to implement customer-specific functions and applications. It consists of:
Anyone, reasonably experienced in the C language, will find an environment that is easy to dig in. However, feel free to contact us via router@support.netmodule.com and we will happily support you in finding a programming solution to your specific problem.
The arena scripting language offers a broad range of POSIX functions (like printf or open) and provides, together with tailor-made API functions, a simple platform for implementing any sort of applications to interconnect your favourite device or service with the router. Here comes a short example:
/* 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 . */ for ( 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_sms_send (" +123456789 ", "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.
| Script | Description |
|---|---|
| best-operator.are | This script will scan for operators on startup and choose the one with the best signal |
| candump.are | This script can be used to receive CAN messages |
| config-summary.are | This script shows a summary of the currently running configuration. |
| dio-monitor.are | This script monitors the DIO ports and sends a SMS to the specified phone number. |
| dio-server.are | This script implements a TCP server which can be used to control the DIO ports. |
| dio.are | This script can be used to set a digital output port. |
| dynamic-operator.are | This script will scan Mobile2 and dial the appropriate SIM on Mobile1 |
| email-to-sms.are | This script implements a lightweight SMTP server which is able to receive mail and forward them as SMS to a phone number. |
| etherwake.are | This script can be used to wake up a sleeping host (WakeOnLan) |
| gps-monitor.are | A script for activating WLAN as soon as GPS position (lat,lon) is within a specified range. |
| gps-udp-client.are | This script sends the local GPS NMEA stream to a remote UDP server. |
| gps-upd-client-compat.are | This script sends the local GPS NMEA stream to a remote UDP server (incl. device identity). |
| led.are | This script can be used to set a LED |
| mount-media.are | This script can be used to mount an USB storage stick. |
| ping-supervision.are | This script will supervise a specified host. |
| read-config.are | This script can be used to read a configuration parameter. |
| remote-mail.are | This script reads and sends mails from a remote IMAP/POP3/SMTP server |
| scan-mobile.are | This script can be used to switch the Mobile LAI according to available networks |
| scan-wlan.are | This script can be used to switch the WLAN client network according to availability |
| send-mail.are | This script will send an E-Mail to the specified address. |
| send-sms.are | This script will send an SMS to the specified phone number. |
| serial-read.are | This script can be used to read messages from the serial port. |
| serial-readwrite.are | This script will write to and read from the serial port. |
| serial-tcsetattr.are | This script can be used to set/get the attributes of the serial port. |
| serial-udp-server.are | This script reads messages coming from the serial port and forwards them via UDP to a remote host (and vice versa). |
| serial-write.are | This script can be used to write a message to the serial port. |
| sms-control.are | This script will execute commands received by SMS. |
| sms-delete-inbox.are | This script can be used to flush the SMS inbox. |
| sms-read-inbox.are | This script can be used to read the SMS inbox. |
| sms-to-email.are | This script will forward incoming SMS messages to a given E-mail address. |
| sms-to-serial.are | This script can be used to write a received SMS to the serial port. |
| snmp-agent.are | This script extends MIB entries of the SNMP agent |
| snmp-cmd.are | This script issues SNMP set/get commands |
| snmp-trap.are | This script can be used to send SNMP traps |
| status.are | This script can be used to display all status variables |
| syslog.are | Throw a simple syslog message. |
| tcpclient.are | This script sends a message to a TCP server. |
| tcpserver.are | This script implements a TCP server which is able to receive messages. |
| techsupport.are | This transfers a techsupport to a remote FTP server |
| transfer.are | This scripts stores the latest GNSS positions in a remote FTP file |
| udp-msg-server.are | This script will run an UDP server which is able to receive messages and forward them as SMS/E-Mail. |
| udpclient.are | This script sends a message to a remote UDP server. |
| udpserver.are | This script implements an UDP server which is able to receive messages. |
| update-config.are | This script can be used to perform a configuration update |
| voice-dispatcher-audio.are | This script implements an audio voice dispatcher |
| webpage.are | This script will generate a page which can be viewed in the Web Manager |
| write-config.are | This script can be used to set a configuration parameter. |