Showing posts with label GL-MT300N-V2. Show all posts
Showing posts with label GL-MT300N-V2. Show all posts

Monday, February 02, 2026

Remote-Kit: Pocket Router for Remote Hardware Bring-up

A compact "lab-in-a-box" that turns a $30 GL-MT300N-V2 pocket router into a remote hardware bring-up station. You get serial console, PoE power control, SD card image swapping, USB power cycling, PiKVM video/keyboard, and a camera feed over a single box.

Last updated: February 2, 2026

Quick start: Flash the Remote-Kit firmware, log in at http://192.168.20.1, wire in PoE switch + PiKVM, then update port-forwards to match device IPs.

What Remote-Kit does

  • Serial terminal to the DUT over SSH (screen)
  • Virtual SD card image loading via SDWire (no physical card swaps)
  • Remote USB power cycle (Tasmota-based XY-WSUSB)
  • PoE power on/off and power measurements (Netgear GS308EP)
  • PiKVM remote display + USB keyboard/mouse emulation
  • Optional USB webcam stream for bench visibility
  • FTP/TFTP for bootloader RAM loading

System overview

Hardware setup diagram for Remote-Kit with Raspberry Pi 4 as DUT

Example bench wiring for a Pi 4 DUT with PoE power, PiKVM, SDWire, and camera.

Security note: Default credentials — Remote-Kit SSH: root / remote-kit-000, PoE switch (GS308EP): password, WiFi SSID/key: remote-kit-000 / remote-kit-000. Change all default passwords before exposing any service to your corporate or public network.

Hardware (Bill of Materials)

Below is a reference setup for a Raspberry Pi 4 as DUT. Prices are from the time of writing and will vary.

Item Qty Unit Price (EUR) Notes
GL.iNet GL-MT300N-V2130Remote-Kit router
5V MicroUSB PSU (router)1105V/3A adapter
Netgear GS308EP PoE switch190PoE power control + measurements
5V PoE splitter (USB-C)215Power PiKVM + DUT
3-port USB hub15Any basic hub
USB flash drive (16 GB)110Image storage
Raspberry Pi 4250One for PiKVM, one as DUT
MicroSD card (16 GB+)110PiKVM image
Geekwork PiKVM kit185PiKVM hardware
USB webcam (UVC)170Bench visibility
Tasmota WiFi smart socket110Power control (alt to PoE)
USB-TTL serial adapter115Serial console
Sinilink XY-WSUSB dongle18USB power cycle (Tasmota)
SDWire (SD card mux)190Virtual SD card swapping

Firmware and services

  • Custom OpenWrt image for GL-MT300N-V2
  • Port forwarding for PiKVM, PoE switch, camera, and smart plugs
  • SSH access for scripted automation
  • Utilities: screen, ntgrrc, SDWire scripts

Setup steps

  1. Flash the Remote-Kit firmware to the GL-MT300N-V2 (source on GitHub).
  2. Connect your PC to the LAN side and log in to http://192.168.20.1.
  3. Connect WiFi accessories (smart socket, XY-WSUSB) to SSID remote-kit-000 (key: remote-kit-000).
  4. Wire PoE switch, PiKVM, SDWire, and camera to the LAN ports.
  5. Change the default GS308EP password from password to something secure.
  6. Update port-forwards in OpenWrt to match your device IPs.

The firmware ships with these default port-forward rules (all via the router's LAN IP):

Service Port
OpenWrt UI80
USB webcam8080
PoE switch (GS308EP)8081
PiKVM4433
Nous smart socket8082
XY-WSUSB dongle8083
Remote-Kit setup diagram: pocket router controlling PoE switch, PiKVM, SDWire, webcam, and DUT

Setup diagram for overwriting OEM firmware and wiring up the Remote-Kit router.

Access points: OpenWrt UI on http://remote-kit-000, PiKVM on https://remote-kit-000:4433, PoE switch on http://remote-kit-000:8081.

Common remote workflows

1) Load a new SD image onto the DUT

