Skip to main content

Flash open source firmware to M2 Gateway

The SenseCAP M2 gateways represent a cost-effective solution for LoRa gateways, powered by the mature hardware solution MT7628 and the Semtech SX1302 baseband Long Range chip. The specific models are distinguished by the factory-set frequency band (EU868/US915/AS923/AU915), optional module (4G/GPS) and supported LoRa network (LoRaWAN®/Helium network)

This wiki will guide you on how to burn open source firmware for your M2 gateway. Based on the open source firmware, you can deeply customise your M2 gateway, such as adding additional features or changing the operating band (antennas need to be adapted to the band)

Warning

After flashing the open source firmware, you CAN NOT revert to the factory firmware.

Seeed studio is NOT responsible for any damage to the device caused by the user using open source firmware or third party firmware.

Supported Products List

Prepare the firmware

Download the pre-built firmware

If you want to experience open source firmware at your convenience, we provide some compiled firmwares. You can download from Seeed-Solution/LoRa_Gateway_OpenWRT/Release

Note

Make sure you download the firmware for your gateway

E.g. the EU868-4G firmware does not work with M2 gateways(EU868)

Build your firmware

If your gateway does not compatitate with our pre-built firmware or if you want to develop it further, you can build your own firmware as follows

To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system

Step 1: clone the source code from Seeed-Solution/LoRa_Gateway_OpenWRT

git clone https://github.com/Seeed-Solution/LoRa_Gateway_OpenWRT.git

Step 2: Install prerequisite packages refer to Build system setup

Note

Please perform the following steps with a non-root user.

Step 3: Go to the source code folder, Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

Step 4: Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

Step 5: Run cp diffconfig-sensecap-general .config to use SenseCAP diff file, and run make defconfig to expand full config

Step 6: Run make menuconfig to select your SenseCAP Hardware information

  • SenseCAP Hardware->Have 4G ( Whether it contains 4G Hardware)

  • SenseCAP Hardware->Have GPS ( Whether it contains GPS Hardware)

  • SenseCAP Hardware->REGION (select your default REGION)

pir

pir

Step 7: Run make to build your firmware

This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system

After compiling, you can find the firmware named openwrt-21.02.0-ramips-mt76x8-sensecap_wm7628n-squashfs-sysupgrade.bin in the <prj>/bin/targets/ramips/mt76x8/ directory

Flash the firmware

You can flash the firmware into your gateway in one of two ways

Get and Flash firmware via TFTP

Before you begin, you will need to install the TFTP server tool on your computer and place the firmware in the appropriate directory.

Step 1: Use a Type-c cable to connect the device to the computer, and use a network cable to place the device and the computer in the same LAN.

Step 2: Connect to the device using the serial port called USB-SERIAL CH340 with baud rate 57600

Step 3: Restart the device. When the device enters uboot, select command 2 to enter the system update.

Step 4: Enter device ip, where the device ip network segment must be the network segment of your own network; enter server ip, which is the IP of your computer, and enter the name of the firmware to be burned (the file suffix must be included)

pir

Step 5: Wait for the firmware update to complete. The gateway will start installing the firmware and the LED will enter the orange slow blinking state until the installation is completed.

pir

Get and Flash firmware via Luci

Login Luci and navigate to System > Backup/Flash Firmware

pir

Scoll down and navigate to Local upgrade and click Flash image...

pir

Browse folders and upload firmware

pir

When the upload is complete, confirm that the uploaded firmware information is correct and click Continue.

pir

After that, the gateway will start installing the firmware and the LED will enter the orange slow blinking state until the installation is completed.

Login into Console

After the firmware is installed, the device will automatically open an AP hotspot, name SenseCAP_XXXX

Use your phone or computer to connect to the hotspot, no password

Enter 192.168.168.1 in the browser to enter the LuCI interface

pir

Login into console with username root and no password

pir

Resources

Tech Support

Need help with your SenseCAP M2 Gateway? We're here to assist you!

Loading Comments...