Class A OTA End Device (timing the RX window)

Hello,

I am developing a Class A end device to use w/ LoRaWAN. I am using a semtech sx1262 along w/ a PSoC 4200 microcontroller. I have ported over LMiC v.1.6 (IBM release) and also have tested using “basicmac lora” release from SemTech. I have been able to send join requests to a LoRa gateway. I have tested the receive path and transmit path on my device. I am having a timing related issue when it comes to receiving the Join Accept messages from the gateway. Basically what I’m seeing is that there is an offset in the time that LMiC calculates for the receive time and when I actually receive a join accept. If I modify the delay (wait for the join accept) then I can sit and poll until the join accept comes through. I can verify the packet contents w/ the packet log on the gateway. My question is as follows: If I send a join request and then wait 5 seconds for a join accept, how long does the end-device receiver stay on while waiting for the join accept? In other words I’m wondering if I can extend the time the transceiver waits for the join accept. Is there a standard length of time that the transceiver should remain in rx mode before opening up the second receive window a second later? I’m seeing offsets of anywhere from 20 ms to 40 ms. Thanks in advance.

The SX127x have a setting for how many symbols worth of time to run the receive checking for a preamble, you might not have translated that concept to your sx126x code. Or the radio rampup time allowance might be wrong. Excessive serial debug output can also cause timing problems.

Incidentally something I’ve found very useful is to have the node blip a GPIO when it goes into receive mode (and back when it gives up) and then get a scope probe on that with trigger, and another one on the gateway’s TX LED or PA enable signal or similar. You could also do it with a cheapie USB based logic analyzer for monitoring over longer periods of time.

And of course make sure that the actual timing of the receive windows as dictated by the regional parameters or any specific network customizations agrees between both ends.

If you do get an LMiC variation working with the SX126x there have been several people interested in that…