0% found this document useful (0 votes)
452 views78 pages

G1-E-cherry Configuration Guide

Uploaded by

Khỉ Ngố
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
452 views78 pages

G1-E-cherry Configuration Guide

Uploaded by

Khỉ Ngố
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Product Configuration Guide

PRODUCT CONFIGURATION GUIDE

MODEL NO/DESCRIPTION
Product Name: Bluetooth® Smart IoT Gateway
Model: G1-E-cherry

Version V001

release time 2022-01-22

Website:www.minew.com Email: [email protected] 1


SHENZHEN MINEW TECHNOLOGIES CO LTD

Table of contents
Preface............................................................................................................................................. 1

1. Basic Configuration..................................................................................................................... 1

1.1 Configuration Method........................................................................................................1

1.2 Login Password of Configuration Page............................................................................. 5

1.3 AP Configuration............................................................................................................... 6

2. Network Configuration................................................................................................................ 9

2.1 Ethernet Connection........................................................................................................ 10

2.2 Wireless connection......................................................................................................... 13

3. Data Collection & Service Access............................................................................................. 20

3.1 Data Collection................................................................................................................ 20

3.2 Service Access................................................................................................................. 30

3.3 Data Filtering................................................................................................................... 39

3.4 Scan Parameter Configuration......................................................................................... 41

3.5 Remote Control (Only MQTT ).......................................................................................43

3.6 Disconnected Storage...................................................................................................... 57

4. Other Configuration...................................................................................................................57

4.1 Top Lights Settings.......................................................................................................... 57

4.2 Time Configuration..........................................................................................................60

4.3 Automatic Management...................................................................................................62

4.4 Firmware Upgrade........................................................................................................... 63

4.5 Troubleshooting............................................................................................................... 71

4.6 Restart the Gateway......................................................................................................... 72

4.7 Factory Reset................................................................................................................... 73

4.8 Brick Rescue Mode..........................................................................................................74

5. Statement................................................................................................................................... 75
Website:www.minew.com Email: [email protected] 2
SHENZHEN MINEW TECHNOLOGIES CO LTD

Preface

This specification applies to the G1-E-cherry model gateway.


revision date author describe

1. Support relay function


2. Add network troubleshooting on the web page
3. Support uploading files through the browser
4. Add configuration options to control whether
empty data is uploaded
V001 2022.02.25 Hobart 5. Add the wan_ip field to the configuration
information obtained by the remote control
getConfig command
6. Delete automatic restart and timing restart module
7. Add the description of the function of saving
bricks

1. Basic Configuration

The gateway device can be configured through a web configuration interface.

1.1 Configuration Method

There are two ways to enter the web configuration page of the gateway.

1.1.1 Use AP mode to enter the configuration page

AP mode is only used for gateway configuration, and will not affect the current networking

mode of the gateway as a client.

AP mode provides WiFi hotspot with SSID name "GW-XXXXXXXXXXXX", where

XXXXXXXXXXXX is the hexadecimal uppercase characters corresponding to the gateway

MAC address. Users can scan and connect with a computer or mobile phone. By default, no

Website:www.minew.com Email: [email protected] 1


SHENZHEN MINEW TECHNOLOGIES CO LTD

password is required to connect to this WiFi hotspot. In order to control access rights, you can

modify the AP SSID name in the WEB configuration interface, and the IP address needs to be set

to the format of 192.168.X.1 (the subnet segment of the gateway cannot be the same as the

network segment of the access route 1), and set the WiFi connection password.

After connecting to the gateway WiFi, use a computer or mobile phone browser to open the link:

http://192.168.99.1 to enter the login interface of the configuration interface (see the figure

below).

The interface fields are described in detail below.

field name describe


MAC Address Gateway The gateway MAC address in hexadecimal lowercase
MAC characters.
Firmware Firmware The firmware model of the gateway
Model model
WiFi WiFi The firmware version number of the WiFi in the gateway

1
Network segment: For example, IP: 192.168.X.1, when the X is the same, the network segment is the same,
and when the X is different, the network segment is different.

Website:www.minew.com Email: [email protected] 2


SHENZHEN MINEW TECHNOLOGIES CO LTD

Firmware firmware
Version version
BLE Firmware BLE The firmware version number of BLE in the gateway
Version firmware
version
Network Mode network Displays the mode in which the gateway connects to the
mode network. There are two modes ethernet. When the wireless is
not connected, it is displayed as N/A.
WAN IP Internet IP The IP obtained by connecting to the external network as a
address client is displayed as N/A when not connected
Disabled Whether to Turn off or turn on WiFi hotspot
turn off WiFi
Hidden Whether to Hide or show WiFi hotspots
hide WiFi
SSID AP SSID Configure the SSID in AP mode
Key AP password Configure the connection password in AP mode, more than 8
passwords
LAN IP AP intranet Configure the IP in AP mode, the default is 192.168.99.1
Address IP address
New Password Set a new Login password for configuring the gateway configuration
login page
password
Confirm confirm the Login password for configuring the gateway configuration
Password new login page
password

1.1.2 Enter the Configuration Page In The LAN

As long as the devices with browsers such as computers and mobile phones are in the same LAN

as the gateway, the computer can enter the configuration page of the gateway by entering the IP

address in the browser instead of connecting to the WiFi hotspot of the gateway. It's just that the

Website:www.minew.com Email: [email protected] 3


SHENZHEN MINEW TECHNOLOGIES CO LTD

IP address is no longer 192.168.99.1, and the IP address obtained by the gateway needs to be

scanned by the ARP scanning tool.

View through router

Some enterprise-level routers can view the ARP list (the list of IP addresses and MAC addresses)

on the management page of the router.

View from a Linux computer

 Take Ubuntu as an example, install the arp-scan command

$ sudo apt-get install arp-scan

 Run the command to view the IP-MAC list

$ sudo arp-scan -l

 Run the command to filter out the MAC address of the gateway

$ sudo arp-scan -l | grep "ac:23"

View from a Windows computer

Download the arp-scan tool from github https://github.com/QbsuranAlang/arp-scan-windows-

If your LAN is 192.168.0.1, the subnet mask is 255.255.255.0

Run the command as follows:

arp-scan -t 192.168.0.1/24

The meaning here is to scan the LAN IP: 192.168.0.x (from 192.168.0.1 to 192.168.0.255). 24

Website:www.minew.com Email: [email protected] 4


SHENZHEN MINEW TECHNOLOGIES CO LTD

means the number of binary 1s in the subnet mask (255.255.255.0).

View through the batch configuration assistant developed by our company

The batch configuration assistant is a tool for batch configuration based on the local area

network. It can scan the IP address of the gateway in the local area network. If necessary, you

can contact our sales team.

1.2 Login Password of Configuration Page

The default login password on the gateway configuration page is empty, and you can log in

Website:www.minew.com Email: [email protected] 5


SHENZHEN MINEW TECHNOLOGIES CO LTD

directly by clicking login. For security, please set the administrator login password in ADMIN

PASSWORD on the "status" page.

1.3 AP Configuration

The hotspot AP of the gateway WiFi is always on by default and does not require a password to

connect. You can hide or close the AP hotspot, and you can also set the connection password in

AP mode. There are two ways to control the AP of the gateway WiFi: through the reset button of

the gateway or through the web page configuration.

Note: The shutdown of the WiFi hotspot will not affect the current gateway's networking

method as a client.

1.3.1 Turn Off or Turn On The AP

1. Reset key:

In the fully activated state, that is, when the gateway lights are dynamically bright, use a sharp

object to press and hold the reset button of the device through the reset hole for less than 2

seconds and then release it, which will turn on or off the hotspot AP of the gateway WiFi.

Note: Press and hold the Reset button for no more than two seconds, and the factory settings will

be restored when the time exceeds 5 seconds.

2. Web page configuration:

Close the AP : Check the "Disabled" option in the "Status" page , click the "Save" button,

click the "Apply" button, a pop-up will ask whether to restart the gateway service immediately

(see the figure below), click "Apply" to take effect immediately , and then click "OK". Then

refresh the page, wait for the gateway service to restart and update the interface information, as

shown in the following figure.

Website:www.minew.com Email: [email protected] 6


SHENZHEN MINEW TECHNOLOGIES CO LTD

Enable AP : Uncheck the "Disabled" option in the "Status" page, click the "Save" button,

click the "Apply" button, it will ask whether to restart the gateway service immediately (see the

figure below), click "Apply" to take effect immediately, Click "OK" again. Then refresh the

page, wait for the gateway service to restart and update the interface information, as shown in the

following figure.

Website:www.minew.com Email: [email protected] 7


SHENZHEN MINEW TECHNOLOGIES CO LTD

1.3.2 Hide or Show AP

The hotspot can be hidden only when the AP is on. In the "Status" page, check the

"Hidden" option, click the "Save" button and then click "OK" , you can also hide or display

the WiFi hotspot, as shown in the figure below.

1.3.3 Configuring AP Password

In the AP setting column under "Status" of the gateway WEB configuration interface , the user

can set the connection password in AP mode (see the figure below). After clicking the "Apply"

button, it will take effect immediately, or you can click "Cancel" to cancel, and it will take

effect after restarting.

Website:www.minew.com Email: [email protected] 8


SHENZHEN MINEW TECHNOLOGIES CO LTD

2. Network Configuration

The G1 Bluetooth gateway can connect to the network in three ways. The default is in the dhcp

mode of Ethernet, as shown in the figure below.

Website:www.minew.com Email: [email protected] 9


SHENZHEN MINEW TECHNOLOGIES CO LTD

Note: Cellular connection is not recommended for the time being.

2.1 Ethernet Connection

The G1 Bluetooth gateway can be directly connected to the Ethernet to realize data

communication with the server.

Ethernet mode has two sub-modes, dhcp mode (default) and static mode. In dhcp mode, the

gateway automatically obtains an IP address from the upper-level router, and in static mode, a

fixed IP address is manually assigned to the gateway.

2.1.1 DHCP Mode

In the Ethernet setting column of the gateway configuration interface, select the dhcp mode,

click the "Apply" button, then it will ask whether the configuration has been saved to apply,

click "Apply" to take effect immediately, you can also click "Cancel" , and then manually

Website:www.minew.com Email: [email protected] 10


SHENZHEN MINEW TECHNOLOGIES CO LTD

Reboot takes effect. The G1 Bluetooth gateway is connected to the network cable of the

upper-level router. After configuring the application, it will automatically obtain an IP address

from the upper -level router through the DHCP2 protocol and connect to the network. See below.

In the status item of the gateway WEB configuration interface, the current connection status and

the current gateway address will be displayed.

2.1.2 Static Mode

In the Ethernet setting column of the gateway configuration interface, select the static mode, fill

in the IP address information, and click the "Apply" button. At this time, it will ask whether the

configuration has been saved or not. Click "Apply" to take effect immediately. You can also

