MDot seems to hang after the join network call.

Home Forums mDot/xDot MDot seems to hang after the join network call.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14296
    Tom Hill
    Participant

    I have an Initialize function which basically initializes the MDot to connect to the conduit and based on the debug and info there seems to be no failures, however after the join to the network is called the code seems to hang and here is part of the code…. the function doesn’t seem to return back.

    and here is the trace o/p from the mdot when the function is called.
    [DEBUG] Resetting config to factor default<CR><LF>
    [INFO] setting frequency sub band<CR><LF>
    [INFO] setting network name<CR><LF>
    [INFO]setting network password<CR><LF>
    [INFO]setting TX spreading factor<CR><LF>
    [INFO]enabling ACKs<CR><LF>
    [INFO]saving config<CR><LF>
    [DEBUG]Saving config to flash<CR><LF>
    [DEBUG]wrote 1024 bytes<CR><LF>
    [DEBUG]file size: 1024 bytes<CR><LF>
    [INFO]joining network<CR><LF>
    [DEBUG]Send Join Packet with DR0<CR><LF>
    [DEBUG]txPower: 11 AntG: 3 radioPower:11<CR><LF>
    [INFO]TX Frequency: 907100000 SF: 10 BW: 125kHz POW: 11 dBm<CR><LF>
    [DEBUG]Time on air: 23 bytes 370 ms<CR><LF>

    bool TestLora::Initialize()
    {
        int32_t ret;
        
        // get a mDot handle
        m_dot = mDot::getInstance();
        
        // reset to default config so we know what state we're in
        m_dot->resetConfig();
        
        m_dot->setLogLevel(mts::MTSLog::DEBUG_LEVEL);
    
        //subscribe to the LORA Events.
        m_dot->setEvents(m_LoraEvents);
    	    
        //typicall configuration steps all executed here...
        |
        |
        |	
    	
        // attempt to join the network
        logInfo("joining network");
        if ((ret = m_dot->joinNetwork()) != mDot::MDOT_OK ) {
            logError("failed to join network %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
            return false;
        }
       
         logInfo("joined network successfully");
        
        return true;
    }

    Not sure why the function hangs at this point, as none of the longs after the join network is called.

    #14297
    Mike Fiore
    Blocked

    Hi Tom,

    If you’re building your application using the mbed online compiler, please roll back your mbed-rtos version to revision 111 or earlier. This should resolve the issue.

    Cheers,

    Mike

    #14298
    Tom Hill
    Participant

    Thanks a lot Mike that worked. Can you point me to the documentation that we should be compiling against this revision of the mbed-rtos? So in the future I could look it up, when mdot lib needs to be compiled against a later version of the rtos lib.

    Thanks,
    Yogesh

    #14299
    Mike Fiore
    Blocked

    The reason it’s currently an issue is because the mDot library is still being built with an old version of the mbed-rtos library. This normally isn’t an issue but the rtos underwent some significant changes recently which caused this issue.

    Once we update the library build to use a compatible version of mbed-rtos, the latest rtos versions should be able to be used.

    Cheers,

    Mike

    #14309
    Andrew Lindsay
    Participant

    Any update on when the new libmdot will be available?

    thanks

    Andrew

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