IAP BLE数据转发

Aruba AP支持基于 Wi-Fi(例如 Wi-Fi 跟踪)、BLE(例如资产跟踪和传感器监控)、ZigBee 和通过 USB 扩展的第三方协议的物联网应用,支持使用 Aruba 接入点作为协议转换网关。

本文测试使用IAP BLE转发beacon信息流。其中transportProfile http方式可以获取json格式的一些BLE信息,但是没有ble data信息。如果想转发BLE data,需要使用Websocket方式。

如果采用控制器方式,参考文档https://iot-utilities.arubademo.de/docs/aruba/configuration-examples/ble-telemetry/aruba_ble_telemetry_hypros_8_8.html

IAP配置如下:

iot radio-profile 111
 radio-mode ble

iot transportProfile http
 endpointURL http://192.168.10.137:8000/111
 endpointType telemetry-https
 endpointToken 333
 transportInterval 10
 bleDataForwarding 
 macOuiFilter f4b85e

iot transportProfile ws
 endpointURL ws://192.168.10.137:8030/333
 endpointType telemetry-websocket
 endpointToken 444
 transportInterval 10
 bleDataForwarding 
 macOuiFilter f4b85e     //过滤收取beacon mac

iot use-radio-profile 111
iot useTransportProfile ws

IAP转发后的消息是Protocol Buffer格式,需要解码。具体解码库在ASP下载:

抓包收到的结构化数据

解码后的数据:

[2025-01-09T03:17:33.659Z] {
  "meta": {
    "version": "1",
    "accessToken": "444",
    "nbTopic": "bleData"
  },
  "reporter": {
    "name": "LivingRoom",
    "mac": "lGQkwfPq",
    "ipv4": "192.168.10.162",
    "hwType": "AP-635",
    "swVersion": "8.10.0.6-8.10.0.6",
    "swBuild": "86193",
    "time": "1736392653"
  },
  "bleData": [
    {
      "mac": "qOLBMPMU",
      "frameType": "adv_nonconn_ind",
      "data": "AgEEGv9MAAIVQVJVTvmbSjuG0JRwcGk6eAAAgAPI",
      "rssi": -85,
      "addrType": "addr_type_public",
      "apbMac": "KN5lWX8A"
    }
  ]
}

常用排错命令:

LivingRoom# show ap debug ble-config 
主要看配置的 IOT  Radio和Transport Profiles 有没有生效。
============================================================
                     IOT Radio Profiles
============================================================
Profile Name              : 111
Radio Instance            : Internal
Radio Mode                : BLE
BLE Mode                  : beaconing scanning
BLE Console               : Off
BLE/ZigBee Tx Power (dBm) : 1
-----------------------------------------------
============================================================
                   IOT Transport Profiles
============================================================
BLE IoT Transport Context Config ID: 97
Last Sync Time: 2025-01-09 12:13:23 
----------------------------------------------
Name                       :222
Identifier                 :1736392799
ServerType                 :Telemetry Websocket
Last Update Sent           :2025-01-09 12:14:46 
Num. Updates Sent          :558084
ReportingInterval          :10 second
DeviceClassFilter          :None(31)
RSSI Reporting             :Average
EnvironmentType            :office
CustomFadingFactor         :20
bleDataForwarding          :TRUE
DataFilter                 :00 00 
macOuiFilter               :f4b85e 
============================================================
LivingRoom# show ap debug ble-relay 查看转发
查看ws server链接状态。
LivingRoom# show ap debug ble-relay report 

---------------------------Profile[222]---------------------------

WebSocket Connect Status                : Connection Established 
WebSocket Connection Established        : Yes
Location Id                             : Not Configured
Websocket Address                       : ws://192.168.10.137:8030/333
WebSocket Host                          : 192.168.10.137:8030
WebSocket Path                          : 333
Vlan Interface                          : Not Configured
Current WebSocket Started at            : 2025-01-09 12:18:34 
Previous WebSocket Terminated at        : 2025-01-09 12:18:17 
Web Proxy                               : NA
Proxy Username&password                 : NA, NA
Last Send Time                          : 2025-01-09 12:18:38 
Websocket Write Stats                   : 21 (3173B)
Websocket Write WM                      : 0B (0)
Websocket Read Stats                    : 0 (0B)

如果不会构建http或者websocket服务端,测试可以用安卓APP(loT-Utilities),这个是Aruba出的IOT测试工具。配置很简单,根据向导完成。点击启动server,再次点击获取相关URL(图2),获取到的信息(图3)。

请登录评论。