From SOWNWiki
Jump to: navigation, search
GL.iNet GL-MiFi
GL.iNet GL-MiFi
Model GL-MiFi
Maker GL.iNet
System on Chip Atheros AR9331
RAM 64MiB0.0625 GiB
65,536 KiB
6.103516e-5 TiB
Flash 16MiB0.0156 GiB
16,384 KiB
1.525879e-5 TiB
Wireless 802.11b/g/n (2.4GHz only)
Ethernet 2 x 100mbits/s (WAN and LAN)
Power 1.0A @ 5VDC (USB micro)
OpenWRT page
Status stalled

The GL iNet MiFi is basically an AR150 with built in 3G/4G modem and battery. It can also be run off the mains, which will charge the battery at the same time.

Gaining Console Access

Console access is on UDP port 6666. There is a script to do this.

To get into the bootloader, press and hold the reset button for 10 seconds at startup.

In actual fact there are 3 modes:

  • Hold reset for 5 seconds - Factory reset
  • Hold reset for 8 seconds - Serial console
  • Hold reset for 10 seconds - Network console

Note that the net console is on the WAN port.

There is a helpful menu that appears over the serial console in this mode, which includes a counter to show how long you have pressed the reset button for:

*        U-Boot 1.1.4  (Jul  9 2015)        *

AP121 (AR9331) U-Boot for GL-AR150

DRAM:   64 MB DDR2 16-bit
FLASH:  Winbond W25Q128 (16 MB)
CLOCKS: 400/400/200/33 MHz (CPU/RAM/AHB/SPI)

** Warning: bad env CRC, using default,
   use 'saveenv' to save it in FLASH

LED on during eth initialization...

Press reset button for at least:
- 5 sec. to run web failsafe mode
- 8 sec. to run U-Boot console
- 10 sec. to run U-Boot netconsole

Reset button is pressed for: 10 

Getting OpenWRT to boot

In progress

There is a build in progress. Requires the flock package to be selected in menuconfig, along with the following kernel modules for usb serial networking support:


Network Configuration

Owing to a bug in openwrt the "demand" option in the configuration file is broken by default. Removing it or following the described fix will allow the wwan interface to come back up.

Excerpt from working /etc/config/network:

config interface 'modem'
	option ifname '3g-modem'
	option proto '3g'
	option country 'country71'
	option sp 'isp16'
	option service 'umts'
	option pincode '****'
	option dialnum '*99#'
	option apn '*********'
	option username '********'
	option password '*****'
	option metric '100'
	option peerdns '0'
	option device '/dev/ttyUSB3'
	option maxwait '20'
	option keepalive '5'
	option demand '0'
	option defaultroute '1'
	option ipv6 '0'
	option dns ' 2001:630:d0::1'



echo "Loading NAT"

/usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/usr/sbin/iptables -t nat -A POSTROUTING -o 3g-modem -j MASQUERADE
/usr/sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

Default UCI firewall zone configuration:

firewall.@zone[1].network='wan' 'wan6'

We can alter this so that 3g-modem and eth0 are in the wan zone, and wlan0 and eth1 are in the lan zone:

uci set firewall.@zone[0].network='wlan0 eth1'
uci set firewall.@zone[1].network='3g-modem eth0'
uci commit firewall
/etc/init.d/firewall reload

Read wwan signal strength

comgt -d /dev/ttyUSB2 sig

Not entirely sure what the output number is, running it in a 'while true' loop with 1 second sleeps in between I saw values ranging from "99,99" to "0,99" with the node in various orientations and with various obstructions in the signal path. According to this PDF the number before the comma is the signal strength.

... more about "GL-MiFi"
Atheros AR9331 +
2 x 100mbits/s (WAN and LAN) +
0.0156 GiB (16 MiB, 16,384 KiB, 1.525879e-5 TiB) +
GL.iNet +
0.0625 GiB (64 MiB, 65,536 KiB, 6.103516e-5 TiB) +
GL-MiFi +
1.0A @ 5VDC (USB micro) +
802.11b/g/n (2.4GHz only) +