User application examples Content ..............................3 BSTRACT ..........................3 OCUMENT ONTROL ..............................3 RADEMARK ............................5 IST OF IGURES 1. I ............................6 NTRODUCTION 1.1 Purpose ............................. 6 2. U ......................7 SER APPLICATION ENVIRONMENT 3. E ..............................8 XAMPLES 3.1 Connection and access of FTP server....................
User application examples 1. Introduction Geneko Cellular Routers (GWR-HS, GWR362, GWR462, GWRI-362, GWRI-462 and GWG models) support use of user applications, thereby extending standard router functionality. Supported languages for user applications are: • Shell scripts (sh, bash, dash) • •...
There is possibility to user write his/her own examples. In directory /home/admin user can make new directories, write scripts, applications to extend router functionality. In folder startup are stored scripts, that need to be started during the startup of the router. geneko:~# cd /home/admin geneko:~# ls startup/ All exiting examples are stored in directory /home/examples.
3.1 Connection and access of FTP server In this example is described configuration of FTP connection. geneko:/home/examples# vi ftp_connect Figure 2 – ftp_connect script geneko:/home/examples# cp /home/examples/ftp_connect /home/admin/startup/ geneko:/home/examples# reboot Use FileZilla client for connection and access of FTP server. Figure 3 – FileZilla client 3.2 Get modem info...
User application examples 3.3 Read data from serial port In this example is described reading data from serial port and reply back to sender. geneko:/home/examples#./serial_read_example Figure 5 – Result after execution serial_read_example geneko:/home/examples#vi serial_read_example Figure 6 – Display serial_read_example...
User application examples 3.4 Read received SMS messages In this example is described the possibility of a modem GWG Gateway to receive SMS messages. geneko:/home/examples#./read_sms_perform_action Figure 7 – Result after execution read_sms_perform_action geneko:/home/examples#vi read_sms_perform...
User application examples Figure 8 – Display read_sms_perform #1 3.5 Remove SIM card PIN In this example is described information about SIM card PIN and PUK code and possibility to unlock SIM card. geneko:/home/examples#./remove_sim_card_pin Figure 9 – Result after execution remove_sim_card_pin...
User application examples geneko:/home/examples#vi remove_sim_card_pin Figure 10 – Display remove_sim_card_pin 3.6 Report ppp_0 status In this example is described basic information about ppp_0 status, mobile provider, APN, username, password and etc.. geneko:/home/examples#./report_ppp_status...
User application examples Figure 11 – Result after execution report_ppp_status geneko:/home/examples#vi report_ppp_status Figure 12 – Display report_ppp_status 3.7 Router Network configuration In this example is described making router network configuration. There is the possibility of exporting the new configuration via web interface.
User application examples 3.8 Connect and access of TCP server In this example is described reading data from TCP socket and return reply. geneko:/home/examples#./tcp_server_example Figure 15 – Result after execution tcp_server_example Use PuTTY for connection on port 7777, connection type is Telnet.
3.9 SMS Send In this example is described sending sms when the strength of a signal is lower than recommended. geneko:/home/examples#./sms_send Enter the phone number in the form +31625670634: +381640140555 <ENTER> The signal strength is in the recommended range. Signal strength is 19.
User application examples Figure 18 – Display sms_send 3.10 E-mail send In this example is described sending e-mail. geneko:/home/examples#$ ./smtp.netcat.test mx.example.com 25 from@example.com to@example.com Figure 19 – Result after execution script send_e-mail geneko:/home/examples#vi send_e-mail...
Input value is readable (high=1, low=0). Output value is writable (high=1, low=0). 3.11.1 gpio_functionality In this example is described GPIO functionality supported by service gpio. admin@geneko>service gpio service gpio -i read value of an input GPIO service gpio -o write value to an output GPIO (gpio_id must be specified) service gpio -g <gpio_id>...
In this example is described, when gpio pin change its state, GWG Gateway read combined value of all GPIO inputs. If the state of GPIO pins is changed, GWG Gateway sends sms. geneko:/home/examples#./gpio_send_sms.sh Figure 23 - Result after execution gpio_send_sms.sh...
Need help?
Do you have a question about the GWR Series and is the answer not in the manual?
Questions and answers