zephyr: LoRaWAN sample for 96b_wistrio - Tx timeout
Describe the bug I ran into the following issue trying to run the lorawan sample on the 96b_wistrio board: I get a Tx timeout error every time a join request or message is sent. Tried to join using ABP as well, then the join request succeeds, however any messages sent still result in a Tx timeout.
To Reproduce
- west build -b 96b_wistrio -s samples/lorawan/class_a/
- west flash
Expected behavior Join TTN using OTAA and then periodically send a message.
Logs and console output sample output using OTAA:
*** Booting Zephyr OS build zephyr-v2.4.0-1018-g1b3abc096cc4 ***<\r><\n>
[00:00:00.200,000] <27>[0m<inf> sx1276: SX1276 Version:12 found<27>[0m<\r><\n>
[00:00:00.263,000] <27>[0m<inf> lorawan_class_a: Joining network over OTAA<27>[0m<\r><\n>
[00:00:04.314,000] <27>[1;31m<err> lorawan: MlmeConfirm failed : Tx timeout<27>[0m<\r><\n>
[00:00:04.314,000] <27>[1;31m<err> lorawan_class_a: lorawan_join_network failed: -116<27>[0m<\r><\n>
In case of the OTAA I only changed the EUIs and the App key, rest is the original sample code. The curious thing is that the join request is actually sent and received by the gateway, in spite of the Tx timeout.

In the latter run I used the following code to join using ABP:
join_cfg.mode = LORAWAN_ACT_ABP;
join_cfg.dev_eui = dev_eui;
join_cfg.abp.app_eui = join_eui;
join_cfg.abp.app_skey = apps_key;
join_cfg.abp.nwk_skey = nws_key;
join_cfg.abp.dev_addr = dev_addr;
LOG_INF("Joining network over ABP");
ret = lorawan_join(&join_cfg);
if (ret < 0) {
LOG_ERR("lorawan_join_network failed: %d", ret);
return;
}
output using ABP:
*** Booting Zephyr OS build zephyr-v2.4.0-1018-g1b3abc096cc4 ***<\r><\n>
[00:00:00.200,000] <27>[0m<inf> sx1276: SX1276 Version:12 found<27>[0m<\r><\n>
[00:00:00.263,000] <27>[0m<inf> lorawan_class_a: Joining network over ABP<27>[0m<\r><\n>
[00:00:00.263,000] <27>[0m<inf> lorawan_class_a: Sending data...<27>[0m<\r><\n>
[00:00:04.278,000] <27>[1;31m<err> lorawan: McpsRequest failed : Tx timeout<27>[0m<\r><\n>
[00:00:04.278,000] <27>[1;31m<err> lorawan_class_a: lorawan_send failed: -116<27>[0m<\r><\n>
In spite of getting the Tx timeout error again, the message is sent and received by the gateway as shown in the app data stream.

I’m stuck on this one since the weekend and really starting to pull my hair out. Tried to search what the error actually means and from what I’ve read it’s supposed to be caused when the radio chip is not responding, what should not be the case here, since the data is actually being sent. Moreover the rak811 has the mcu and the sx1276 integrated so I doubt a corrupted connection is at fault.
Any help would be much appreciated.
Environment:
- OS: Windows 10
- Toolchain: GNU Arm Embedded Toolchain Version 9-2020-q2
- Commit SHA or Version used: seen in output logs
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (5 by maintainers)
Hi @Mani-Sadhasivam The TX Timeout for me comes in after the first attempt is failed. Due to DutyCycle backing off, but its not applicable for IN865 as per documentation.It is mentioned in ChangeLog as DutyCycle Fixes for IN865… I just did a PR with the updated 4.4.5 which has fixed it for me. Please Review