ssh root@remote-kit-000  #pw: remote-kit-000
root@remote-kit-000:~# wget -O /mnt/sda1/libreelec-image.img.gz https://releases.libreelec.tv/LibreELEC-RPi4.aarch64-11.95.1.img.gz
root@remote-kit-000:~# ntgrrc login --password Remotekit000 --address GS308EP
root@remote-kit-000:~# ntgrrc poe set -p 1 --power disable --address GS308EP
root@remote-kit-000:~# sd-wire-load-image.sh /mnt/sda1/libreelec-image.img.gz
root@remote-kit-000:~# ntgrrc login --password Remotekit000 --address GS308EP
root@remote-kit-000:~# ntgrrc poe set -p 1 --power enable --address GS308EP
root@remote-kit-000:~# #LibreElec will now boot on Pi-4-DUT - you can see this booting from a remote location using PiKVM's WebUI.

2) Power cycle the DUT (PoE)

ssh root@remote-kit-000  #pw: remote-kit-000
ntgrrc login --password Remotekit000 --address GS308EP
ntgrrc poe set -p 1 --power disable --address GS308EP
ntgrrc poe set -p 1 --power enable --address GS308EP

3) Open serial console

ssh root@remote-kit-000  #pw: remote-kit-000
screen -R serial /dev/ttyUSB0 115200

4) Simulate Ethernet cable unplug

ssh root@remote-kit-000  #pw: remote-kit-000
ntgrrc login --password Remotekit000 --address GS308EP
ntgrrc port set -p 1 -s 'Disable' --address GS308EP  #unplug
ntgrrc port set -p 1 -s 'Auto' --address GS308EP     #plug

5) Measure PoE power draw

ssh root@remote-kit-000  #pw: remote-kit-000
ntgrrc login --password Remotekit000 --address GS308EP
ntgrrc poe status --address GS308EP       #print status in table format
ntgrrc poe status --address GS308EP -f json  #print in json format

Large images: The router has limited RAM — do not decompress multi-GB images on it. For large files (e.g. raspios-bookworm-arm64.img.xz at 2.4 GB): decompress on your PC first, then scp the raw .img to /mnt/sda1/, and run sd-wire-load-image.sh.

Use cases

  • Remote OS image testing for embedded boards
  • Regression testing of bootloaders and kernels
  • Remote lab access for distributed teams
  • Automated power and peripheral cycling in CI pipelines

Sunday, March 10, 2024

Pocket Router as a Portable DLNA Media Server

Turn a ~$30 GL-MT300N-V2 pocket router into a standalone DLNA media server — no internet required. Flash a custom OpenWrt firmware, plug in a USB drive with your media files, and any device on the Wi-Fi hotspot can stream via VLC or any DLNA client.

In-car infotainment setup: pocket router with USB media drive powered by 12V-to-5V adapter

In-car setup: pocket router powered by a 12 V-to-5 V adapter, paired with a USB media drive. All smart devices on the hotspot can stream via DLNA.

What you need

  • GL-MT300N-V2 pocket router (~$30)
  • USB flash drive or USB hard drive (NTFS formatted)
  • 5 V DC power source (USB charger, power bank, or 12 V-to-5 V adapter for car use)
  • VLC Player (or any DLNA client) on your smartphone or tablet

Setup steps

  1. Download the custom firmware — get gl-mt300nv2-dlnasrv.bin (~13 MB), an OpenWrt-based image with DLNA pre-configured.
  2. Flash the firmware — replace the OEM firmware on your GL-MT300N-V2 with the downloaded gl-mt300nv2-dlnasrv.bin file.
  3. Prepare your media disk — format a USB drive as NTFS and copy your media files into Audio/, Video/, and Photo/ folders.
  4. Power on — attach the media disk to the router's USB port and power the router with a 5 V source.
  5. Connect to Wi-Fi — the router broadcasts a hotspot with SSID dlnaserver and password goodlife.
  6. Open VLC — install VLC Player on your device, connect to the hotspot, and navigate to Local Network. The DLNA server (penguin icon) will appear with all your media files.

Default credentials: SSID = dlnaserver, password = goodlife. These are for initial setup only — change them immediately (see Security section below).

Step-by-step screenshots

The following image walks through the full flashing and configuration process in 16 slides:

Step-by-step setup guide for GL-MT300N-V2 DLNA server (16 slides)

Complete setup walkthrough: firmware flash, USB disk preparation, Wi-Fi connection, and VLC media browsing.

After following all 16 slides, connect your smartphone or tablet to the dlnaserver hotspot (password goodlife) and open VLC to browse media over the local network.

VLC Player showing DLNA server with media files

