Geneko GWR Series User Application Examples

Cellular routers
Hide thumbs Also See for GWR Series:

Advertisement

User application examples
User Application Examples
on Geneko Cellular Routers
Document version: 1.2
Date: September 2016
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the GWR Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Geneko GWR Series

  • Page 1 User application examples User Application Examples on Geneko Cellular Routers Document version: 1.2 Date: September 2016...
  • Page 3: Document

    Name Creation: Author Tanja Savic Review Role Name Approval: Team Leader Darko Kojic Trademark Geneko ® is the registered trademark of Geneko Company. © 2016 Geneko Company. All rights reserved. Copying of this document or parts of it is prohibited.
  • Page 4: Table Of Contents

    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....................
  • Page 5: List Of Figures

    User application examples List of Figures Figure 1 – GWG Gateway display of examples ..................7  Figure 2 – ftp_connect script......................... 8  Figure 3 – FileZilla client ..........................8  Figure 4 – Result after execution get_modem_info ................... 9  Figure 5 – Result after execution serial_read_example................10  Figure 6 –...
  • Page 6: Introduction

    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) • •...
  • Page 7: User Application Environment

    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.
  • Page 8: 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...
  • Page 9: Figure 4 - Result After Execution Get_Modem_Info

    User application examples geneko:/home/examples#./get_modem_info Figure 4 – Result after execution get_modem_info...
  • Page 10: Read Data From Serial Port

    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...
  • Page 11: Read Received Sms Messages

    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...
  • Page 12: Remove Sim Card Pin

    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...
  • Page 13: Report Ppp_0 Status

    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...
  • Page 14: Router Network Configuration

    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.
  • Page 15: Figure 13 - Result After Execution Router_Network_Configuration_Example

    User application examples Figure 13 – Result after execution router_network_configuration_example geneko:/home/examples#vi router_network_configuration_example Figure 14 – Display router_network_configuration_example #1...
  • Page 16: Connect And Access Of Tcp Server

    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.
  • Page 17: Sms Send

    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.
  • Page 18: E-Mail Send

    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...
  • Page 19: General Purpose Input/Output (Gpio)

    User application examples Figure 20 – Display send_e_mail 3.11 General Purpose Input/Output (GPIO)
  • Page 20: Gpio_Functionality

    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>...
  • Page 21: Gpio_Send_Sms

    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...
  • Page 22: Figure 24 - Gpio_Send_Sms

    User application examples geneko:/home/examples# vi gpio_send_sms.sh Figure 24 - gpio_send_sms...
  • Page 24 User application examples GENEKO Bul. Despota Stefana 59a 11000 Belgrade • Serbia Phone: +381 11 3340-591, 3340-178 Fax: +381 11 3224-437 e-mail: gwrsupport@geneko.rs www.geneko.rs GWR User App Examples Rev. C Sep 16...

This manual is also suitable for:

Gwr-hsGwr362Gwr462Gwri-362Gwri-462Gwg

Table of Contents