The attached Legato application allow to setup your FX30 as a Ethernet/3G Router. Note that the firewall rule used is just NOT to be used for deployment as it opens everything.
The “HelloWorld App is used to create a minimal legato skeleton in “C” language source code. The FSEgate application chooses a simple approach to use FX30 shell scripting combined with the FX30 tools API. Alternatively, the entire functionality of FSEgate could be coded in “C”. However the shell scripting approach was chosen because the scripts could be developed and tested directly in the FX30 terminal window.
The scripts perform operating system actions and legato API calls during the FX30 boot process as follows:
- fsegate.sh is executed one time to do the interface and call setup
a. upon start the User LED is set RED and after connection is made it is SET GREEN
- fselinkmon.sh is executed to periodically monitor the cell connection and if a failure is detected, to perform a reconnect.
a. During the monitoring the User LED is GREEN and toggling ON/OFF
Note that two files are specified in order to explore that aspect of the packaging and to provide loose coupling between the initial setup and the monitoring. Also, as will be evident by inspecting the fsegate.adef file, this makes it easy to disable the monitoring function by a simple edit. However the loose coupling means that the monitoring script requires a delay at start up in order to not interfere with the initial setup.
• Configure APN.
• Load and start the “EthernetRouter.wp85.update” Legato application onto your device. The scripts should be running and creating log files
- Disable your WiFi interface on your PC.
- Connect via Ethernet to the FX30. Confirm you PC has a DHCP address such as 192.168.13.8
- You should be able to ping 188.8.131.52
- You should be able to browse the internet and do normal things (depending on your connection qualify of course).
The Windows USB driver does not setup a default gateway on the PC so you can only connect to the FX30 and not to any external entity. However the fsegate.sh does this for the Ethernet interface during the DHCP assignment. Therefore you have a fully operational data path via Ethernet.
EthernetRouter.rar (77.5 KB)