click "Cancel", the manual restart will take effect later. The G1 Bluetooth gateway is connected

to the network cable of the upper router. After configuring the application gateway, it will

2
Dynamic Host Configuration Protocol

Website:www.minew.com Email: [email protected] 11


SHENZHEN MINEW TECHNOLOGIES CO LTD

automatically connect to the network. See below.

In the status item of the gateway WEB configuration interface, the current connection status and

the current gateway address will be displayed.

The interface fields are described in detail below.

field name describe


Mode model dhcp mode or static mode
IP Address IP address Make sure the ip address is not occupied
Net Mask subnet mask Confirm that the subnet mask of the upper router is
the same
Gateway Address default Consistent with the ip address of the upper router
gateway
Primary DNS Preferred Preferred DNS address, default 8.8.8.8
DNS
Secondary DNS Alternate Alternate DNS address, default 114.114.114.114
DNS

Website:www.minew.com Email: [email protected] 12


SHENZHEN MINEW TECHNOLOGIES CO LTD

2.2 Wireless connection

The G1 Bluetooth gateway can be used as a WLAN client to connect to a WLAN AP to realize

data communication with the server.

Wireless mode has two sub-modes, dhcp mode and static mode. In dhcp mode, the gateway

automatically obtains an IP address from the upper-level router, and in static mode, a fixed IP

address is manually assigned to the gateway.

2.2.1 DHCP Mode

In the Wireless setting column of the Network configuration interface, Profile list is a list of

configured WLAN SSIDs.

Select the WLAN SSID to be connected by the gateway from the Available Access Point list, and

the corresponding related information, such as ssid, bssid (MAC address), encryption and signal

channel, will be displayed in the text box below.

We only need to select the corresponding SSID to fill in the password, select the dhcp mode,

click "Save profile only" to add only the WiFi profile, and then "Apply" to restart the network

service.

If it has been connected to the specified WLAN, the IP of the connected WLAN will be

displayed in the status item, otherwise N/A will be displayed in the status item.

In order to meet the needs of different customers, we can fill in the hidden WiFi SSID in the

SSID column; we can also fill in the router MAC address in the BSSID column to lock it to the

corresponding router (the SSID name can be set to the same, and the MAC is unique).

Website:www.minew.com Email: [email protected] 13


SHENZHEN MINEW TECHNOLOGIES CO LTD

In addition, we have also added support for 802.1x enterprise AP connections. You can select the

corresponding encryption method and related configuration in the Encryption column (see the

figure below). The specific verification method corresponds to the relevant configuration of the

upper-layer router, and the user needs to fill in it by himself.

Website:www.minew.com Email: [email protected] 14


SHENZHEN MINEW TECHNOLOGIES CO LTD

2.2.2 Static Mode

In the Wireless setting column of the Network configuration interface, Profile list is a list of

configured WLAN SSIDs.

Select the WLAN SSID to be connected by the gateway from the Available Access Point list, and

the corresponding related information, such as ssid, bssid (MAC address), encryption and signal

channel, will be displayed in the text box below.

We only need to select the corresponding SSID to fill in the password, select the static mode, fill

in the IP address information, click "Save profile only" to add only the WiFi profile, and then

"Apply" to restart the network service.

If it has been connected to the specified WLAN, the IP of the connected WLAN will be

displayed in the status item, otherwise N/A will be displayed in the status item.

Website:www.minew.com Email: [email protected] 15


SHENZHEN MINEW TECHNOLOGIES CO LTD

The interface fields are described in detail below.

field name describe


Available Access Available Automatically obtain available nearby WLAN SSIDs
Point WLANs as a client
nearby
SSID selected The SSID selected by default, if it is hidden, you can
SSID modify it by yourself
BSSID MAC The corresponding router can be locked by MAC
address
Encryption Encryption Various encryption methods are available
Cipher Wireless set on the wireless router. It has nothing to do with
Security how to connect to the network, the default is auto
Encryption
Protocol
Key WLAN The connection password for connecting to the
password specified WLAN
Website:www.minew.com Email: [email protected] 16
SHENZHEN MINEW TECHNOLOGIES CO LTD

Proto model dhcp mode or static mode


IP Address IP address Make sure the ip address is not occupied
Net Mask subnet mask Confirm that the subnet mask of the upper router is the
same
Gateway Address default Consistent with the ip address of the upper router
gateway
Primary DNS Preferred Preferred DNS address, default 8.8.8.8
DNS
Secondary DNS Alternate Alternate DNS address, default 114.114.114.114
DNS
Hidden property of The hidden For a more detailed explanation, see WiFi Failover
ssid(failover) attribute
correspondin
g to the
SSID
Network IP address or For a more detailed explanation, see WiFi Failover
checking(failover) domain
name to use
for failover
network
detection

Website:www.minew.com Email: [email protected] 17


SHENZHEN MINEW TECHNOLOGIES CO LTD

2.2.3 WiFi Failover

Note: there are detailed explanations

After the failover function is enabled, once the network check of the hotspots in the Profile List

fails, the gateway will switch the hotspots in the Profile List in sequence. When a hotspot is

blacklisted, the gateway will not retry until the blacklist expires. When the hotspots in the Profile

List are unavailable, the gateway will switch to AP_ONLY mode. During the AP_ONLY mode, if

the hotspots in the Profile List are found to be back to normal, the gateway will automatically

retry to connect to the hotspots in the Profile List.

AP_ONLY Mode: AP_ONLY mode means that the gateway does not connect to the upper-level

WiFi hotspot, but only transmits its own hotspot, so that after the upper-level WiFi hotspot fails,

the user can use the gateway's own hotspot to re-enter the configuration page.

Website:www.minew.com Email: [email protected] 18


SHENZHEN MINEW TECHNOLOGIES CO LTD

specific properties

field describe
Hidden property of ssid the WiFi ssid corresponding to the current profile is hidden . (When
the failover function is enabled, do not arbitrarily change the hidden
properties of the hotspot, otherwise the failover function may not
find the hotspot.)
Network checking whether the current profile network is normal by testing the
specified URL or IP . When failover is enabled, the gateway will
verify the connection reliability of this hotspot by pinging this IP
(make sure ICMP protocol is turned on) or wget URL (make sure
there is a page). (If it is not set, it will only detect whether WiFi can
be connected, not whether it can access the external network)

Common properties

field describe
Enable failover Whether to enable failover ( it can solve the problem that the
gateway cannot send its own AP when the upper-level hotspot is
unavailable )
Network checking Network check interval ( in seconds )
interval
Number of times retry The number of times to retry before blacklisting it ( 0 means the
before blacklist it hotspot will not be automatically blacklisted )
Number of seconds for The number of seconds for the blacklist to expire ( 0 means it will
a blacklisting to expire not expire until the gateway is restarted )
Minimum network The minimum network traffic ( in bytes/second ) when the
traffic in bytes per connection is active.
second to consider that If the current network traffic reaches the set value, Network
connection is ative checking will not be performed to detect the current network. When
set to 0 it will never be detected, it is recommended not to set to 0.

Website:www.minew.com Email: [email protected] 19


SHENZHEN MINEW TECHNOLOGIES CO LTD

3. Data Collection & Service Access

3.1 Data Collection

After the G1 Bluetooth gateway is started, it will continue to collect Bluetooth broadcast data,

and when the network is available, it will send data to the connected server at a frequency of

once a second by default.

The data uploaded by the G1 Bluetooth gateway has two formats, one is the data format of the

Json array (including the long and short data format), and the other is the original binary data

format of the Binary (including the long and short data format). The gateway uses the

JSON-LONG format to upload to the server by default. If the bandwidth of the gateway

deployed on site is small, you can switch to the Binary format. The data volume of the Binary

format is more than double that of the JSON data format.

3.1.1 JSON Data Format

There are the following 6 data types in the format of the JSON array uploaded by the G1

Bluetooth gateway:

type illustrate

iBeacon BLE data type, iBeacon protocol proposed by Apple.

https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf

S1 Sensor BLE data type, Minewtech's S1 temperature and humidity sensor. For specific

format, please refer to its specification description

S3 Sensor BLE data type, Minewtech's S3 temperature and humidity sensor. For specific

format, please refer to its specification description

S4 Sensor BLE data type, S4 door magnetic alarm sensor from Minewtech. For specific

format, please refer to its specification description

Unknown BLE data type, unrecognized BLE broadcast data

Gateway Does not belong to the BLE data type,indicates the current state of the gateway

Website:www.minew.com Email: [email protected] 20


SHENZHEN MINEW TECHNOLOGIES CO LTD

The Bluetooth devices currently parsed by the G1 Bluetooth gateway include standard iBeacon

devices, S1 sensors, S3 sensors, and S4 sensors. In addition to the data of these types of

Bluetooth devices, the original data of Bluetooth is uploaded in the Unknown data segment for

the server to parse by itself.

In addition, a data type of Gateway is added to indicate that the data of the json array is uploaded

by the gateway.

A sample message is as follows

Website:www.minew.com Email: [email protected] 21


SHENZHEN MINEW TECHNOLOGIES CO LTD

[
{
"timestamp" : "2020-01-14T03:54:09.627Z",
"type" : "Gateway",
"mac" : "AC233FC0211B",
"gatewayFree" : 86,
"gatewayLoad" : 1.96
}, {
"timestamp" : "2020-01-14T03:54:09.704Z",
"type" : "iBeacon",
"mac" : "D4221500000A",
"bleNo" : 2,
"bleName" : "MiniBeacon_00010",
"ibeaconUuid" : "FDA50693A4E24FB1AFCFC6EB07647825",
"ibeaconMajor" : 10001,
"ibeaconMinor" : 19641,
"rssi" : -75,
"ibeaconTxPower" : -59,
"battery" : 28
}, {
"timestamp" : "2020-01-14T03:54:09.643Z",
"type" : "S1",
"mac" : "AC233F291242",
"bleNo" : 2,
"bleName" : "S1",
"rssi" : -71,
"battery" : 23,
"temperature" : 22.1,
"humidity" : 61.95
}, {
"timestamp" : "2021-02-08T11:24:37.848Z",
"type" : "S3",
"mac" : "AC233FA449F0",
"bleNo" : 2,
"bleName" : "",
"rssi" : -70,
"battery" : 100,
"temperature" : 24.3,
"humidity" : 58.7
}, {
"timestamp" : "2020-01-14T03:54:09.643Z",
"type" : "S4",
"mac" : "AC233F333333",
"bleNo" : 2,
"bleName" : "",
"rssi" : -51,
"battery" : 100,
"unlocked" : false,
"uninstalled" : true,
"triggered" : false
}, {
"timestamp" : "2020-01-14T03:54:09.644Z",
"type" : "Unknown",
"mac" : "0F030ED2BB0F",
"bleNo" : 2,
"bleName" : "",
"rssi" : -72,
"rawData" : "1EFF0600010920024807BE10889564408E6509ABFF294B7E90E68F143E042F"
}
]

