Comments (5)
Hi dzurikmiroslav
I just tried master on my avr demo board to see if I've broken anything lately. I've been resetting the node to see if I can get the join to fail but for me it works correctly nearly every time.
I managed to reproduce your problem once but wasn't able to collect the frame log, and now it continues to work perfectly.
I suspect there might be some edge case where the cached join request message is clobbered. I want to confirm that the exact same join accept message gets sent on each retry. Can you see the gateway traffic log?
If you don't have access, don't worry, I'll set something up on my simulator but it might take me a few days.
edit:
I've reproduced it again. It looks like a repeating dev nonce (which can happen in LoRaWAN 1.0) but I swear I saw TTN send a join accept, which it shouldn't.
The repeating frames are identical, which rules out clobbering.
Can you confirm that your dev nonce is different when you reset the device?
With the LDL_DISABLE_POINTONE option, dev nonce should be randomised on each new join request (i.e. after you reset the device).
from lora_device_lib.
I were try instead of ESP-IDF use Arduino framework, and code start working normally. Problem were that in LDL_Chip_write
and LDL_Chip_read
I used spi_device_transmit
, which make SPI transaction. Arduino SPI.transfer
not make new transaction...
from lora_device_lib.
After more testing, I reached the problem is when first join attempt is unsuccessful (maybe signal strength problem etc...). When first join attempt is successful, node start sending data.
I modify handler function:
case LDL_MAC_TX_BEGIN:
ESP_LOGI(TAG, "LDL_MAC_TX_BEGIN devNonce=%d", mac.devNonce);
break;
Log from successful join:
I (94) main: Starting...
1229: LDL_MAC_addChannel: debug: adding chIndex=0 freq=868100000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=1 freq=868300000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=2 freq=868500000 minRate=0 maxRate=5
I (94) main: LDL_MAC_RESET
I (94) main: LDL_MAC_STARTUP
I (59994) main: LDL_MAC_ready
I (59994) main: LDL_MAC_otaa
216: LDL_MAC_otaa: debug: sending join in 23758066 ticks
I (83694) main: LDL_MAC_TX_BEGIN devNonce=23989
I (83794) main: LDL_MAC_TX_COMPLETE
I (88694) main: LDL_MAC_RX1_SLOT
I (88794) main: LDL_MAC_DOWNSTREAM
1229: LDL_MAC_addChannel: debug: adding chIndex=0 freq=868100000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=1 freq=868300000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=2 freq=868500000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=3 freq=867100000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=4 freq=867300000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=5 freq=867500000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=6 freq=867700000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=7 freq=867900000 minRate=0 maxRate=5
I (88894) main: LDL_MAC_JOIN_COMPLETE
I (89494) main: LDL_MAC_ready
I (89494) main: LDL_MAC_unconfirmedData
I (89494) main: LDL_MAC_TX_BEGIN devNonce=23990
I (89494) main: LDL_MAC_TX_COMPLETE
I (90494) main: LDL_MAC_RX1_SLOT
I (91494) main: LDL_MAC_RX2_SLOT
I (91894) main: LDL_MAC_DATA_COMPLETE
Log from unsuccessful join:
I (94) main: Starting...
1229: LDL_MAC_addChannel: debug: adding chIndex=0 freq=868100000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=1 freq=868300000 minRate=0 maxRate=5
1229: LDL_MAC_addChannel: debug: adding chIndex=2 freq=868500000 minRate=0 maxRate=5
I (94) main: LDL_MAC_RESET
I (94) main: LDL_MAC_STARTUP
I (59994) main: LDL_MAC_ready
I (59994) main: LDL_MAC_otaa
216: LDL_MAC_otaa: debug: sending join in 39518844 ticks
I (99494) main: LDL_MAC_TX_BEGIN devNonce=12023
I (99494) main: LDL_MAC_TX_COMPLETE
I (104494) main: LDL_MAC_RX1_SLOT
I (105494) main: LDL_MAC_RX2_SLOT
I (106194) main: LDL_MAC_JOIN_TIMEOUT
950: LDL_MAC_process: debug: dither retry by 17082309 ticks
I (129394) main: LDL_MAC_TX_BEGIN devNonce=12023
I (129494) main: LDL_MAC_TX_COMPLETE
I (134494) main: LDL_MAC_RX1_SLOT
I (135494) main: LDL_MAC_RX2_SLOT
I (136494) main: LDL_MAC_JOIN_TIMEOUT
950: LDL_MAC_process: debug: dither retry by 27441593 ticks
I (174694) main: LDL_MAC_TX_BEGIN devNonce=12023
I (174894) main: LDL_MAC_TX_COMPLETE
I (179894) main: LDL_MAC_RX1_SLOT
I (180894) main: LDL_MAC_RX2_SLOT
I (181794) main: LDL_MAC_JOIN_TIMEOUT
950: LDL_MAC_process: debug: dither retry by 29505280 ticks
I (229794) main: LDL_MAC_TX_BEGIN devNonce=12023
I (230094) main: LDL_MAC_TX_COMPLETE
I (235094) main: LDL_MAC_RX1_SLOT
I (236094) main: LDL_MAC_RX2_SLOT
I (236994) main: LDL_MAC_JOIN_TIMEOUT
After restart devNonce
is randomly generated, but after unsuccessful join request still same. Maybe problem ist that the devNonce
is randomly generated in LDL_MAC_otaa
, but
LDL_MAC_otaa
is called once...
from lora_device_lib.
Yes, the dev nonce only changes when you initiate otaa, not on a retry.
TTN (the community service at least) will drop a dev nonce that it has seen before and the node will keep sending retries for ever. That's what it looks like when it happens to me.
The 1.0 spec says to use a random dev nonce but collisions happen since it's a 16 bit number. You can ensure this doesn't happen by not defining LDL_DISABLE_POINTONE and allowing LDL to operate in 1.1 mode (which is backwards compatible to 1.0). The downside of this mode is that you will need to save/restore dev nonce or else you run into the same problem.
Long story short, the random dev nonce is good for experiments since you can just reset to clear the block, but 1.1 is superior for nodes you put in the field.
from lora_device_lib.
I'm closing this issue since it seems to be dead.
I wasn't able to reproduce the join timeout, it may have been timing related. The devNonce will not change until OTAA succeeds.
from lora_device_lib.
Related Issues (20)
- OTAA not recieving JoinAccept HOT 2
- Radio interrupt not raised when message received in SF11 and SF12 HOT 3
- Proposal to remove diagnostic events from ldl_mac_response_type HOT 2
- Proposal to refactor LDL_DEBUG, LDL_ERROR, and LDL_INFO HOT 3
- Maximum sleep time due to LDL_MAC_ticksUntilNextEvent() values HOT 7
- Simplify function timerDelta()
- Discussion: Better control of confirmed uplink messages from application HOT 4
- possible deprecated #define LDL_LITTLE_ENDIAN HOT 1
- preferred way to use DeviceTimeSync HOT 4
- Add a check for maximum message size on send HOT 2
- Increment devNonce on every join request HOT 6
- Not receiving Join Accept HOT 2
- LPTIM 16 bit ticker HOT 1
- ticksUntilNextEvent keeps returning UINT32_MAX HOT 2
- Lora modules driver
- I am having trouble importing this library to arduino?
- OTAA join-accept not being received HOT 2
- UplinkDwellTime not correctly applied on AU915 HOT 1
- Incorrect MIC generated LoRaWAN 1.1 retransmissions and command responses HOT 1
- Join timeout HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lora_device_lib.