G1-E-cherry Configuration Guide
G1-E-cherry Configuration Guide
MODEL NO/DESCRIPTION
Product Name: Bluetooth® Smart IoT Gateway
Model: G1-E-cherry
Version V001
Table of contents
Preface............................................................................................................................................. 1
1. Basic Configuration..................................................................................................................... 1
1.3 AP Configuration............................................................................................................... 6
2. Network Configuration................................................................................................................ 9
4. Other Configuration...................................................................................................................57
4.5 Troubleshooting............................................................................................................... 71
5. Statement................................................................................................................................... 75
Website:www.minew.com Email: [email protected] 2
SHENZHEN MINEW TECHNOLOGIES CO LTD
Preface
1. Basic Configuration
There are two ways to enter the web configuration page of the gateway.
AP mode is only used for gateway configuration, and will not affect the current networking
MAC address. Users can scan and connect with a computer or mobile phone. By default, no
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).
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.
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
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
IP address is no longer 192.168.99.1, and the IP address obtained by the gateway needs to be
Some enterprise-level routers can view the ARP list (the list of IP addresses and MAC addresses)
$ sudo arp-scan -l
Run the command to filter out the MAC address of the gateway
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
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
The default login password on the gateway configuration page is empty, and you can log in
directly by clicking login. For security, please set the administrator login password in ADMIN
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
Note: The shutdown of the WiFi hotspot will not affect the current gateway's networking
method as a client.
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
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
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.
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
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
2. Network Configuration
The G1 Bluetooth gateway can connect to the network in three ways. The default is in the dhcp
The G1 Bluetooth gateway can be directly connected to the Ethernet to realize data
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
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
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
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
In the status item of the gateway WEB configuration interface, the current connection status and
The G1 Bluetooth gateway can be used as a WLAN client to connect to a WLAN AP to realize
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
In the Wireless setting column of the Network configuration interface, Profile list is a list of
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
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).
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
In the Wireless setting column of the Network configuration interface, Profile list is a list of
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
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
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.
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
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.
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.
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
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
There are the following 6 data types in the format of the JSON array uploaded by the G1
Bluetooth gateway:
type illustrate
https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf
S1 Sensor BLE data type, Minewtech's S1 temperature and humidity sensor. For specific
S3 Sensor BLE data type, Minewtech's S3 temperature and humidity sensor. For specific
S4 Sensor BLE data type, S4 door magnetic alarm sensor from Minewtech. For specific
Gateway Does not belong to the BLE data type,indicates the current state of the gateway
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
In addition, a data type of Gateway is added to indicate that the data of the json array is uploaded
by the gateway.
[
{
"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"
}
]
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
Binary data format is divided into long and short data format, the format is as follows:
Protocol Header Data Length Gateway MAC Address Number of BLE BLE frame=Body*Number of BLE Protocol Tail
illustrate Fixed protocol the length of the Gateway's MAC Number of BLE BLE frame=number of BLE fixed protocol trailer
Body
Include Include does not contain does not does not contain Include
Short
contain
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
Response byte
bit 7 -- 3 2 1 0
address type
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
Body
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
00 NULL 05 D5
00 NULL 05 D0
9 6D24188177A4 0002
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
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
frame header
Body
BLE
Number of BLE Data
NO. BLE MAC Address
BLE Data rssi
A4
1 ABCD EF06 0006 0002
A4
AE
AF
AB
8 C1EB 07D2 E9AA 0002
AB
A5
9 C989 CE35 C7B6 0002
A8
AB
11 D37C 4F0B 2B52 0002
AC
B4
14 E6 F5D3 6082 A2 0002
B5
BF
15 EA D25C 1986 FC 0002
C0
C2
C2
A9
19 FDFC D4FB 5D98 0002
AA
The G1 Bluetooth gateway currently supports the use of MQTT, HTTP, and TCP network
Users can choose a suitable network protocol according to their server architecture, and the
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
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.
When using MQTT access, the G1 Bluetooth gateway supports the function of regularly
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
details .
When using MQTT access, it supports Proxy Socks5 (the proxy resolves the URL hostname).
username: password@host:1080
username:password@host
username@host:1080
username@host
host:1080
host
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.
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.
When using HTTP access, the G1 Bluetooth gateway only supports the function of regularly
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.
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.
When using TCP access, the G1 Bluetooth gateway only supports the function of regularly
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.
The data filtering for access to the three services is the same, as shown in the following figure.
This part of the parameters is used to configure the scanning strategy of the Bluetooth module.
As shown below.
Active Scan enable active packet is actively broadcast by the BLE tag; the scan
3. If your BLE tag does not scan for reply packets, you
can set this parameter to NO, which can improve the scan
Scan Interval Scan interval Scan interval and scan scan window are used together.
Scan Window Scan window scan interval parameter. When the two are equal, the scan
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.
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.
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.
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
A sample request message of the control command to restart the gateway is as follows:
{
"action": "reboot",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
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 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
{
"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"
}
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
scan
Whether to enable Optional values: true, false
active no
active scanning
scan_interval Scan interval no Settable value range: 5ms~100ms
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"
}
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:
{
"action":"getVersions",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
This command is used to obtain the current configuration information of the gateway.
is as follows:
{
"action":"getConfig",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
{
"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"
}
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:
{
"action":"upgrade",
"type":"public",
"isSave":"YES",
"version":"v4.0.2",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
{
"action":"upgrade",
"type":"self",
"urlpath":"http://192.168.0.3/firmware/",
"filename":"thingoo-upgrade.bin",
"isSave":"YES",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
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.
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.
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
Static six-color Indicates that the gateway is starting up, and pressing the RESET button in
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
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
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
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
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.
Reminder: China time zone can also be set to CST-8. For more detailed Timezone settings,
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.
The automatic management module is divided into Automatic Reboot (automatic restart) and
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
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
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
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
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.
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.
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,
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.
Bluetooth firmware upgrade supports USB upgrade, air upgrade, FILE upgrade, LAN 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.
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.
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
through the browser, click the "Upgrade" button, and then click "OK" to confirm the 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.
When the gateway can be connected to the external network, select BLE for Firmware Type and
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
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
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
Ping is used to determine whether the specified target address can be accessed, and to detect
traceroute can check the routing status of the data packets to the destination address, so as to
Click the Reboot button in the "Other" column of the webpage to achieve a one-key restart, as
There are two ways to restore the factory settings: through the Reset button of the gateway or
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
Since the previous configuration will be lost after restoring to factory settings, please
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.
Click the "Factory Reset" button in the "Other" page to restore the factory settings, as shown
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
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
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,
3. 6 -color light to the static white light within 6 seconds , it means that the gateway can use this
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
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.
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.