Website:www.minew.com Email: [email protected] 22


SHENZHEN MINEW TECHNOLOGIES CO LTD

Note: The Json data format is divided into two formats, long and short. The long data format

contains all the above fields, and the short data format except the Gateway data type only

contains three fields of mac/rssi/bleNo.

The JSON data fields are described in detail as follows.

field name describe

timestamp timestamp ISO 8601 time format

type type Can be iBeacon, S1/S3/S4, Unknown, Gateway

mac Device's MAC The hexadecimal uppercase character form of the


MAC. When the type is Gateway, the mac address is
the MAC address of the gateway, and the others are
the MAC address of the Bluetooth device.
bleNo Bluetooth module The broadcast packet is collected by the number of
serial number Bluetooth modules. When the gateway has multiple
Bluetooth modules, it needs attention.
bleName BLE name of the The device of BLE type exists, if it cannot be
device parsed, it is an empty string
ibeaconUuid UUID of the device Present when the device is an iBeacon

ibeaconMajor Major of the device Present when the device is an iBeacon

ibeaconMinor Minor of the device Present when the device is an iBeacon

rssi Device RSSI A device of type BLE exists

ibeaconTxPower Device Tx Power Present when the device is an iBeacon

battery device power It exists when the device is an iBeacon or S1/S3/S4


sensor. If it cannot be resolved, the battery value is
0.
temperature device temperature Present when device is S1/S3 sensor

humidity device humidity Present when device is S1/S3 sensor

Website:www.minew.com Email: [email protected] 23


SHENZHEN MINEW TECHNOLOGIES CO LTD

unlocked Door Magnetic Present when device is S4 sensor


Alarm Sign
uninstalled Tamper alarm status Present when device is S4 sensor

triggered Door Magnetic Present when device is S4 sensor


Trigger Sign
rawData BLE broadcast data BLE broadcast data in uppercase hexadecimal
characters
Exists when device is Unknown
gatewayFree Gateway remaining Exists when the device is Gateway, in MB
memory
gatewayLoad Gateway load Exists when device is Gateway

3.1.2 Binary Data Format

Binary data format is divided into long and short data format, the format is as follows:

frame header BLE frame end of frame

Protocol Header Data Length Gateway MAC Address Number of BLE BLE frame=Body*Number of BLE Protocol Tail

Long 0xBB01 Include Include Include Include 0xDD

Short 0xBB00 Include Include Include Include 0xDD

two bytes 4 bytes 6 bytes two bytes byte indeterminate 1 byte

illustrate Fixed protocol the length of the Gateway's MAC Number of BLE BLE frame=number of BLE fixed protocol trailer

header entire data address devices devices*Body

Website:www.minew.com Email: [email protected] 24


SHENZHEN MINEW TECHNOLOGIES CO LTD

The data format of the Body in the Bluetooth frame is as follows:

Body

BLE Data ...


BLE MAC Number of BLE
Raw Data Raw Data Response rssi
Address Data
Length

Long Include Include Include Include Include Include

Include Include does not contain does not does not contain Include
Short
contain

2 bytes 1 byte The raw data 1 byte 1 byte

The number of times Length of Raw of BLE, the specific format Rssi value
6 bytes
BLE Data was Data, may be 0 specific see table below
illustrate BLE MAC
received format refers
address
to its

specification

The Response byte format is as follows:

Response byte

bit 7 -- 3 2 1 0

address type

00: public address Is it a reply packet

Desc. reserve 01: random static address 0: broadcast packet

10: Random private resolvable address 1: Reply Packet

11: Unresolvable random private address

Example of long-form message:

Website:www.minew.com Email: [email protected] 25


SHENZHEN MINEW TECHNOLOGIES CO LTD

BB01 0000 0371 AC23 3FC0 2F87 000C 032E 4A1A A95A 0001 1F1E FF06 0001
09200235EEAEEBD2CFD93304 52E2 AC9F E743 D46E FC3E ACBE AE2A 06CF
068B 332C ECE2 0002 1F1E FF06 0001 0920 0253 439A FB69 6A05 5861 97E9
F66E E6CB 86DB BA15 5695 877C 06D2 1F1E FF06 0001 0920 0253 439A FB69
6A05 5861 97E9 F66E E6CB 86DB BA15 5695 877C 06D1 2018 1116 7712 0002
1E02 0106 1AFF 4C00 0215 4C2B 0000 0001 0001 0001 012B 0100 02C9 0001
0001 C500 D91B 020A 0003 03F1 FF0E 16F1 FF64 0001 0001 2018 1116 7712
0409 4C2B 4201 D920 2005 2909 1300 011D 0201 0603 03AA FE15 16AA FE00
E800 1122 3344 5566 7788 9900 0000 0000 0000 CF2F CDA8 E1A7 A600 031F
1EFF 0600 0109 2002 0BBC B084 E1CE 7776 FADB E602 53E3 E965 7D33 DC5A
05C6 2506 D21F 1EFF 0600 0109 2002 0BBC B084 E1CE 7776 FADB E602 53E3
E965 7D33 DC5A 05C6 2506 D01F 1EFF 0600 0109 2002 0BBC B084 E1CE 7776
FADB E602 53E3 E965 7D33 DC5A 05C6 2506 D239 3F7B A3A0 3600 031F 1EFF
0600 0109 2002 00F8 DA4B 31DD F0B8 9592 17A0 E445 9D2C 9773 F26E 6199
9006 D31F 1EFF 0600 0109 2002 00F8 DA4B 31DD F0B8 9592 17A0 E445 9D2C
9773 F26E 6199 9006 D41F 1EFF 0600 0109 2002 00F8 DA4B 31DD F0B8 9592
17A0 E445 9D2C 9773 F26E 6199 9006 D250 ECEC E1AE F000 0200 05CF 1102
011A 020A 0C0A FF4C 0010 0503 1CF7 B75E 04CF 67C7 750A 58FC 0004 1202
011A 020A 080B FF4C 0010 0631 1A48 5146 4904 D000 05D5 1202 011A 020A
080B FF4C 0010 0631 1A48 5146 4904 D200 05D0 6D24 1881 77A4 0002 1102
011A 020A 0C0A FF4C 0010 054B 1CDB 1127 04D1 1102 011A 020A 0C0A FF4C
0010 054B 1CDB 1127 04CF ACAC 2233 0004 0002 1F02 0106 1BFF 3906 CA00
0400 3322 ACAC 5F60 0000 0000 0000 0100 0000 CBC6 B866 00CF 1D02 0106
19FF 3906 CA01 1700 0000 00B4 B630 00C5 0000 0000 0001 3063 2BC0 00CF
C200 5900 038E 0001 1E02 0106 1AFF 4C00 0215 FDA5 0693 A4E2 4FB1 AFCF
C6EB 0764 7825 2711 4CB9 C502 D4DC 234D 08C8 EA00 051C 0201 0603 0201
A20C 1601 A200 616D 6673 716F 7873 0000 0000 0000 0000 00CF 1E03 0954
5919 FFD0 0700 0300 0001 00A0 6C72 0DA4 7914 B1A9 D590 0447 373C 5501
CF1C 0201 0603 0201 A20C 1601 A200 616D 6673 716F 7873 0000 0000 0000
0000 00CF 1E03 0954 5919 FFD0 0700 0300 0001 00A0 6C72 0DA4 7914 B1A9
D590 0447 373C 5501 CF1C 0201 0603 0201 A20C 1601 A200 616D 6673 716F
7873 0000 0000 0000 0000 00CF DD

The long format frame header format is as follows:


frame header

Protocol Header Data Length Gateway MAC Address Number of BLE

data 0xBB01 0x0000 0371 0xAC23 3FC0 2F87 0x000C

Indicates that it 4 bytes


6 bytes two bytes
illustrate is Binary long The length of the entire data is 881
Gateway MAC address AC:23:3F:C0:2F:87 The number of BLE devices is 12
format bytes

Website:www.minew.com Email: [email protected] 26


SHENZHEN MINEW TECHNOLOGIES CO LTD

Long format Bluetooth frames are as follows:

Body

BLE BLE Data


Number of
NO. BLE MAC Address Raw Data
BLE Data Raw Data Response rssi
Length

1E FF06 0001 0920 0235 EEAE EBD2 CFD9 3304 52E2 AC9F E743 D46E FC3E
1 032E 4A1A A95A 0001 1F 06 CF
ACBE AE2A

1E FF06 0001 0920 0253 439A FB69 6A05 5861 97E9 F66E E6CB 86DB BA15
1F 06 D2
5695 877C
2 068B 332C ECE2 0002
1F1E FF06 0001 0920 0253 439A FB69 6A05 5861 97E9 F66E E6CB 86DB BA15
1F 06 D1
5695 877C

02 0106 1AFF 4C00 0215 4C2B 0000 0001 0001 0001 012B 0100 02C9 0001
1E 00 D9
0001 C5
3 2018 1116 7712 0002
020A 0003 03F1 FF0E 16F1 FF64 0001 0001 2018 1116 7712 0409
1B 01 D9
4C2B 42

4 2020 0529 0913 0001 1D 0201 0603 03AA FE15 16AA FE00 E800 1122 3344 5566 7788 9900 0000 0000 00 00 CF

1EFF 0600 0109 2002 0BBC B084 E1CE 7776 FADB E602 53E3 E965 7D33
1F 06 D2
DC5A 05C6 25

1EFF 0600 0109 2002 0BBC B084 E1CE 7776 FADB E602 53E3 E965 7D33
5 2FCDA8E1A7A6 0003 1F 06 D0
DC5A 05C6 25

1EFF 0600 0109 2002 0BBC B084 E1CE 7776 FADB E602 53E3 E965 7D33
1F 06 D2
DC5A 05C6 25

1EFF 0600 0109 2002 00F8 DA4B 31DD F0B8 9592 17A0 E445 9D2C 9773
1F 06 D3
F26E 6199 90

1EFF 0600 0109 2002 00F8 DA4B 31DD F0B8 9592 17A0 E445 9D2C 9773
6 393F7BA3A036 0003 1F 06 D4
F26E 6199 90

1EFF 0600 0109 2002 00F8 DA4B 31DD F0B8 9592 17A0 E445 9D2C 9773
1F 06 D2
F26E 6199 90

00 NULL 05 CF

7 50EC ECE1 AEF0 0002

11 0201 1A02 0A0C 0AFF 4C00 1005 031C F7B7 5E 04 CF

12 0201 1A02 0A08 0BFF 4C00 1006 311A 4851 4649 04 D0

8 67C7 750A 58FC 0004

00 NULL 05 D5

Website:www.minew.com Email: [email protected] 27


SHENZHEN MINEW TECHNOLOGIES CO LTD

