Blonde Guy

Home Products Computers Suntan Special ArcaOS OS/2 Contact

MangoCom by Blonde Guy

Mango router

MangoCom is an OS/2 program to configure the Mango router running GL.iNet software. The Mango router is a travel router running open source software. MangoCom is itself open source and is offered free to OS/2 users.

GL.iNet uses a web interfact for configuration. Some versions of GL.iNet software cannot configure on ArcaOS or on other OS/2-based platforms because our Firefox 45 web browser is too old. The MangoCom software overcomes this limitation by using the OS/2 port of curl to do the communications with the router.

The current version of GL.iNet can be configured using our Firefox 45 on ArcaOS, OS/2 or eCS. If you have an older version of GL.iNet software, I recommend using a Windows, Mac or Linux computer to upgrade to the latest router firmware (see version numbers below).

Latest firmware: V3.203 - Aug 3, 2021: works on Firefox 45 for OS/2

Defective firmware: V3.102 - Apr 15, 2020: does not work on Firefox 45 for OS/2

MangoCom is a Rexx program that does basic operations to the Mango router to bring the internet to OS/2 machines that lack a direct, wired Ethernet connection.


MangoCom download

Download
MangoCom version 0.90 (8,468 bytes)

MangoCom commands

MangoCom is a rexx program. Users enter the MangoCom command from an OS/2 Window. It takes the following commands at the command line or in a program object.

JOIN

With join as the only argument, MangoCom will wait for TCP/IP, wait for router, scan and print list of available access points, then prompt for the name of the access point to join. If the access point is configured for security, MangoCom will prompt for a password.

LIST

With list as the only argument, MangoCom will wait for TCP/IP, wait for router, then print list of access points known to the router.

FIRM

With firm as the only argument, MangoCom will wait for TCP/IP, wait for router, then print the firmware version of the router.

The most recent Mango router had firmware 3.201 compiled on 2021-04-02 and a newer version, 3.203 is available.

The Mango router that caused me to write mangocom was version 3.102 compiled on 2020-04-28. 3.203 is available.

SCAN

With scan as the only argument, MangoCom will wait for TCP/IP, wait for router, then scan for a list of local access points.

ENABLE

With enable as the only argument, MangoCom will wait for TCP/IP, wait for router, then enable the repeater mode.

Settings

Settings are stored in a plain text file, mangocom.rc

jDebug
Debug flag (0 for no debug messages)
routerIP
Router address
routerPassword
Router admin password
tempDir
normally taken from the environment variable TEMP
tempFile
file to store results from curl and other utilities
timeout
Time to wait for the router before giving up
LogDir
normally taken from the environment variable LOGFILES
LogName
file to store log

Usage

Plug the router into the laptop and boot the laptop. When the desktop appears, the system is ready to run MangoCom. MangoCom runs at the OS/2 command line. Open an OS/2 Window to use MangoCom. The Ethernet cable should connect the LAN port of the router to the Ethernet port of the laptop. The USB cable should connect the Power port of the router to any USB power source, which is likely a USB port on the laptop.

Once power is applied, the router will light one LED, then, if it finds a WiFi service, a second LED will light. In this configuration, the laptop will be connected to the WiFi access point, and presumably the Internet, onces it is booted.

If the access point is already known to the router, then run mangocom with no parameter. The command will complete when the internet connection is ready or the timeout is reached.

If the access point is NOT known to the router, then run mangocom JOIN. The command will display all available access points, then prompt for the SSID of the access point to be used. If the access point has security, then the command will prompt for the password. The command will then either wait for internet to be ready or end with an error, for example wrong password.

Story

I found myself writing a program to control the Mango router. How did I come to want to do this?

I sell and use laptops with the ArcaOS operating system. These laptops use and need WiFi, but there are not OS/2 compatible drivers so the hardware is unavailable. I decided to use aTravel Router connected to the laptop ethernet port to provide WiFi support.

As I tried one Travel Router after another, I found that they are barely adequate for the task, and that some access points remain unavailable. But the Mango travel router, running open source GL.iNet software, was the best at what I needed.

I wrote about using Travel Routers on OS/2 on my website.

Travel Routers for OS/2 Users

But then GL.iNet released version 3 of their software, and the web configuration screens required a newer web browser than the Firefox 45 available to OS/2 users. Once the new Otter Browser is released, that will be able to use the web interface on the router. But until that time, there was no convenient way to configure the router from OS/2.

I asked around and found that there is an API available to control the router using the curl program. There is a recent port of curl for OS/2, so I saw a possible answer to my problem. I wrote the MangoCom rexx program to test curl controlling the Mango router. I figured out how to send commands and get back a file that contained the response from the router.

GL.iNet API

But another problem appeared. The GL.iNet API returns its information as a JSON object. I needed to find an OS/2 parser for the JSON object. I found a nice REXX JSON parser on OS/2 World. And that is what is used in the MangoCom 0.90 beta.

I have now reached the limits of the REXX parser for JSON objects. A future version of MangoCom will have to overcome these limits. Another factor is that if the OS/2 web browser is released, the MangoCom router can be easily controlled from there. A further factor is that the OS/2 WiFi driver may eventually be released, making the Travel Router superfluous.