LoRaWAN OTAA TTN 超时,网关捕获消息
Posted
技术标签:
【中文标题】LoRaWAN OTAA TTN 超时,网关捕获消息【英文标题】:LoRaWAN OTAA TTN Timedout with Gateway capturing the message 【发布时间】:2021-12-11 20:52:21 【问题描述】:我尝试在 LoRaWAN 中设置一个终端节点。 我使用 ST Microelectronics 的板 b_l072z_lrwan1 和 Zephyr OS。 我在 VSCode 上使用 PlatformIO。
我使用 GitHub 上的代码https://github.com/fcgdam/zLorawan_Node。
这是我在网关上看到的(所有 EUI 都将更改):
"name": "gs.up.receive",
"time": "2021-10-26T12:54:26.556184636Z",
"identifiers": [
"gateway_ids":
"gateway_id": "bzm-testing-gateway"
,
"gateway_ids":
"gateway_id": "bzm-testing-gateway",
"eui": "B827EBFFFE6F34C2"
],
"data":
"@type": "type.googleapis.com/ttn.lorawan.v3.UplinkMessage",
"raw_payload": "ACIiIiIRERERcLPVftAEdD2GalaJt3Y=",
"payload":
"m_hdr": ,
"mic": "Vom3dg==",
"join_request_payload":
"join_eui": "1111111122222222",
"dev_eui": "3D7404D07ED5B370",
"dev_nonce": "6A86"
,
"settings":
"data_rate":
"lora":
"bandwidth": 125000,
"spreading_factor": 12
,
"coding_rate": "4/5",
"frequency": "868500000",
"timestamp": 1014604052,
"time": "2021-10-26T12:54:26.535592Z"
,
"rx_metadata": [
"gateway_ids":
"gateway_id": "bzm-testing-gateway",
"eui": "B827EBFFFE6F34C2"
,
"time": "2021-10-26T12:54:26.535592Z",
"timestamp": 1014604052,
"rssi": -45,
"channel_rssi": -45,
"snr": 9.8,
"uplink_token": "CiEKHwoTYnptLXRlc3RpbmctZ2F0ZXdheRIIuCfr//5vNMIQlMLm4wMaDAiC9d+LBhCnrZWIAiCg7PTYwx0=",
"channel_index": 2
],
"received_at": "2021-10-26T12:54:26.553997991Z",
"correlation_ids": [
"gs:conn:01FJY9PGVXJ4SE6B1SF1KDCYR4",
"gs:uplink:01FJYAN3FVJJSC368C2PHTXN93"
]
,
"correlation_ids": [
"gs:conn:01FJY9PGVXJ4SE6B1SF1KDCYR4",
"gs:uplink:01FJYAN3FVJJSC368C2PHTXN93"
],
"origin": "ip-10-100-5-46.eu-west-1.compute.internal",
"context":
"tenant-id": "CgN0dG4="
,
"visibility":
"rights": [
"RIGHT_GATEWAY_TRAFFIC_READ",
"RIGHT_GATEWAY_TRAFFIC_READ"
]
,
"unique_id": "01FJYAN3FWYZ8BTA8HKB2VYB2V"
对我来说,这意味着网关收到了一个好的请求。这是我在 ZephyrOS 上的配置。
#define LORAWAN_DEV_EUI 0x3D, 0x74, 0x04, 0xD0, 0x7E, 0xD5, 0xB3, 0x70 // LSB Format!
#define LORAWAN_JOIN_EUI 0x11, 0x11, 0x11, 0x11, 0x22, 0x22, 0x22, 0x22
#define LORAWAN_APP_KEY 0x33, 0xE6, 0xF7, 0xF7, 0x5B, 0x46, 0xD2, 0xDC, 0x7F, 0xC4, 0x7C, 0x5F, 0x94, 0x56, 0x06, 0x43
我的请求因 errno -116 超时,即 ETIMEOUT
这是我在 TTN 中的设备配置:
你知道为什么我的请求超时了吗?
【问题讨论】:
【参考方案1】:我已经在 LSB 中编写了 DEV_EUI 但是,TTN 似乎在 MSB 中得到了它,当我颠倒字节顺序时它就起作用了。
【讨论】:
以上是关于LoRaWAN OTAA TTN 超时,网关捕获消息的主要内容,如果未能解决你的问题,请参考以下文章