12 0201 1A02 0A08 0BFF 4C00 1006 311A 4851 4649 04 D2

00 NULL 05 D0

11 0201 1A02 0A0C 0AFF 4C00 1005 4B1C DB11 27 04 D1

9 6D24188177A4 0002

11 0201 1A02 0A0C 0AFF 4C00 1005 4B1C DB11 27 04 CF

0201 061B FF39 06CA 0004 0033 22AC AC5F 6000 0000 0000 0001 0000 00CB
1F 00 CF
C6B8 66
10 ACAC 2233 0004 0002
0201 0619 FF39 06CA 0117 0000 0000 B4B6 3000 C500 0000 0000 0130 632B
1D 00 CF
C0

0201 061A FF4C 0002 15FD A506 93A4 E24F B1AF CFC6 EB07 6478 2527
11 C200 5900 038E 0001 1E 02 D4
114C B9C5

1C 0201 0603 0201 A20C 1601 A200 616D 6673 716F 7873 0000 0000 0000 0000 00 CF

0309 5459 19FF D007 0003 0000 0100 A06C 720D A479 14B1 A9D5 9004 4737
1E 01 CF
3C55

12 DC23 4D08 C8EA 0005 1C 0201 0603 0201 A20C 1601 A200 616D 6673 716F 7873 0000 0000 0000 0000 00 CF

0309 5459 19FF D007 0003 0000 0100 A06C 720D A479 14B1 A9D5 9004 4737
1E 01 CF
3C55

1C 0201 0603 0201 A20C 1601 A200 616D 6673 716F 7873 0000 0000 0000 0000 00 CF

The end of the frame is 0xDD.

Sample short format message:

BB00 0000 00C5 AC23 3FC0 000D 0013 ABCD EF06 0006 0002 A4A4
C0D4 AD37 09CA 0001 A5C1 00B1 0000 0600 03AE AFAF C100 B100
000D 0001 ABC1 00B1 0000 1700 01AD C100 B100 0025 0001 A5C1
00B1 0000 5A00 01AE C1EB 07D2 E9AA 0002 ABAB C989 CE35 C7B6
0002 A5A8 CE56 CAFB 285B 0001 C0D3 7C4F 0B2B 5200 02AB ACE0
D2B3 7E96 9C00 01A2 E54D 425F 7DB6 0001 A6E6 F5D3 6082 A200
02B4 B5EA D25C 1986 FC00 02BF C0F0 A4D2 9EBF 1B00 03C2 C3C2
F56A C925 CF6C 0001 A5FD 1DD7 AB03 F500 01AD FDFC D4FB 5D98
0002 A9AA DD

Website:www.minew.com Email: [email protected] 28


SHENZHEN MINEW TECHNOLOGIES CO LTD

The format of the short data frame header is as follows:

frame header

Protocol Header Data Length Gateway MAC Address Number of BLE

data 0xBB00 0x0000 00C5 0xAC23 3FC0 000D 0x0013

Indicates the 4 bytes


6 bytes two bytes
illustrate Binary short The length of the entire data is 197
Gateway's MAC address AC:23:3F:C0:00:0D The number of BLE devices is 19
format bytes

The short data format Bluetooth frame format is as follows:

Body
BLE
Number of BLE Data
NO. BLE MAC Address
BLE Data rssi

A4
1 ABCD EF06 0006 0002
A4

2 C0D4 AD37 09CA 0001 A5

AE

3 C100 B100 0006 0003 AF

AF

4 C100 B100 000D 0001 AB

5 C100 B100 0017 0001 AD

6 C100 B100 0025 0001 A5

7 C100 B100 005A 0001 AE

AB
8 C1EB 07D2 E9AA 0002
AB

A5
9 C989 CE35 C7B6 0002
A8

10 CE56 CAFB 285B 0001 C0

AB
11 D37C 4F0B 2B52 0002
AC

12 E0D2 B37E 969C 0001 A2

13 E54D 425F 7DB6 0001 A6

B4
14 E6 F5D3 6082 A2 0002
B5

Website:www.minew.com Email: [email protected] 29


SHENZHEN MINEW TECHNOLOGIES CO LTD

BF
15 EA D25C 1986 FC 0002
C0

C2

16 F0 A4D2 9EBF 1B 0003 C3

C2

17 F56A C925 CF6C 0001 A5

18 FD 1DD7 AB03 F5 0001 AD

A9
19 FDFC D4FB 5D98 0002
AA

The end of the frame is 0xDD.

3.2 Service Access

The G1 Bluetooth gateway currently supports the use of MQTT, HTTP, and TCP network

protocols to communicate with servers locally or on the Internet.

Users can choose a suitable network protocol according to their server architecture, and the

MQTT protocol is recommended.

Service access of the G1 Bluetooth gateway requires back-end MQTT or HTTP or TCP service

support. The G1 Bluetooth gateway is connected to the TagCloud IoT service in Yunliwu by

default when it leaves the factory.

The G1 Bluetooth gateway is equipped with the TagCloud IoT service and console in Yunliwuli

by default as a demonstration, you can quickly experience the application of the Bluetooth

gateway.

3.2.1 MQTT Access

When using MQTT access, the G1 Bluetooth gateway supports the function of regularly

uploading Bluetooth data and remote command control.

The G1 Bluetooth gateway can support the MQTT 3.1.1 protocol standard server. For the

specific protocol, please refer to the MQTT 3.1.1 protocol document, and see http://mqtt.org for

Website:www.minew.com Email: [email protected] 30


SHENZHEN MINEW TECHNOLOGIES CO LTD

details .

For MQTT related libraries, you can check https://github.com/mqtt/mqtt.github.io/wiki/libraries .

field name describe


Service access
Protocol Choose MQTT
method
Upload
upload interval The unit can be selected, the default is 1s
Interval
The data uploaded by the gateway has four formats,
namely JSON-LONG, JSON-SHORT,
Data format Data Format
BINARY-LONG, BINARY-SHORT
Default: JSON-LONG
scheme+domain name/IP Address+port
scheme: optional values tcp://, ssl://
Url of MQTT port: When not filled in, when the scheme is tcp://,
Url
server the port defaults to 1883, and when it is ssl://, the port
defaults to 8883
Default: tcp://tagcloud.minew.com:2883
proxy proxy server Setting up a sock5 proxy server for MQTT
Client ID MQTT Client ID The Client ID defined by the MQTT protocol is the
Website:www.minew.com Email: [email protected] 31
SHENZHEN MINEW TECHNOLOGIES CO LTD

identity of the client


Default: ${gatewayMAC}
${gatewayMAC} is the hexadecimal lowercase
character form of the gateway's Mac, such as
aabbcddeeff
The QoS level defined by the MQTT protocol.
QoS=0: at most once, possibly duplicate or lost.
Qos MQTT QoS level QoS=1: At least once, possibly repeated.
QoS=2: Yes and only once.
Default: 0
The keep alive interval defined by the MQTT
protocol defaults to 10 seconds. Some MQTT cloud
keep alive Heartbeat interval
servers do not allow such a small heartbeat interval.
interval for MQTT
For example, Alibaba Cloud needs to adjust this
parameter to 60 seconds to connect.
Username MQTT username Username defined by the MQTT protocol
Password MQTT password Ciphers defined by the MQTT protocol
Topic for the gateway to publish BLE data
Default: /gw/${gatewayMac}/status
Status Publish Topic for collecting
${gatewayMac} is the hexadecimal lowercase
Topic data and publishing
character form of the gateway's Mac, such as
/gw/aabbcddeeff/status.
It is used by the gateway to receive control
commands. The message is in JSON format.
Currently, only the " restart" command is supported.
Action Topic of control
Default: /gw/${gatewayMac}/action
Control Topic command message
${gatewayMac} is the hexadecimal lowercase
character form of the gateway's Mac, such as
/gw/aabbcddeeff/action.
It is used by the gateway to respond to control
Action commands, and the message is in JSON format.
Control Topic that controls Default: /gw/${gatewayMac}/response.
Response command response ${gatewayMac} is the hexadecimal lowercase
Topic character form of the gateway's Mac, such as
/gw/aabbcddeeff/response.

MQTT with Proxy Method

When using MQTT access, it supports Proxy Socks5 (the proxy resolves the URL hostname).

Any of the following formats will work:


Website:www.minew.com Email: [email protected] 32
SHENZHEN MINEW TECHNOLOGIES CO LTD

username: password@host:1080
username:password@host
username@host:1080
username@host
host:1080
host

MQTT With SSL/TLS Method

When using MQTT access, it supports SSL/TLS protocol. After selecting "ssl://" in the
drop-down list of Url parameters, the parameters displayed are used to configure the loading
certificate to the gateway. Both USB and HFS are supported. As shown below.

Website:www.minew.com Email: [email protected] 33


SHENZHEN MINEW TECHNOLOGIES CO LTD

field name describe


Optional values: USB and HFS (Http File
Server)
How to upload the
File Upload Method USB: Upload the certificate using USB
certificate
HFS: Upload certificates using HFS
FILE: Upload certificate via browser
Support HFS for gateway to download
Url Path of HFS URL PATH part of HFS certificate file
Default: http://192.168.0.3/ssl/
Username of basic If HFS does not have basic
Username for HFS Basic
authentication in authentication, you can leave this
Authentication
HFS parameter blank
Password of basic If HFS does not have basic
Password for HFS Basic
authentication in authentication, you can leave this
Authentication
HFS parameter blank
File name of CA certificate in U
disk/HFS
USB: The gateway will directly
download the certificate file to the root
File of Certificate Gateway trusted CA directory of the U disk
trusted by client certificate HFS: The gateway will download the
certificate file directly to the ${Urlpath}
path
FILE: The gateway will download the
certificate file through the browser
The file name of the gateway certificate
in the U disk/HFS
USB: The gateway will directly
download the certificate file to the root
File of Certificate
directory of the U disk
for client to present Gateway's certificate
HFS: The gateway will download the
to server
certificate file directly to the ${Urlpath}
path
FILE: The gateway will download the
certificate file through the browser
filename of keyfile in HFS
The client 's Private The private key of the
USB: The gateway will directly
Key gateway certificate
download the certificate file to the root
Website:www.minew.com Email: [email protected] 34
SHENZHEN MINEW TECHNOLOGIES CO LTD

directory of the U disk


HFS: The gateway will download the
certificate file directly to the ${Urlpath}
path
FILE: The gateway will download the
certificate file through the browser
The Password of Password for the private If the private key of the gateway
client ' s Private key of the gateway certificate is encrypted, this password
Key certificate must be provided
The configuration instructions for SSL/TLS certificates are as follows:

USB Upload Method

method of uploading the certificate file using USB is as follows:


