← AB BLE Gateway V4 Main Page

Performance

  • Scan duration = 1 second
  • 以太网连接时,每秒最多上传210条广播数据
  • WiFi连接时,每秒最多上传150条广播数据

数据格式

Gateway V4以MessagePackopen in new window格式提交数据.

MessagePack

MessagePack是一个高效的二进制序列化格式. 它让你像JSON一样可以在各种语言之间交换数据。但是它比JSON更快、更小. 这种格式小巧快速,支持超过50种编程语言和环境。

Keys

解包之后的数据是一个字典,包含如下键值:

  • v - firmware version
  • mid - message ID
  • time - 启动时长,以秒计算
  • ip - gateway的IP
  • mac - gateway的mac address
  • rssi - gateway的WiFi连接信号强度RSSI. 仅当使用WiFi连接时才会出现,从固件v1.5.0开始加入
  • iccid - 4G模块的ICCID. 仅当使用4G连接时才会出现,从固件v1.5.3开始加入
  • devices - 一个由BLE广播包组成的数组, 这些广播包都是gateway收集到的

devices数组中包含BLE广播的原始内容. 下面是一个数据帧的示例,参考"Data Format For Key Devices"

00 12 3b 6a 1a 64 cf aa 02 01 06 1a ff 4c 00 02 15 b5 b1 82 c7 ea b1 49 88 aa 99 b5 c1 51 70 08 d9 00 01 cf 64 c5

Bytes说明示例
byte 1advertising type, see the table below00
byte 2 - 7mac address for BLE device12 3b 6a 1a 64 cf
byte 8RSSI, minus 256 for real valueaa, 0xaa - 256 = -86
byte 9 -Advertisement data02 01 06 1a ff 4c 00 02 15 b5 b1 82 c7 ea b1 49 88 aa 99 b5 c1 51 70 08 d9 00 01 cf 64 c5

devices数组的一条数据的例子

示例数据

hex=02C8FD1949A530CE0201061AFF4C000215EB6D469624BE4663B15230D46B0E9CC9000D002AC0

DataDescription
02adv type
C8FD1949A530mac address
CErssi
0201061AFF4C000215EB6D469624BE4663B15230D46B0E9CC9000D002AC0raw advertising data

Advertising Type Code

CodeDescription
0Connectable undirected advertisement
1Connectable directed advertisement
2Scannable undirected advertisement
3Non-Connectable undirected advertisement
4Scan Response

Configuration options

Application options

Advertising filter

  1. Allow All Advertising Data: scan all data, default
  2. iBeacon Only: scan iBeacon data only. Please search iBeacon protocol for more information
  3. Eddystone UID Only: scan Eddystone UID only
  4. Eddystone URL Only: scan Eddystone URL only
  5. Sensor mode, supports some Xiaomi sensor: Experimental feature, scan only xiaomi sensors such as temperature/humidity sensor
  6. iBeacon And Eddystone TLM Plain: scan iBeacon And Eddystone TLM Plain data only
  7. Eddystone UID And Eddystone TLM Plain: scan Eddystone UID And Eddystone TLM Plain only
  8. Eddystone URL And Eddystone TLM Plain: scan Eddystone URL And Eddystone TLM Plain only

For more information about eddystone protocol, please check the specificationopen in new window

Manufacture Filter

The general structure of advertising packets is described in BLE Advertising Data Basics. Manufacturer-specific data can be used to add any custom data into advertising packets in any format suitable for your application. For example, you could create a beacon that includes the reading of a temperature sensor in the advertising data.

See the image below which contains company ID 02FF for company Silicon Labs. You can input "Manufacture Filter" = 02FF to scan the advertising data only

advdata

硬件

LED指示灯状态

以太网接口有一个绿色指示灯和黄色指示灯

指示灯说明
绿色在以太网启动时开始闪烁
黄色在获得IP后常亮

PCB原理图以及布局

PCB Layout

PCB尺寸图

引脚

引脚说明
J3ESP32模块I2C端口
P2ESP32模块的烧写引脚
P3NRF52832模块的烧写引脚
P4NRF52832模块的串口

J3 引脚

PCB v5.4

  • VCC
  • GND
  • GPIO16
  • GPIO04

PCB v5.3

  • VCC
  • GND
  • GPIO07
  • GPIO06
Last Updated:
Contributors: yanc, volca