join attempts / not working
- This topic has 6 replies, 3 voices, and was last updated 8 years, 9 months ago by
Mike Fiore.
-
AuthorPosts
-
May 27, 2016 at 9:44 am #12769
Michael
ParticipantI have code:
dot = mDot::getInstance(); dot->resetConfig(); dot->setPublicNetwork(false); if ((ret = dot->setJoinMode(mDot::AUTO_OTA)) != mDot::MDOT_OK) { logError("failed to set Join Mode %d:%s", ret, mDot::getReturnCodeString(ret).c_str()); } dot->setJoinRetries( 3 ); while ((ret = dot->joinNetwork()) != mDot::MDOT_OK) { logError("failed to join network [%d][%s]", ret, mDot::getReturnCodeString(ret).c_str()); wait_ms(1); }
But when I issue a join, the debug out shows only one attempt, then the mDot appears to just stop
[TRACE] Initiating join... [TRACE] Join Network - Auto OTA [TRACE] Join attempt #1 [DEBUG] Send Join Packet with DR3 [TRACE] 00ff [TRACE] Number of enabled channels: 8 Mask: 00000000000000ff 500K: 01 [TRACE] Check freq: 4 - 903100000 [TRACE] Preparing frame [TRACE] FRAME_TYPE_JOIN_REQ [TRACE] PACKET: 23 bytes [TRACE] BUFFER: 00dd9c860da94677705ca200000000800081555eb727cf [DEBUG] txPower: 14 AntG: 3 radioPower: 14 [INFO] TX Frequency: 903100000 SF: 7 BW: 125 kHz POW: 14 dBm [DEBUG] Time on air: 23 bytes 61 ms
I have no Gateway in the vicinity to connect at the moment.
-
This topic was modified 8 years, 9 months ago by
Michael.
-
This topic was modified 8 years, 9 months ago by
Michael.
-
This topic was modified 8 years, 9 months ago by
Michael.
-
This topic was modified 8 years, 9 months ago by
Michael.
-
This topic was modified 8 years, 9 months ago by
Michael.
-
This topic was modified 8 years, 9 months ago by
Michael.
May 29, 2016 at 10:21 am #12791Michael
ParticipantCan anyone answer why the mDot appears to stop after one attempt/ failure?
May 30, 2016 at 9:08 am #12793Michael
ParticipantI loaded the AT command application , cleared the settings starting from scratch (hopefully) and was able to successfully join per the tutorial/example. I captured the settings using AT&V.
Then I went back to my original binary and confirmed the joinNetwork() call never returns. (At that point I really don’t know if the “join” actually happened but the library/code for the joinNetwork() is somehow busted and never returns – doubtful though)
Then, I again loaded the AT command app and ran AT&V – the settings left over from my (non-Joining) code look the same as the AT successful-joining code.
I’ve stripped down my code to almost the barebones (working on that now…still), started with an online example (mDot_LoRa_Connect_Example) used older and newer libraries all to no avail.
Any ideas?
-Mike
PS. I do have a gateway available (hence the successful AT-command joins)
Here’s the debug output from my code
[ERROR] File from flash wrong size. Expected 256 - Actual 128
[INFO] Setting Config
[INFO] Saving Config
[INFO] Joining Network
[INFO] TX Frequency: 902300000 SF: 10 BW: 125 kHz POW: 14 dBm
May 31, 2016 at 10:15 am #12801Mike Fiore
BlockedMichael,
If you’re building your application using the mbed online compiler, try rolling the mbed-rtos library back to an earlier revision. I believe version 111 is known to be stable and functional. The latest versions of mbed-rtos seem to cause the mDot library to not function properly. We are looking into this.
Cheers,
MikeJune 1, 2016 at 3:28 am #12823Andrew Lindsay
ParticipantHad the same issue and reverted back to a previous mbed-rtos from 4 weeks ago and that worked. I was going to step forward 1 version at a time to see where it failed.
Thanks Mike for the info, I was scratching my head for a few days trying to work out why my code kept locking up in the join process.
Is there an issue logged with mbed to have this looked at?
Andrew
June 1, 2016 at 8:22 am #12825Michael
ParticipantYes, the rollback worked (thanks!)
However…I had already considered that issue (of a bad library)…
I had archived a set of source files from a project of a few weeks ago that contained older libraries and I couldn’t get those builds to connect either. (Over the weekend I did not have any access to the actual bins from that older project).I cannot explain that ATM but happy to be moving on.
June 1, 2016 at 9:11 am #12829Mike Fiore
BlockedMichael, I’m glad things are working again.
Andrew, I am currently investigating this issue. I was able to reproduce it using our mDot-lora-connect example program on mbed.
https://developer.mbed.org/teams/MultiTech/code/mDot_LoRa_Connect_Example/
I used revision 14 of libmDot and revision 121 of mbed. I’ve found that any revision of mbed-rtos after 111 causes the lockup while joining.
I’ll let you guys know what else I discover.
Cheers,
Mike
-
This topic was modified 8 years, 9 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.