1. "Upload Way" on the web configuration page ;
2. Name the certificate to be uploaded as the file name of the corresponding input box;
3. Copy the named certificate file to the root directory of the U disk;
4. Insert the U disk into the USB port of the gateway;
5. Click the corresponding Upload button on the configuration page to upload the corresponding
certificate file.

HFS Upload Method

The method of uploading the certificate file in HFS mode is as follows:


Preliminary preparation: link under HFS software: https://sourceforge.net/projects/hfs/
Click to open the hfs.exe software to open the HFS service. The premise is that the gateway must
be configured with a network to communicate with HFS.
1. " Upload Way" on the webpage configuration page ;
2. Name the certificate to be uploaded as the file name of the corresponding input box;
3. Add the named certificate file to the path of HFS, as shown in the following figure;

Website:www.minew.com Email: [email protected] 35


SHENZHEN MINEW TECHNOLOGIES CO LTD

4. Fill in the path where the certificate is located in the Urlpath input box, for example:
http://192.168.0.51/ssl ;
5. Click the corresponding Upload button on the configuration page to upload the corresponding
certificate file.

FILE Upload Method

The method of uploading the certificate file in FILE mode is as follows:


1. "File Upload Method" on the web configuration page ;
2. "Choose File" on the webpage configuration page to select the corresponding certificate file;
3. Click the corresponding "Upload" button on the configuration page to upload the
corresponding certificate file.

3.2.2 HTTP Access

When using HTTP access, the G1 Bluetooth gateway only supports the function of regularly

uploading and collecting data.

G1 Bluetooth gateway can support HTTP/HTTPS protocol web server. In the service connection

setting column of the gateway WEB configuration interface, select HTTP, and fill in the URL

information of the HTTP server, and it will take effect after saving.

HTTP server development instructions:

Website:www.minew.com Email: [email protected] 36


SHENZHEN MINEW TECHNOLOGIES CO LTD

1. The HTTP server must be able to receive requests for the HTTP Post method.

2. The HTTP server should receive any packets uploaded by the gateway, including empty

packets (this is the request packet used to test if the HTTP server is online). Only after the HTTP

server returns HTTP status code 200, the gateway can continue to send the next packet.

field name describe


Service access select HTTP
Protocol
method
Upload The unit can be selected, the default is 1s
upload interval
Interval
The data uploaded by the gateway has four formats,
Data format Data Format namely JSON-LONG, JSON-SHORT,
BINARY-LONG, BINARY-SHORT
It is used for the gateway to upload data regularly,
starting with http:// or https://, using the POST
method
http://tagcloud.minew.com:8080/gw/${gatewayMa
URL for collecting
Url c}/status
data
${gatewayMac} is the hexadecimal lowercase
character of the gateway's Mac, for example
http://tagcloud.minew.com:8080/gw/aabbcddeeff/st
atus.
Authentication HTTP Optional values: none (do not use HTTP

Website:www.minew.com Email: [email protected] 37


SHENZHEN MINEW TECHNOLOGIES CO LTD

Type Authentication Type authentication), basic (use HTTP basic


Authentication)
Default: none
Username username Username for HTTP basic authentication
Password password Password for HTTP basic authentication

3.2.3 TCP Access

When using TCP access, the G1 Bluetooth gateway only supports the function of regularly

uploading and collecting data.

G1 Bluetooth gateway can support the web server of TCP protocol. In the service connection

setting column of the gateway WEB configuration interface, select TCP, and fill in the URL

information of the TCP server, and it will take effect after saving.

field name describe


Protocol Network protocol select TCP
Upload The unit can be selected, the default is 1s
upload interval
Interval
The data uploaded by the gateway has four formats,
Data format Data Format namely JSON-LONG, JSON-SHORT,
BINARY-LONG, BINARY-SHORT
It is used for the gateway to upload data regularly,
URL for collecting
Url The URL format is {host/IP}:{port}
data
For example 192.168.0.3:10000

Website:www.minew.com Email: [email protected] 38


SHENZHEN MINEW TECHNOLOGIES CO LTD

3.3 Data Filtering

The data filtering for access to the three services is the same, as shown in the following figure.

field name describe


Only upload data whose signal strength is greater
than this value, in dBm
When not filled, it means no filtering, the value can
Filter by rssi Rssi value filtering
be filled in -100 < rssi < 0
For example: when filling in -67, the weak signal of
-68 and below will not be uploaded to the server
Regular expression for BLE mac
For example: only want to receive BLE mac data
Filter BLE mac by
Filter by mac starting with AC23 or 0CEF, the regular expression
regex
is: ^AC23.*|^0CEF.*
Note: Here BLE mac is not case sensitive, no colon
Regular expression for BLE name
Filter by ble Filter BLE name by For example, if you only want to receive data whose
name regular expression BLE name starts with MiniBeacon or Minew, the
regular expression is: ^MiniBeacon.*|^Mbeacon.*

Website:www.minew.com Email: [email protected] 39


SHENZHEN MINEW TECHNOLOGIES CO LTD

Regular expression for raw data


This filter is applicable to all data types, including
Json/Binary-Long/Short. This filter condition can be
used as long as the broadcast packets of the BLE
device are regular.
Filter raw data by
Filter by raw For example: only want to receive UUID as
regular expression
FDA50693A4E24FB1AFCFC6EB07647825

the iBeacon broadcast package, the expression can


be written as ^.* FDA50693A4E24FB1AFCFC6EB07647825 .*
Note: The raw data string here is not case sensitive
Default NO, optional YES, NO;
There are three ways to set filtering conditions:
mac: Broadcast packets with the same mac address
are considered duplicate data;
Whether to filter mac+type: broadcast packets with the same mac
Filter duplicate
duplicate data within address and the same type are considered duplicate
data
the upload interval data;
mac+raw: broadcast packets with the same mac
address and the same raw data are considered
duplicate data

Upload Whether to upload Default NO, optional YES, NO


without BLE data when there is
data no BLE data
Upload Whether to upload Default YES, optional YES, NO
iBeacon ibeacon type data
Upload Whether to upload Default YES, optional YES, NO
S1/S3/S4 S1/S3/S4 type data
Upload Whether to upload Default YES, optional YES, NO
Gateway data of gateway type
Whether to upload Default NO, optional YES, NO
Upload
data of unknown Note: If your BLE is not S1, S3, S4 or ibeacon,
Unknown
type please turn this option on
Default NO, optional YES, NO
Whether to only
Upload When YES is selected, the macList parameter must
accept data from
specific mac submit at least one mac address
specific Mac
addresses only Note: This filtering method is outdated, it is
addresses
recommended to use BLE mac filter instead
List of Mac Input in the form of AABBCCDDEEFF. After each
macList
addresses that only input of a mac address, press the space character or
Website:www.minew.com Email: [email protected] 40
SHENZHEN MINEW TECHNOLOGIES CO LTD

accept data carriage return character to check the validity of the


mac address. Only the mac address that passes the
validity check will be submitted to the macList
parameter.

3.4 Scan Parameter Configuration

This part of the parameters is used to configure the scanning strategy of the Bluetooth module.

As shown below.

parameter value illustrate


1. There are two types of broadcast packets of BLE tags:

Whether to broadcast packets and scan reply packets. The broadcast

Active Scan enable active packet is actively broadcast by the BLE tag; the scan

scanning reply packet is passively broadcast after the BLE tag

receives the request after the scanner sends a request.

Website:www.minew.com Email: [email protected] 41


SHENZHEN MINEW TECHNOLOGIES CO LTD

2. The scanning strategy of the BLE module of the

gateway is correspondingly divided into two types, active

scanning and passive scanning. Active scanning will send

a request for reply packets to the BLE tag, while passive

scanning will only receive broadcast packets and will not

send a request for reply packets.

3. If your BLE tag does not scan for reply packets, you

can set this parameter to NO, which can improve the scan

rate of BLE broadcast packets.

Scan Interval Scan interval Scan interval and scan scan window are used together.

The scan window parameter cannot be greater than the

Scan Window Scan window scan interval parameter. When the two are equal, the scan

rate reaches 100%.

Notice:
1. The time set for the scan window and scan interval cannot be greater than 10s;
2. The value set in the scan window cannot be greater than the value of the scan interval;
3. If the scan window = scan interval, it means that the host has been scanning.

Website:www.minew.com Email: [email protected] 42


SHENZHEN MINEW TECHNOLOGIES CO LTD

3.5 Remote Control (Only MQTT )

The G1 Bluetooth gateway can subscribe Topic to receive control commands through MQTT to
realize remote control of the gateway from the server. After receiving the command, it publishes
the command response information through another Topic and executes the command operation.
The data format is JSON array. Neither HTTP nor TCP supports this function .
In the MQTT method, the gateway will subscribe to the Topic specified by the MQTT service,
and after receiving the control command, use another corresponding Topic to send the control
command response message.
Different MQTT service providers often have different Topics, so you need to refer to the service
provider's documentation. For the self-developed MQTT server, you can refer to our design.
Taking the TagCloud IoT service as an example, the definition of collected data release is as
follows.

Topic operate describe


The gateway receives the control
/gw/${gatewayMac}/action subscription instructions sent by the IoT
service
The return information after the
/gw/${gatewayMac}/response release gateway receives the control
command

Where ${gatewayMac} is the hexadecimal lowercase character form of the gateway's Mac.
That is, the server only needs to send a control command to the topic /gw/${gatewayMac}/action.
After the gateway receives the command, it will return the result to the topic
/gw/${gatewayMac}/response.

The sample request response message of the control command is as follows:


