The LoRa Developer Forum is now in read-only mode and new content will not be added.
Semtech, in its commitment to enhance user experience and streamline content, has successfully integrated the LoRa Developer Portal content into Semtech.com. As a result of this consolidation effort, the LoRa® Developer Portal Forum will be discontinued on May 1st. After this date, you will be automatically redirected to Semtech.com.
For any technical support related to LoRa, please feel free to reach out to our experts here. If you have sales inquiries, please contact us here.

FORUM

RandomNumberGen SX126x

Figured out some more undocumented behaviour, which might help someone:

RandomNumberGen (registers 0x819-0x81C):

  • Returns the same values on repeated reads
  • Is not updated by writing to it
  • Returns “0 0 0 0” after sleep or reset
  • Is updated to new random values when you execute the “calibration” command (opcode 0x89) with the “image calibration enabled” bit set.

Hi @bluewave,

There is a reference implementation of how the RNG has to be used here.

Basically, you need to put the chip in Rx mode before being able to get a number.

Thanks! I didn’t know that about RX mode and random numbers.

I have made a routine that executes the ‘calibrate’ command and then returns a new random number (while remaining in Standby RC).

Great! That’s cool you made it work on your side.