join attempts / not working

Home Forums mDot/xDot join attempts / not working

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12769
    Michael
    Participant

    I 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 7 years, 11 months ago by Michael.
    • This topic was modified 7 years, 11 months ago by Michael.
    • This topic was modified 7 years, 11 months ago by Michael.
    • This topic was modified 7 years, 11 months ago by Michael.
    • This topic was modified 7 years, 11 months ago by Michael.
    • This topic was modified 7 years, 11 months ago by Michael.
    #12791
    Michael
    Participant

    Can anyone answer why the mDot appears to stop after one attempt/ failure?

    #12793
    Michael
    Participant

    I 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

    #12801
    Mike Fiore
    Blocked

    Michael,

    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,
    Mike

    #12823
    Andrew Lindsay
    Participant

    Had 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

    #12825
    Michael
    Participant

    Yes, 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.

    #12829
    Mike Fiore
    Blocked

    Michael, 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.