{
"code": 200,
"message": "success",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Website:www.minew.com Email: [email protected] 43


SHENZHEN MINEW TECHNOLOGIES CO LTD

The response message data fields are described in detail as follows.


Type Details field code message illustrate

success 200 success return successfully

Json data format 300 invalid json The received command is in the
error format wrong Json format
unrecognized 400 unrecognized Unrecognized operation command
operation action
Parameter error 500 parameter error The requested parameters are
incomplete and only exist when
configuring parameters or
upgrading firmware
Network Error 600 network error Network error, unable to download
SSL certificate file or unable to
download upgrade firmware, only
exists when obtaining firmware
version information or upgrading
firmware
other errors 700 / The cause of the error depends on
the specific information returned

3.5.1 Restart the gateway

A sample request message of the control command to restart the gateway is as follows:

{
"action": "reboot",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Website:www.minew.com Email: [email protected] 44


SHENZHEN MINEW TECHNOLOGIES CO LTD

The message data fields are described in detail below.

field name must value


action operate Yes reboot
requestId request Yes UUID format, when the request command
id has requestId, the response message will
also return this field, which is used to
match the request and response messages

3.5.2 Heartbeat Packet

An example of a request message for a control command to send a heartbeat packet is as follows:
{
"action": "heartBeat",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

The message data fields are described in detail as follows:


field name must value
action operate Yes heartBeat
UUID format, when the request command
has requestId, the response message will
requestId request id Yes
also return this field, which is used to
match the request and response messages

The server sends a heartbeat packet to the gateway to determine whether the gateway is online. If

the gateway receives the control command, it directly returns a success message. If the gateway

is not online, it will not return.

3.5.3 Configuration Parameters

An example of a request message for a control command of a configuration parameter is as follows:


Website:www.minew.com Email: [email protected] 45
SHENZHEN MINEW TECHNOLOGIES CO LTD

{
"action":"config",
"takeEffectImmediately":"YES",
"generic" : {
"params" : {
"protocol" : "MQTT",
"upload_interval" : 1000,
"data_format" : "JSON-LONG"
}
},
"mqtt" : {
"params" : {
"url" : "tcp://tagcloud.minew.com:1883",
"proxy" : "",
"qos" : 0,
"username" : "",
"password" : "",
"keepalive" : 10,
"client_id" : "ac233f15aa01",
"status_topic" : "/gw/ac233f15aa01/status",
"action_topic" : "/gw/ac233f15aa01/action",
"response_topic" : "/gw/ac233f15aa01/response",
"cafile" : "ca.crt",
"certfile" : "client.crt",
"keyfile" : "client.key",
"keypass" : ""
}
},
"http" : {
"params" : {
"url" : "http://tagcloud.minew.com:8080/gw/ac233f15aa01/status",
"auth_type" : "none",
"username" : "",
"password" : ""
}
},
"tcp" : {
"params" : {
"url" : "192.168.0.3:10000"
}
},
"filter" : {
"params" : {
"rssi" : "",
"regex_mac" : "",
"regex_name" : "",
"regex_raw" : "",
"filter_duplicate" : false,
"duplicate_method" : "mac",
"upload_without_ble" : false,
"upload_ibeacon" : true,
"upload_s1" : true,
"upload_unknown" : false,
"upload_gateway" : true,
"upload_special_mac" : false,
"special_maclist" : ""
}
},
"scan" : {
"params" : {
"active" : false,
"scan_interval" : 100,
"scan_window" : 100,
"timeout_restart" : 3
}
},
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Website:www.minew.com Email: [email protected] 46


SHENZHEN MINEW TECHNOLOGIES CO LTD

All fields are of type string, and as shown above, when defaulting a field, the original parameters
of the field will not be modified.
The message data fields are described in detail as follows:
field name must describe
action operate Yes config or setConfig
whether it takes Optional values: YES, NO
takeEffectImmediately Yes
effect immediately
generic
protocol Protocol selection no Optional values: MQTT, HTTP, TCP
upload_interval Upload interval no Time unit: milliseconds
Optional values: JSON-LONG,
JSON-SHORT,
data_format type of data no
BINARY-LONG,
BINARY-SHORT
mqtt
The format is
url URL value of Mqtt no tcp://tagcloud.minew.com:1883
ssl://192.168.0.3:8883
MQTT Broker MQTT supports sock5 proxy server,
proxy no
Settings the default is empty
The QoS level defined by the MQTT
protocol.
QoS=0: at most once, possibly
qos MQTT QoS level no
duplicate or lost.
QoS=1: At least once, possibly
repeated.
Username of the Username of the MQTT server
username no
MQTT server
Password of the Password of the MQTT server
password no
MQTT server
Heartbeat interval for The keep alive interval defined by the
keepalive no
MQTT MQTT protocol

Website:www.minew.com Email: [email protected] 47


SHENZHEN MINEW TECHNOLOGIES CO LTD

User ID of the The Client ID defined by the MQTT


client_id no
MQTT server protocol is the identity of the client
Topic released by Topic for the gateway to publish BLE
status_topic no
data collection data
It is used by the gateway to receive
Topic of control
action_topic no control commands, and the message
command message
is in JSON format.
Topic of control It is used by the gateway to respond
response_topic command response no to control commands, and the
message message is in JSON format.
cafile certificate is the file name in
HFS,
Gateway trusted CA
cafile no The gateway will directly download
certificate
the certificate file under the path of
${urlpath}/${cafile}
certfile certificate is the file name in
HFS,
certfile Gateway certificate no The gateway will download the
certificate file directly to the path
${urlpath}/${certfile}
keyfile is the filename in HFS,
The private key of
The gateway will download the
keyfile the gateway no
certificate file directly to the path
certificate
${urlpath}/${keyfile}
Password for the If the private key of the gateway
keypass private key of the no certificate is encrypted, this password
gateway certificate must be provided
http
The URL of the HTTP server, which
url URL value of http no
also supports the HTTPS protocol
Optional values: none, basic
HTTP authentication
auth_type no none: do not use authentication,
type
basic: use basic authentication

Website:www.minew.com Email: [email protected] 48


SHENZHEN MINEW TECHNOLOGIES CO LTD

Username for HTTP basic


username username no
authentication
Password for HTTP basic
password password no
authentication
tcp
url tcp URL value no URL of the TCP server
filter
Optional value -100 < rssi < 0
Only upload data whose signal
rssi Rssi filter threshold no
strength is greater than this value, in
dBm
Regular expression for BLE mac
Regular expression For example, if you only want to
regex_mac for BLE mac no receive BLE mac data that starts with
filtering AC23 or 0CEF, the regular
expression is: ^AC23.*|^0CEF.*
Regular expression for BLE name
For example, if you only want to
Regular expression
receive BLE name data starting with
regex_name for BLE name no
MiniBeacon or Minew, the regular
filtering
expression is:
^MiniBeacon.*|^MBeacon.*
The regular expression of BLE raw
Regular expression data is
regex_raw for BLE raw data no : if you only want to receive BLE raw
filtering data starting with 0201 or 1EEF, the
expression is: ^0201.*|^1EEF.*
Whether to filter Optional values: true, false
filter_duplicate duplicate data within no
the upload interval
Optional values: MAC, MAC+TYPE,
How to filter
duplicate_method no MAC+RAW
duplicate data

Website:www.minew.com Email: [email protected] 49


SHENZHEN MINEW TECHNOLOGIES CO LTD

Whether to upload Optional values: true, false


data to the server
upload_without_ble no
when no BLE data is
scanned
Whether to upload Optional values: true, false
upload_ibeacon no
ibeacon type data
Whether to upload Optional values: true, false
upload_s1 no
S1, S3, S4 type data
Whether to upload Optional values: true, false
upload_unknown data of type no
Unknown
Whether to upload Optional values: true, false
upload_gateway no
data of gateway type
Whether to only Optional values: true, false
accept data from When the value is true, the macList
upload_special_mac no
specific Mac parameter cannot be empty
addresses
List of Mac Enter as AABBCCDDEEFF,
special_maclist addresses that only no separated by commas
accept data Such as : AABBCCDDEEFF, BBCCDDEEFFAA, CCDDEEFFAABB

scan
Whether to enable Optional values: true, false
active no
active scanning
scan_interval Scan interval no Settable value range: 5ms~100ms

scan_window Scan window no Settable value range: 5ms~100ms

UUID format, when the request


command has requestId, the response
requestId request id Yes message will also return this field,
which is used to match the request
and response messages

Website:www.minew.com Email: [email protected] 50


SHENZHEN MINEW TECHNOLOGIES CO LTD

Configuration example:

 Change the interval for uploading data by the gateway, and it will take effect immediately

after the setting is successful. Just send the following message to topic:

/gw/${gatewayMac}/action.

{
"action":"config",
"takeEffectImmediately":"YES",
"generic" : {
"params" : {
"upload_interval" : 2000
}
},
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

 Configure the gateway to upload the data type as JSON-SHORT and filter duplicate data,

using the mac+raw method. Just send the following message to topic:

/gw/${gatewayMac}/action.

{
"action": "config",
"takeEffectImmediately": "YES",
"generic" : {
"params" : {
"data_format" : "JSON-SHORT"
}
},
"filter" : {
"params" : {
"filter_duplicate" : true,
"duplicate_method" : "mac+raw"
}
},
"requestId" : "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Website:www.minew.com Email: [email protected] 51


SHENZHEN MINEW TECHNOLOGIES CO LTD

3.5.4 Get Version Information

This command is used to obtain the current version number of the gateway and a list of version
numbers available for upgrade.
The message data fields are described in detail as follows:

field name must value


action operate Yes getVersions
UUID format, when the request command
has requestId, the response message will
requestId request id Yes
also return this field, which is used to
match the request and response messages

An example of a request message to send a control command to obtain version information is as


follows:

{
"action":"getVersions",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

The gateway returns a successful message as follows:


{
"code" : 200,
"message" : "success",
"currentVersion" : "v4.0.3",
"versions" : [ "v4.0.2","v4.0.3" ],
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

3.5.5 Get Configuration Information

This command is used to obtain the current configuration information of the gateway.

Website:www.minew.com Email: [email protected] 52


SHENZHEN MINEW TECHNOLOGIES CO LTD

The message data fields are described in detail as follows:

field name must value


action operate Yes getConfig
UUID format, when the request command
has requestId, the response message will
requestId request id Yes
also return this field, which is used to
match the request and response messages

An example of a request message to send a control command to obtain configuration information

is as follows:

{
"action":"getConfig",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

The gateway returns a successful message as follows:

Website:www.minew.com Email: [email protected] 53


SHENZHEN MINEW TECHNOLOGIES CO LTD

{
"generic" : {
"params" : {
"protocol" : "MQTT",
"upload_interval" : 1000,
"scan_number" : 1,
"data_format" : "JSON-LONG"
}
},
"mqtt" : {
"params" : {
"url" : "tcp://tagcloud.minew.com:1883",
"proxy" : "",
"qos" : 0,
"username" : "",
"password" : "",
"keepalive" : 10,
"client_id" : "ac233f15aa01",
"status_topic" : "/gw/ac233f15aa01/status",
"action_topic" : "/gw/ac233f15aa01/action",
"response_topic" : "/gw/ac233f15aa01/response",
"cafile" : "ca.crt",
"certfile" : "client.crt",
"keyfile" : "client.key",
"keypass" : ""
}
},
"http" : {
"params" : {
"url" : "http://tagcloud.minew.com:8080/gw/ac233f15aa01/status",
"auth_type" : "none",
"username" : "",
"password" : ""
}
},
"tcp" : {
"params" : {
"url" : "192.168.0.3:10000"
}
},
"filter" : {
"params" : {
"rssi" : "",
"regex_mac" : "",
"regex_name" : "",
"regex_raw" : "",
"filter_duplicate" : false,
"duplicate_method" : "mac",
"upload_without_ble" : false,
"upload_ibeacon" : true,
"upload_s1" : true,
"upload_unknown" : false,
"upload_gateway" : true,
"upload_special_mac" : false,
"special_maclist" : ""
}
},
"scan" : {
"params" : {
"active" : false,
"scan_interval" : 100,
"scan_window" : 100,
"timeout_restart" : 3
}
},
"code" : 200,
"message" : "success",
"wan_ip" : "192.168.5.27",
"requestId" : "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Website:www.minew.com Email: [email protected] 54


SHENZHEN MINEW TECHNOLOGIES CO LTD

3.5.6 Upgrade Firmware

The gateway supports sending commands remotely to the gateway to upgrade to a custom
version.
There are two ways to upgrade: public type (upgrade firmware downloaded from our company's
HTTP server, equivalent to OTA Upgrade on the webpage configuration page ), self type
(download upgraded firmware from a custom HTTP server, equivalent to the webpage
configuration page) LAN Upgrade ) .
The message data fields are described in detail as follows:

field name must value


action operate Yes upgrade
upgrade Optional values: public, self
type Yes
type
Whether to Optional values: YES, NO
save
isSave configuratio Yes
n
parameters
No Upgrade to the specified version number,
version (required the upgradeable version number can be
version
number when type obtained through getVersions
is public)
No URL path of the HTTP server where the
(required firmware is located, the gateway will
urlpath URL path
when type download the upgraded firmware to
is self) {urlpath}/{filename}
No The file name of the HTTP server where
firmware (required the firmware is located, the gateway will
filename
name when type download the upgraded firmware at
is self) {urlpath}/{filename}

Website:www.minew.com Email: [email protected] 55


SHENZHEN MINEW TECHNOLOGIES CO LTD

UUID format, when the request command


has requestId, the response message will
requestId request id Yes
also return this field, which is used to
match the request and response messages

Example of command message for public type upgrade:

{
"action":"upgrade",
"type":"public",
"isSave":"YES",
"version":"v4.0.2",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

Sample command message for self type upgrade:

{
"action":"upgrade",
"type":"self",
"urlpath":"http://192.168.0.3/firmware/",
"filename":"thingoo-upgrade.bin",
"isSave":"YES",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}

3.5.7 Remote Batch Configuration (MQTT + Default Topic)

When the G1 Bluetooth gateway uses the MQTT server and the gateway topic is the default topic,
you can use the MQTT remote configuration assistant to remotely configure the corresponding
topics and content in batches.
Prerequisites for remote + batch configuration:
1. The gateway is currently connected to the MQTT server.

Website:www.minew.com Email: [email protected] 56


SHENZHEN MINEW TECHNOLOGIES CO LTD

2. Default Action Control Topic and Control Response Topic used on gateway configuration.
3. Gateway firmware version supports remote configuration (V3.2.0, V3.2.1, V3.2.2)
For the specific process, refer to the instructions for using the MQTT remote configuration
assistant.

3.6 Disconnected Storage

The gateway off-network storage function was introduced after firmware version v2.0.0. No
settings are required, it will take effect immediately after plugging in the U disk. As long as the
gateway detects the U disk, the gateway will store the data in the U disk after the network is
disconnected. When there is a network, the gateway will preferentially upload the historical data
of the U disk in order.
Notice:
1. The format of the U disk can use FAT32, NTFS, etc. It is recommended to use the FAT32
format for better compatibility.
2. After plugging in the U disk, the U disk can be recognized by the gateway only when the
green light flashes quickly within 15 seconds. If you do not see the green light flashing quickly
within 15 seconds when the Disable leds permanently parameter is NO, it means that the format
of the USB flash drive is not compatible or the USB flash drive is not in good contact with the
gateway USB port. You can replace the USB port and try again.
3. When the gateway loses connection with the server, if you see the yellow light flashing
quickly, it means that the gateway is writing data to the U disk.
4. The gateway will not delete the private files of the U disk, but it is not recommended to store
important files in the U disk.

4. Other Configuration

4.1 Top Lights Settings

Website:www.minew.com Email: [email protected] 57


SHENZHEN MINEW TECHNOLOGIES CO LTD

The meanings of the top lights are as follows:


state meaning

Static six-color Indicates that the gateway is starting up, and pressing the RESET button in

light this state is invalid.

Dynamic white The gateway has been started and is trying to connect to the server

light rotation

Dynamic six-color If the gateway fails to connect to the server, it means that the network

light rotation (can configuration of the gateway is unsuccessful or the server is not online.

be configured as a

single color of red,

yellow, and white)

The gateway has successfully connected to the server

Dynamic breathing (Note: After the gateway is in the dynamic breathing light by default, the

light lights will be turned off after a one-minute delay to enter the energy-saving

mode. Local tyrants can set the long-light mode on the configuration page.)

lights off Indicates that the gateway is not powered on or is in power-saving mode

It means that the gateway has recognized and successfully mounted the U

Green light flashes disk. After the U disk is inserted into the gateway, if the U disk has no

quickly problem within 15 seconds, the gateway will display colorful lights in this

state.

Yellow light Indicates that the gateway is reading or writing data to the U disk

flashes quickly

By default, the Bluetooth gateway is in the normal working state (breathing light state), and the
lights will be turned off automatically after a delay of about 1 minute. You can configure the
options of the lights in LEDS CONFIGURATION, as shown in the figure below .
Website:www.minew.com Email: [email protected] 58
SHENZHEN MINEW TECHNOLOGIES CO LTD

field describe
YES: Turn off the lights, only turn on when the gateway
system is turned on, turn off the lights after the system is fully
Disable leds permanently
started
NO: turn on the lights
YES: The lantern will be on for a long time
NO: The colored lights are turned off after a delay of 1
minute, but if the gateway cannot connect to the server, the
Extended leds activity
six-color lights will always turn on and rotate.
Note: When Disable leds permanetnly is YES, this field is
invalid
When the gateway is not connected to the server, the available
Scheme color light schemes are: six-color light rotation, pure red, pure
yellow, pure white
brightness value of the colored lights is set to 1-25 , and the
Brightness
value of 25 is the brightest.
Display Time (in seconds, 0 The setting of the lighting time value, calculated in units of
means forever) seconds, 0 means it will be on for a long time

Website:www.minew.com Email: [email protected] 59


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.2 Time Configuration

The gateway does not have an RTC clock, so it is necessary to synchronize the time of the NTP

server to obtain the accurate time or manually synchronize the time of the host where the

browser is located to the gateway.

4.2.1 Synchronization Using NTP Server

Both the time zone and the NTP server address can be set. In the time configuration column of

"Other" on the web page, you can set the time zone (UTC by default) and NTP server (default is

the ntp server of openwrt). After filling in your own information, click the "Apply" button to

complete the configuration. Effective immediately. As shown below.

The default UTC time zone is 0 time zone. If the timezone is in the east time zone, it can be set

to UTC-time zone number. For example, if it is set to UTC-8, it is the time zone of our east

eighth zone;

If the timezone can be set in the western time zone, it can be set to UTC+time zone number. For

example, if it is set to UTC+8, it is the time zone of the western eighth zone.

Sync interval Indicates the interval for synchronizing time with the server. For example, if it is

set to 60, it means that the time synchronization with the server will be performed automatically

every minute.

Website:www.minew.com Email: [email protected] 60


SHENZHEN MINEW TECHNOLOGIES CO LTD

Reminder: China time zone can also be set to CST-8. For more detailed Timezone settings,

please check https://wiki.openwrt.org/doc/uci/system

4.2.2 Manual Time Setting

To manually set the gateway system time, you can click Apply with host time or click Apply.

Current time shows the time of the gateway system. As shown below.

When you click Apply with host time, the gateway will actively obtain the time of the host where

the browser is located and synchronize the time to the gateway. Before clicking Apply with host

time, the Timezone parameter must be the same time zone as the time zone of the host where the

browser is located, otherwise the time set will be different from the time zone.

When you click Apply, the gateway synchronizes the time at the time obtained to the gateway to

the gateway.

Website:www.minew.com Email: [email protected] 61


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.3 Automatic Management

The automatic management module is divided into Automatic Reboot (automatic restart) and

Timing Reboot (timed restart). As shown below.

4.3.1 Automatic Restart

The gateway does not enable the automatic restart function by default. If the gateway is

disconnected from the server for more than a specified time during the stable connection with the

server (the reason for the disconnection may be the server or the gateway network), the gateway

will automatically restart. After the gateway is restarted, if the server has not been connected to

the server, the gateway will not restart again . The automatic restart will only occur during the

process of being disconnected in the middle.

4.3.2 Scheduled Restart

The timing restart function is disabled by default on the gateway. After enabling this

function, the gateway will restart at the specified time (the time zone used by the time is the time

zone in the previous time configuration ).

Website:www.minew.com Email: [email protected] 62


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.4 Firmware Upgrade

The gateway consists of a WiFi module and a BLE module, so the gateway upgrade involves two

types of firmware: WiFi firmware and BLE firmware. It is recommended to upgrade the BLE

firmware first and then the WiFi firmware during the upgrade process .

Different firmware versions correspond to different function adjustments and upgrades, which

can be selected as needed. For details, see the following figure:

4.4.1 Wifi Firmware Upgrade

WiFi firmware upgrade supports USB upgrade, FILE upgrade, over-the-air upgrade, LAN
upgrade and upgrade of custom firmware (essentially over-the-air upgrade).

Note: During the upgrade process, the lights on the top of the gateway will change from off to

static six-color lights until they become dynamic lights (the entire upgrade process will last 2 to

3 minutes, USB upgrade is the fastest, and the air upgrade time depends on Network status), do

not disconnect the power of the gateway before the gateway lights become dynamic lights,

otherwise there is a risk of bricking . If the gateway does not display a static six-color light

within 2 minutes after clicking Upgrade, it means that the gateway has timed out to obtain the

upgrade firmware and the upgrade failed.

Website:www.minew.com Email: [email protected] 63


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.4.1.1 Over-the-air Upgrade

In the case that the gateway can connect to the external network, in the Other setting column of

the web interface, select WiFi for Firmware Type, and OTA Upgrade for Upgrade Type. If you

want to save the current configuration parameters, please check "Save current configuration" and

click "Upgrade" button and then click "OK" to confirm the upgrade. After confirming the

upgrade, the firmware will be downloaded for a period of time. If the lights on the top of the

gateway are off, it means that the gateway has finished downloading the firmware and is

upgrading. Do not disconnect the power supply during the upgrade, wait for about 3 minutes,

until the dynamic lights on the top of the gateway light up again, it means that the gateway

firmware has been upgraded successfully, and the web interface is shown in the lower bound

diagram.

Website:www.minew.com Email: [email protected] 64


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.4.1.2 FILE Upgrade

In the Other setting column of the web interface, select WiFi for Firmware Type and FILE
Upgrade for Upgrade Method. If you want to save the current configuration parameters, please
check "Save current configuration", click "Choose file" to select the firmware to be upgraded
through the browser version, click the "Upgrade" button and then click "OK" to confirm the
upgrade. At this time, if the lights on the top of the gateway are off, it means that the gateway is
being upgraded. Do not disconnect the power supply during the upgrade, wait for about 3
minutes, until the dynamic lights on the top of the gateway light up again, it means that the
gateway firmware has been upgraded successfully, and the web interface is shown in the figure
below.

4.4.1.3 LAN upgrade

In the case that the gateway cannot be upgraded via USB and cannot be connected to the external

network, select WiFi for Firmware Type and LAN Upgrade for Upgrade Type in the Other

setting bar of the web interface. If you want to save the current configuration parameters, please

tick "Save current configuration" Select it, fill in the URL of the firmware (as to how to build

HFS, please refer to the upload certificate section of MQTT access above), click the "Upgrade"

button and then click "OK" to confirm the upgrade. After confirming the upgrade, the firmware

will be downloaded for a period of time. If the lights on the top of the gateway are off, it means

that the gateway has finished downloading the firmware and is upgrading. Do not disconnect the
Website:www.minew.com Email: [email protected] 65
SHENZHEN MINEW TECHNOLOGIES CO LTD

power supply during the upgrade, wait for about 3 minutes, until the dynamic lights on the top of

the gateway light up again, it means that the gateway firmware has been upgraded successfully,

and the web interface is shown in the figure below.

4.4.1.4 Upgrade of Customized Firmware

When the gateway can be connected to the external network, in the Other setting column of the

web interface, select WiFi for Firmware Type, and Customization Upgrade for Upgrade Type,

and fill in the version number of the firmware customized by our company for customers. If you

want to save the current configuration parameters, please Check "Save current configuration",

click the "Upgrade" button and then click "OK" to confirm the upgrade. After confirming the

upgrade, the firmware will be downloaded for a period of time. If the lights on the top of the

gateway are off, it means that the gateway has finished downloading the firmware and is

upgrading. Do not disconnect the power supply during the upgrade, wait for about 3 minutes,

until the top light of the gateway lights up again, it means that the gateway firmware has been

upgraded successfully, and the web interface is shown in the figure below.

Website:www.minew.com Email: [email protected] 66


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.4.1.5 USB Upgrade

First, rename the WiFi firmware to "thingoo_WiFi_upgrade.bin", then copy the


thingoo_WiFi_upgrade.bin file to the root directory of the U disk, insert the USB interface into
the gateway device, and select WiFi, Upgrade Type for Firmware Type in the Other setting
column of the web interface Select USB Upgrade, if you want to save the current configuration
parameters, please check "Save the configuration", click the "Upgrade" button and then click
"OK" to confirm the upgrade. At this time, if the lights on the top of the gateway are off, it
means that the gateway is being upgraded. Do not disconnect the power supply during the
upgrade, wait for about 3 minutes, until the dynamic lights on the top of the gateway light up
again, it means that the gateway firmware has been upgraded successfully, and the web interface
is shown in the figure below.

Website:www.minew.com Email: [email protected] 67


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.4.2 Bluetooth Firmware Upgrade

Bluetooth firmware upgrade supports USB upgrade, air upgrade, FILE upgrade, LAN upgrade

and custom firmware upgrade (essentially air upgrade).

Note: During the upgrade process, the gateway will upgrade the firmware of all Bluetooth

modules, and the upgrade can be completed in about 30 seconds when the network is unblocked.

4.4.2.1 Over-the-air Upgrade

When the gateway can be connected to the external network, select BLE for Firmware Type in

the Other setting column of the web interface, select OTA Upgrade for Upgrade Method, select

the version number to be upgraded, click the "Upgrade" button, and then click "OK" to

confirm the upgrade. The web interface is shown in the figure below.

4.4.2.2 FILE Upgrade

In the Other setting column of the web interface, select BLE for Firmware Type, select FILE

Upgrade for Upgrade Method, click "Choose file" to select the firmware version to be upgraded

Website:www.minew.com Email: [email protected] 68


SHENZHEN MINEW TECHNOLOGIES CO LTD

through the browser, click the "Upgrade" button, and then click "OK" to confirm the upgrade.

The web interface is shown in the figure below.

4.4.2.3 LAN Upgrade

In the Other setting column of the web interface, select BLE for Firmware Type, and LAN

Upgrade for Upgrade Method, and fill in the URL of the firmware (for details on how to build

HFS, please refer to the uploading certificate section of MQTT service access). Click the

"Upgrade" button and then click the "Upgrade" button. Click "OK" to confirm the upgrade.

The web interface is shown in the figure below.

4.4.2.4 Upgrade of Custom Firmware

When the gateway can be connected to the external network, select BLE for Firmware Type and

Website:www.minew.com Email: [email protected] 69


SHENZHEN MINEW TECHNOLOGIES CO LTD

Customization Upgrade for Upgrade Method in the Other setting column of the web interface,

fill in the version number of the firmware customized by our company for customers, click the

"Upgrade" button and then click "OK" to confirm the upgrade. The web interface is shown in

the figure below.

4.4.2.5 USB Upgrade

First rename the Bluetooth firmware to "thingoo_ble_upgrade.zip", then copy the

thingoo_ble_upgrade.zip file to the root directory of the U disk, insert the USB interface into the

gateway device, select BLE for Firmware Type in the Other setting column of the web interface,

and select BLE in the web interface. In the Other setting column of the interface, select USB

Upgrade for Upgrade Type, click the "Upgrade" button, and then click "OK" to confirm the

upgrade. The web interface is shown in the figure below.

Website:www.minew.com Email: [email protected] 70


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.5 Troubleshooting

To check whether the network configuration of the gateway is normal, you can use the ping and

traceroute commands. The ping command is a common command to check whether the network

is unblocked, and the traceroute command can display the routers that the data packets pass

through to reach the destination address, so as to determine the node where the problem lies. The

two are often used together.

4.5.1 Command Ping

Ping is used to determine whether the specified target address can be accessed, and to detect

whether the gateway network is unobstructed.

The interface fields are described in detail below.


field describe
Command Alternative network test commands, select the ping command
Max time to execute Command maximum execution time setting (5-120), in
command seconds, the default is 5 seconds
Number of packets sends
The number of packets sent (1-50), the default is 1
only
Host/IP The target host or address, the default is www.baidu.com

Website:www.minew.com Email: [email protected] 71


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.5.2 Command Traceroute

traceroute can check the routing status of the data packets to the destination address, so as to

determine the node where the problem is.

The interface fields are described in detail below.


field describe
Alternative network test commands, select the traceroute
Command
command
Max time to execute Command maximum execution time setting (5-120), in
command seconds, the default is 5 seconds
Max number of hops Maximum number of hops (1-30), the default is 1
Host/IP The target host or address, the default is www.baidu.com

4.6 Restart the Gateway

Click the Reboot button in the "Other" column of the webpage to achieve a one-key restart, as

shown in the figure below.

Website:www.minew.com Email: [email protected] 72


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.7 Factory Reset

There are two ways to restore the factory settings: through the Reset button of the gateway or

through the web page configuration

According to any of the following methods, if the lights on the top of the gateway are turned off

first, and then the static six-color ring lights turn on after a few seconds, it means that the factory

settings have been successfully restored and the gateway is starting.

Since the previous configuration will be lost after restoring to factory settings, please

operate with caution.

4.7.1 Reset Button

In the fully activated state, that is, when the gateway lights are dynamically bright, use a sharp

object to press and hold the reset button of the device through the reset hole for more than 5s and

then release it, and the device will be restored to factory settings.

4.7.2 Web Page Configuration

Click the "Factory Reset" button in the "Other" page to restore the factory settings, as shown

in the figure below.

Website:www.minew.com Email: [email protected] 73


SHENZHEN MINEW TECHNOLOGIES CO LTD

4.8 Brick Rescue Mode

When the gateway is powered off during the upgrade process, or the wrong firmware is flashed,

the gateway may become bricked. There are two ways to save the brick, one is through the web

page (mini-web server), and the other is serial port burning.

4.8.1 Mini-web Server

At present, only the 128MB memory gateways shipped after 2019.5.15 can support the rescue of

bricks through the uboot webpage. If you are not sure whether to use this method, you can judge

by the following methods:

1. Power off the gateway device (or unplug the power cord).

2. Use the pins to press and hold the RESET button on the gateway device without releasing it,

then power up the gateway ( or plug in the power cord).

3. 6 -color light to the static white light within 6 seconds , it means that the gateway can use this

method to save the brick, otherwise it is not supported.

Steps:
1. Power off the gateway device (or unplug the power cord).
2. Use the network cable to directly connect the gateway network port and the computer. At this
time, the network port is the LAN port. In addition to this case, the network port can only be
used as a WAN port.
3. Use the pin to press and hold the RESET button of the gateway device without releasing it,
then power up the gateway (or plug in the power cord).
4. The gateway will change from the static 6 -color light to the static white light within 6 seconds.
After entering the static white light state, it means that the gateway has started the web server,
and you can release the RESET button at this time .
5 . The uboot firmware does not support dhcp mode, so the computer should set a static ip
address in advance, the parameters are as follows:
ip: 192.168.99.2 , subnet mask: 255.255.255.0 , gateway: 192.168.99.1 .
6. Enter 192.168.99.1 on the computer browser to enter the web interface of the gateway. Upload

Website:www.minew.com Email: [email protected] 74


SHENZHEN MINEW TECHNOLOGIES CO LTD

the firmware upgrade package of the WiFi module according to the prompt on the webpage, and
click upgrade to complete the rescue of the brick.
7 . The web interface is shown in the figure below. Note that you should update the WiFi module
firmware when the gateway is bricked. Do not update U-Boot without special instructions . Do
not disconnect the power supply during the firmware update process.

4.8.2 Serial Programming

Serial programming needs to open the gateway shell, connect the serial cable and other
operations. It is more complicated and is not provided for the time being. The gateway using
64MB Flash needs to save the brick in this way. If required, please contact our sales team for
operating instructions.

5. Statement

Statement of rights: This manual and all the contents contained therein are owned by Shenzhen
Yunliwuli Technology Co., Ltd. and are protected by relevant copyright laws in Chinese laws
and applicable international conventions. The company has the right to change the contents of
this manual according to the needs of technological development, and the changed version will
not be notified. Without the written permission and authorization of the company, any individual,
Website:www.minew.com Email: [email protected] 75
SHENZHEN MINEW TECHNOLOGIES CO LTD

company, or organization shall not modify the contents of this manual or use part or all of the
contents of this manual in other ways. Violators will be held accountable according to law.
Disclaimer: Shenzhen Yunliwuli Technology Co., Ltd. reserves the final right of interpretation
for the differences between this manual and the actual product, and is subject to change without
prior notice. The company does not assume the responsibility for property or personal injury
caused by the abnormal operation of the customer. Please develop the corresponding product
according to the technical specifications and reference design in the manual.

Website:www.minew.com Email: [email protected] 76

You might also like