Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 3 months ago.
mdot debug errors
Hi,
I downloaded your sample mdot sleep code to mdot node and setup correct network params etc to work with conduit lora gateway running node red (just simple lora node-in plus debug out boxes in node red sheet). I use latest mdot firmware 0.1.2 on MT lora dev kit and I get the attached error report on usb debug port after initial connection. Anyone have an idea where the error is caused ?
Thanks, Sean. /media/uploads/socie123/error_log_sleep_code.txt
Question relating to:
1 Answer
9 years, 3 months ago.
Hi Sean,
Your first join attempt failed, and since you're running in the 868 (European) frequency band, your mDot needs to wait a certain period of time before it can try to join again. This is why your second join attempt failed. If you let the mDot sleep and wake up, does the next join attempt also fail?
You can also change the join mode to AUTO_OTA, which means the session will get saved before the mDot goes to sleep and you won't have to rejoin each time you wake up.
For more context and information, you can also check out the mDot developer guide.
Cheers, Mike
Hi Mike, Yes the mdot fails to connect after wake up. What period of time do I need to wait to rejoin and where in code do I change it ? Also, what is the RX timeout error seen on debug file ?
Thanks, Sean.
posted by 15 Sep 2015Sean,
The RX timeout just means that a packet wasn't received from the gateway during that receive slot. This generally isn't an error.
You can use the mDot::getNextTxMs() function to see how long until the mDot can transmit again.
Cheers,
Mike
posted by 15 Sep 2015Hi Mike, still no luck with joining lora network using mdot sleep program. I can join conduit network ok using AT commands firmware and send/ receive data using node red. Can I use some other program here as all I need is to connect to conduit using mdot mbed program rather than AT commands - eg. send data periodically to conduit so that I can test range etc ?
Thanks, Sean.
posted by 17 Sep 2015Sean,
Are you credentials correct in your sleep program? This would be network name and network key. The join would fail if one of those was wrong.
Also, what revision is libmDot at in your sleep program?
Cheers,
Mike
posted by 17 Sep 2015I've been seeing errors on reconnect after a deep sleep. The first time the mDot connects ok and sends its data, then after entering deep sleep for a minute I see this debug output when it wakes:
[TRACE] Join Network - OTA [TRACE] restore timers: 141276 164664 0 0 [TRACE] Band 0 : 164664 [TRACE] Band 0 : 164677 [TRACE] Band 1 : 141276 [TRACE] Band 1 : 141289 [TRACE] Band 2 : 0 [TRACE] Enable deci band [TRACE] Band 2 : 0 [TRACE] Band 3 : 0 [TRACE] Enable vari band [TRACE] Band 3 : 0 [INFO] Checking Config [INFO] Using existing Config [TRACE] Join Network - OTA [TRACE] Number of enabled channels: 0 [ERROR] No free channel [ERROR] failed to join network [-4][Join Error] [TRACE] Band: 1 141289 [TRACE] Band: 1 141289 [TRACE] Band: 1 141289
I'm then not sure if it goes back to sleep or is in a retry loop trying to re-join the network. The mDot is set to AUTO_OTA join mode. This is using latest libmdot and conduit.
Eventually after about 3 minutes it seems to join the network with the following debug output:
[TRACE] Enable centi band [TRACE] Enable 868100000 [TRACE] Enable 868300000 [TRACE] Enable 868500000 [TRACE] Join Network - OTA [TRACE] Number of enabled channels: 3 [TRACE] Check freq: 868100000 [TRACE] Frequency 868100000 is free. [TRACE] Preparing frame [TRACE] FRAME_TYPE_JOIN_REQ [TRACE] Set Frequency: 868100000 [DEBUG] Send on normal lora channel [TRACE] Frequency: 868100000 Datarate: 9 BW: 125 POW: 11 [DEBUG] Time on air: 23 bytes 205 ms [TRACE] Band: 1 100 [TRACE] Duty cycle: 0.1% [DEBUG] Time off air: 205000 ms [TRACE] Rx Window 1 - Frequency: 868100000 Bandwidth: 0 Datarate: 9 [TRACE] Rx Packet Type: 1 Size: 33 [TRACE] FRAME_TYPE_JOIN_ACCEPT [TRACE] BUFFER: 206bfba8262edc4e52acb0dd772b586a6e9c6906ad899c7b219560633656d545ac [TRACE] PAYLOAD SIZE: 33 [TRACE] APPKEY: 47176b81086a0ac9e8aaec01c88700cc [TRACE] PAYLOAD: 207d5297000000030000000001849d3884a50884acd884b4a884bc7800c81806d3 [TRACE] mic: d30618c8 rx: d30618c8 [DEBUG] Network joined [TRACE] DNONCE: 6ebd [TRACE] ANONCE: 7d5297 [TRACE] Computing session keys... [TRACE] NETS: 87e64895c2b5cf4e024e1a086dd0b585 [TRACE] APPS: bfa023d26781cf2c104b5953f2c70cda [TRACE] NetID: 0x000000 [TRACE] DevAddr: 0x00000003 [TRACE] rxDrOff: 0 rx2Dr: 0 rxD1: 1000 rxD2: 2000 [TRACE] Add Channel Frequency 869100000 [TRACE] Add Channel Frequency 869300000 [TRACE] Add Channel Frequency 869500000 [TRACE] Add Channel Frequency 869700000 [TRACE] Add Channel Frequency 869900000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Enable 869100000 [TRACE] Enable 869300000 [TRACE] Number of enabled channels: 5 [TRACE] Check freq: 869300000 [TRACE] Frequency 869300000 is free. [TRACE] Preparing frame [TRACE] FRAME_TYPE_DATA_UNCONFIRMED_UP [TRACE] Encrypting application packet to buffer... [TRACE] Set Frequency: 869300000 [DEBUG] Send on normal lora channel [TRACE] Frequency: 869300000 Datarate: 9 BW: 125 POW: 11 [DEBUG] Time on air: 25 bytes 205 ms [TRACE] Band: 0 1000 [TRACE] Duty cycle: 0.1% [DEBUG] Time off air: 205000 ms [INFO] send data: 7b22746d70223a32312e307d [INFO] going to sleep... [TRACE] 0 : 205000 [TRACE] 1 : 202618 [TRACE] 2 : 0 [TRACE] 3 : 0 [TRACE] configuring wakeup timer for 60 seconds from now [TRACE] save timers: 202302 204684 0 0 [INFO] entering deepsleep modeÿ [WARNING] bootloader: failed to mount filesystem
When it wakes up it then fails to connect with the join error again.
Thanks
Andrew
posted by 17 Sep 2015When you see the "No free channel" message, that means that you need to wait longer before attempting to transmit again. the mDot::getNextTxMs() function will let you know when you can transmit again. If you're sending at a high spreading factor (SF_12), you'll have to wait a lot longer to transmit again.
Also, it looks like you're using OTA join mode, not AUTO_OTA - "[TRACE] Join Network - OTA"
posted by 17 Sep 2015The AUTO_OTA was in the wrong place and hadn't been saved in the configuration. All now seems to be working better.
Thanks
Andrew
posted by 17 Sep 2015Hi Andrew,
Is it possible to post your updated mdot sleep program here so that I can test the mdots ? Thanks, Sean.
posted by 17 Sep 2015Hi Mike,
I am using the right network credentials ok and the mdot library is the latest version - 0.0.9-1.
posted by 17 Sep 2015Sean,
Please open a case on our support portal: https://support.multitech.com
Cheers,
Mike
posted by 18 Sep 2015
Sean,
What version of AEP firmware do you have on the Conduit? If you have older than 1.0.31, you'll need to upgrade. New firmware and instructions are here: http://www.multitech.net/developer/software/aep/upgrading-the-aep-firmware/
-Brandon
posted by Brandon Bayer 15 Sep 2015Brandon, I am using version 1.0.33 firmware on Conduit which seems ok ...
posted by SEAN O CONNELL 15 Sep 2015