How do I create my own mDot/xDot LoRa channel plan?

The example below starts with the AU915 (Australia) channel plan files and demonstrates converting them for the BR915 (Brazil) channel plan:

Create new channel plan ChannelPlan_BR915.h and ChannelPlan_BR915.cpp files
--> For xDot, see the "plans" folder in libxDot-dev-mbed5: https://os.mbed.com/teams/MultiTech/code/libxDot-dev-mbed5/
--> For mDot, see the "plans" folder in libmDot-dev-mbed5: https://os.mbed.com/teams/MultiTech/code/libmDot-dev-mbed5/


Replace all references to AU915 with BR915

Uplink frequencies are controlled with:


Channel index 125k 0-63 and 500k 64-71

tx_freq = _freqUBase125k + (_freqUStep125k * index)



UBase125k and UBase500k control the uplink channels
DBase500k control the downlink channels

    _freqUBase125k = AU915_125K_FREQ_BASE;
    _freqUStep125k = AU915_125K_FREQ_STEP;
    _freqUBase500k = AU915_500K_FREQ_BASE;
    _freqUStep500k = AU915_500K_FREQ_STEP;
    _freqDBase500k = AU915_500K_DBASE;
    _freqDStep500k = AU915_500K_DSTEP;
    GetSettings()->Session.Rx2Frequency = AU915_500K_DBASE;




In the main include the ChannelPlan_BR915.h file


int main()
{
    debug.baud(115200);

    lora::ChannelPlan* plan = new lora::ChannelPlan_BR915();

    assert(plan);

    mDot* dot = mDot::getInstance(plan);