SX1280 Ranging negative results

Dear all,

I have done ranging measurements between two sx1280 transceivers and I followed the instructions in the datasheet from the ranging chapter in order to do this (page 116-120)
Here is another datasheet which is an updated version and here not all the ranging result types are mentioned as in the first datasheet. On page 139 of the second datasheet, there is a table 14-63 and in the first one page 119 table 13-62 mentioning these results types.

I implemented all the steps as explained and I have also seen that there are four ways you can read the values as a raw result, averaged, biased, or filtered wherein the first two the value can be negative. This is not mentioned in the new revision of the datasheet so does that mean only the first two values are usable?

When I bring the nodes (one master and one slave) close to each other, less than one meter, I always get negative values I guess because Lora was not meant for such short distances but it also happens when I pull the nodes apart to some greater distances like 5 m (not always but it happens). I also have Los between my nodes. I also checked for other sources of error and found nothing.

When the result is negative and when I read the result as a raw result or as an averaged I get the value 0x80 in the register with an address 0x961. This is the most significant byte and the most significant bit has value one that represents the negative number. The value is of type uint8.

My question is why is this result negative? I could not find any information about this.

Thank you in advance for any information that can be provided.

Milan Ilic

Its to do with calibration;

There are several delays in the ranging process;

  1. The time the master takes to send the range packet
  2. The time the packet takes to get to the slave
  3. The time that the slave takes to turn around the reply to the master
  4. The time the packet takes to get back to the master
  5. The time the master takes to process the reply

To measure the distance you need to know the time for 2 and 4. To get that you have to subtract the fixed time that 1,3,5 take, which can vary between LoRa parameters used and hardware setups. This is the purpose of calibration, to compensate for the fixed delays. Get the calibration value wrong, for your setup, and at very short distances the reported value can be negative.

1 Like