5 years, 11 months ago.

mDot by AUTO_OTA can't send larger than 11 bytes payloads

Hello! I'm using a mDot and a Multitech Gateway (US915), on the configurations I'm setting the setTxDataRate() like this: dot->setTxDataRate(mDot::DR4); It suppose to change the Spread Factor to 7 and BW to 500 acording to the mdot library, but when I subscribe to the topic on my gateway on the datar It shows: "datr":"SF10BW125"

this is the configuration im using:

include the mbed library with this snippet

void config_dot(){ 
    
    //static bool adr = true;
    static uint8_t join_delay = 5;
    dot = mDot::getInstance(); 
    lora_handler = new LoRaHandler(main_id, LED_GREEN, LED_YELLOW);
   
    dot->resetConfig();
    dot->resetNetworkSession();

    dot->setLogLevel(mts::MTSLog::INFO_LEVEL);
    
    dot->setLogLevel(mts::MTSLog::ERROR_LEVEL);  
    
    if (dot->getJoinMode() != mDot::AUTO_OTA) {
        logInfo("changing network join mode to AUTO_OTA");
        if (dot->setJoinMode(mDot::AUTO_OTA) != mDot::MDOT_OK) {
            logError("failed to set network join mode to AUTO_OTA");
        }
    }
    update_ota_config_name_phrase(network_name, network_passphrase, frequency_sub_band, public_network, ack);

    update_network_link_check_config(3, 5);

    //dot->setAdr(true);
    dot->setTxDataRate(mDot::DR4);
    dot->setJoinDelay(5);

    // save changes to configuration
    logInfo("saving configuration");
    if (!dot->saveConfig()) {
        logError("failed to save configuration");
    }
        display_config(); 
}

the wired thing is when I use ADR it takes like 15 minutes (trying to send a frame every 30 seconds) to iterate between every DR but at the end it starts sending data without problem and on the topic it shows the Spread factor using is 8 and BW 500 .

It is something im missing on the settings that isn't changing the SF and BW, beacuse I'm calling back the dot->getTxDataRate() function and it shows correct datarate (DR4) but doesnt send any data ever.

Thanks for taking the time to read my question.

Be the first to answer this question.