Ethernet 3G Router application

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:

  1. 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
  2. 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.

Setup procedure:
• Configure APN.
• Load and start the “EthernetRouter.wp85.update” Legato application onto your device. The scripts should be running and creating log files


  1. Disable your WiFi interface on your PC.
  2. Connect via Ethernet to the FX30. Confirm you PC has a DHCP address such as
  3. You should be able to ping
  4. You should be able to browse the internet and do normal things (depending on your connection qualify of course).

Key Point:
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 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)

Hello everybody,
Thanks for this application, very interesting.
However, it does not work with my FX30… Maybe I have misunderstand something ?
So first of all, I need to enter a pin to unlock the sim. I need to send “cm sim enterpin xxxx” to make the red led switch to amber. Is it possible to add it into the file ?
After that, the FX30 seems connected, so I plug my computer on the Ethernet port. The second led is blinking green (sometime switch to red before going back to flashing green).
At this step, the attributed IP address looks good ( But no ping on And no Internet access on my computer.

Here the log :

LE_LOG_LEVEL=DEBUG PATH=/legato/systems/current/apps/EthernetRouter/read-only/bin:/usr/local/bin:/usr/bin:
/bin PWD=/legato/systems/current/appsWriteable/EthernetRouter
attempting connect
normal exit from fsegate setup

Any idea to help me would be very nice !

I just got this working on an FX30, built using current WP77 tools under VScode+Leaf. There was a small typo on line 49 of (unmatched double-quote near the end of the line) which prevented auto-reconnect from working, but once I fixed that it was OK.