VLC Player on Android showing the DLNA server and available media files.

In-car infotainment use case

For those with an extensive multimedia collection, this compact DLNA server works well as an in-car infotainment system. Passengers can stream local media on their smartphones or tablets via the shared Wi-Fi hotspot — no mobile data or internet connection needed. This is especially useful during long drives through areas with poor network coverage.

The setup is simple: a pocket router powered by a 12 V-to-5 V DC adapter, paired with a USB media drive. When powered on, it creates a Wi-Fi hotspot and serves files over DLNA to all connected devices.

Security

Change the default credentials immediately. Modify the web UI login password, Wi-Fi SSID, and Wi-Fi password through the standard OpenWrt web interface at http://192.168.8.1.

Sunday, October 09, 2022

$30 Pocket Router as an AWS IoT Edge Device

How to flash a ~$30 GL.iNet MT300N-V2 pocket router with a custom OpenWrt image that includes the AWS IoT Device SDK and an aws-iot-pubsub-demo application — turning it into an AWS IoT Edge device that can feed local sensor data to the cloud.

GL.iNet MT300N-V2 pocket router as AWS IoT Edge device

GL.iNet MT300N-V2 pocket router — ready to become an AWS IoT Edge device.

Quick overview

Three steps to turn your pocket router into an AWS IoT Edge device:

  1. Flash the OEM firmware with the custom gl-mt300nv2-awsiot-demo.bin
  2. Upload your AWS-generated device certificate and private key via the web UI
  3. Reboot and watch Hello World messages published to your AWS IoT Core

Flashing the firmware

Step 1 — Connect your PC to the pocket router via Ethernet and power it on. Wait for the LED to stop blinking.

Setup diagram — PC connected to pocket router

Setup: PC connected to the pocket router via Ethernet cable.

Step 2 — Open http://192.168.8.1/cgi-bin/luci/admin/system/flashops in your browser (or follow GL.iNet's onboarding process).

Step 3 — Find the firmware upgrade menu and flash with gl-mt300nv2-awsiot-demo.bin.

Important: Disable "Keep settings" — you want to start with default settings.

Step 4 — Wait about 2 minutes until the LEDs stop blinking.

Step 5 — Disconnect and reconnect the Ethernet cable on your PC so it gets a new IP in the 192.168.20.x range.

Step 6 — Navigate to http://192.168.20.1 — you should see the new web UI:

Custom firmware web UI

Custom firmware web UI after successful flash.

AWS IoT configuration

Step 7 — Upload your device certificate and private key files through the web UI:

Certificate and key upload page

Upload your AWS-generated device certificate and private key.

Step 8 — Go to AWS-IoT → Service Settings, enter your endpoint, and click Save & Apply.

Before clicking Save & Apply, ensure your security policies on console.aws.amazon.com are set up correctly (see Step 10 below).

AWS IoT service settings page

Service Settings — enter your AWS IoT endpoint here.

Step 9 — Check the Service Log. If everything is configured correctly, you should see a "connection success" message:

Service log showing connection success

Service Log — "connection success" confirms the router is connected to AWS IoT Core.

Step 10 — On console.aws.amazon.com, ensure your security policies are set correctly:

AWS IoT security policies

AWS IoT security policies — required permissions for the device.

Testing publish and subscribe

Step 11 — On console.aws.amazon.com, subscribe to topic test/topic to see Hello World messages published from your pocket router. By default, the demo publishes 10 messages at 5-second intervals. To publish continuously, increase the Publish Count in the Service Settings page.

AWS IoT Core showing Hello World messages

AWS IoT Core — Hello World messages arriving from the pocket router.

Step 12 — To test the subscribe action, publish a JSON message to topic test/topic_led from the AWS console to control the router's LED:

{"powerstate" : "on"}
{"powerstate" : "off"}
Publishing LED control messages from AWS console

Publishing LED control commands from the AWS IoT console.

Other use cases

The pocket router can act as a gateway between AWS IoT Core and local Wi-Fi or USB-connected devices:

Use case diagram — pocket router as IoT gateway

Possible use cases — the pocket router bridges local devices to AWS IoT Core.

SOURCE CODE

github.com/hackboxguy/openwrt-wrapper — build instructions and sources

gl-mt300nv2-awsiot-demo.bin — pre-built firmware image