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
16. Create your own web pages
17. Voice control functions
18. SNMP functions
19. Various network-related functions
20. Other system-related functions
The SDK API manual at menu SERVICES-Administration-Troubleshooting-SDK API provides an
overview but also explains all functions in detail.
Please note that some functions require the corresponding services (e.g. E-Mail, SMS) to be properly
configured prior to utilizing them in the SDK.
Let’s now pay some attention to the very powerful API function nb_status. It can be used to query the
router’s status values in the same manner as they can be shown with the CLI. It returns a structure of
variables for a specific section (a list of available sections can be obtained by running cli status -h).
By using the dump function you can figure out the content of the returned structure:
/* Dump current WAN status */
dump ( nb_status ("wan") );
The script will then generate lines like maybe these:
struct(22): {
.WANLINK1_STATE = string[2]: "up"
.WANLINK1_STATE_UP_SINCE = string[19]: "2016-09-23 12:59:08"
.WANLINK1_DIAL_ATTEMPTS = string[2]: "19"
.WANLINK1_SIGNAL_LEVEL = string[2]: "19"
.WANLINK1_DATA_UPLOADED = string[7]: "3309773"
.WANLINK1_MODEM = string[7]: "Mobile1"
.WANLINK1_NETWORK = string[7]: "O2 - CZ"
.WANLINK1_DIAL_SUCCESS = string[2]: "19"
.WANLINK1_ADDRESS = string[11]: "10.203.0.29"
.WANLINK1_SIGNAL_QUALITY = string[4]: "weak"
.WANLINK1_DOWNLOAD_RATE = string[2]: "12"
.WANLINK1_SERVICE_TYPE = string[4]: "HSPA"
.WANLINK1_UPLOAD_RATE = string[2]: "12"
101
© RACOM s.r.o. – MG102iGPRS/UMTS/HSPA+/LTE router
Web Configuration
Summary of Contents for MG102i
Page 2: ......
Page 147: ...147 RACOM s r o MG102iGPRS UMTS HSPA LTE router Web Configuration...
Page 174: ...174...