Disable downlink frame counter

Home Forums mDot/xDot Disable downlink frame counter

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31597
    Geoffrey Rutter
    Participant

    Our Xdot devices are used on a network requiring manual join and which does not check uplink framecount. To take care of downlink framecount we saveNetworkSession() intermittently which works for now, but since we cannot rely on maintenance of the downlink framecount at the LoRaWAN server we would like to disable the framecount check within LibXdot.
    We are using firmware compiled with MBED / LibXdot (not AT commands) and cannot see a way to disable downlink framecount checking. There are defines for MAX_FCNT_GAP but altering the numbers seems to make no difference.
    If not possible within the current firmware please could this facility be built into a future release?

    #31599
    Jason Reiss
    Keymaster

    The frame counters are important for security.

    MAX_FCNT_GAP is applied to an increasing FCNT.

    The downlink frame counter would need to be reset to 0 on the end-device. Unfortunately a downlink cannot be used to reset it otherwise it would not need to be reset in the first place as the network would already know the correct value.

    If the downlink counter is reset on the end-device it may be functional up to the MAX_FCNT_GAP at least and at most the two byte in packet FCNT value (~65k)

    As long as the network does not advance passed the 2 byte FCNT value then resetting the downlink counter should work but will not be secure. Over time a 3rd party could reverse engineer the Session Keys given enough packets using the same FCNT values.

    #31603
    Geoffrey Rutter
    Participant

    We are aware of the security issue but it is not important for the data we are transmitting, more important is maintaining connectivity. I will run some tests along the lines you suggest. Within the LibXdot code the MAX_FCNT_GAP seems to be specified in both Lora.h (const int32_t MAX_FCNT_GAP = 16384;) and in LoRaPHYEU868.cpp (phy_params.max_fcnt_gap = EU868_MAX_FCNT_GAP;) – which one of these sets the limit?

    #31610
    Jason Reiss
    Keymaster

    Lora.h would be for use with libxDot.

    LoRaPHYEU868.cpp is from the mbed lorawan stack? It is not part of libxDot.

    #32671
    Sergio Valiente
    Participant

    Hello,
    I have the same problem. I resolved it as you say, but two years after the device didn’t communicate. (downlink counter > 16bit I think). I remobed the xdot on the Conduit and create again, then… I have one year to fix it…
    The 16bit transmited, I understand that they aren’t only the las 16bit of 32bit counter ¿correct?
    Is there any possibility to read and reset the gateway counter to control that it don`t be major to 16bit? ¿Is there any other possibility?
    thanks

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