ARMmbed / mbed-os-example-lorawan

Simple LoRaWAN example application for mbed OS
Apache License 2.0
80 stars 93 forks source link

OTAA Failed - Check Keys with B-L072Z-LRWAN1 #90

Closed diegolondel closed 6 years ago

diegolondel commented 6 years ago

Hi everyone, I'm working on this example with a B-L072Z-LRWAN1. When I run it it shows:

 Mbed LoRaWANStack initialized 
 CONFIRMED message retries : 3 
 Adaptive data  rate (ADR) - Enabled 
 Connection - In Progress ...
 OTAA Failed - Check Keys 

I have checked the keys and they look fine. In the gateway I can see traffic from the B-L072Z-LRWAN1. Gateway receives a "Join Request" and sends a "Join Accept", but apparently there is not connection and node shows "OTAA Failed - Check Keys". Any idea to correct this? Thanks!

ciarmcom commented 6 years ago

ARM Internal Ref: IOTCELL-1187

kivaisan commented 6 years ago

@diegolondel Your board is known to have an uncalibrated chrystal. Please check https://github.com/ARMmbed/mbed-os-example-lorawan/issues/21#issuecomment-366937981

diegolondel commented 6 years ago

@kivaisan I expanded max_sys_rx_error and it worked. Thanks!

kivaisan commented 6 years ago

@diegolondel Great. Adjusting chrystal TRIM bits is a better solution as it improves all timers' accuracy, so I recommend to do that.

I'll close this ticket as resolved.

mamanbudiman commented 4 years ago

Hello all and @kivaisan Now, I am using RAK811 board and mbed-os-example-lorawan. Sometime, RAK811 board can connect to the loraserver in OTAA mode, but sometime can not. I am looking for max_sys_rx_error variable, but I can not find it. Is it possible the new repository of mbed-os-example-lorawan is different from the previous one. Also, I tried to change RCC_HSICALIBRATION_DEFAULT parameter, but still failed to connect to loraserver.

kivaisan commented 4 years ago

@mamanbudiman RX error variable can be configured via "lora.max-sys-rx-error" (https://github.com/ARMmbed/mbed-os/blob/32f615e420ae51c983c56f947daab4e761e8d809/features/lorawan/mbed_lib.json#L72-L75).

In order to play with calibration values, you must measure the impact. All boards all unique in this, so just randomly changing the tuning value can make things worse.

mamanbudiman commented 4 years ago

Ok, thank you It is working now,