Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino MKR WAN 1300 random() always returning 0 #172

Open
bravech opened this issue Jul 20, 2018 · 4 comments
Open

Arduino MKR WAN 1300 random() always returning 0 #172

bravech opened this issue Jul 20, 2018 · 4 comments

Comments

@bravech
Copy link

bravech commented Jul 20, 2018

I was trying to use the LoRa.random() function with the Arudino MKR WAN 1300, and every time it returns 0x00. I checked this by dumping the registers with a radio transmitting and with nothing transmitting, and the value didn't change. I noticed that in issue #59, @YannikW stated that register 0x1b is the raw RSSI, but that isn't the register used for measuring "Wideband RSSI", which is register 0x2c.

Does anybody have a list of the registers and what they do? I couldn't find the document that @YannikW referenced.

@morganrallen
Copy link
Collaborator

Here's the data sheet with the relevant Register Summary on page 91. 0x2C does appear to be the correct register and unfortunately the datasheet doesn't really say much about generating random numbers beyond... Wideband RSSI measurement used to locally generate a random number

I'll try this on another device as soon as I can.

https://cdn-shop.adafruit.com/product-files/3179/sx1276_77_78_79.pdf

@bravech
Copy link
Author

bravech commented Jul 20, 2018

It seems that the RSSI measurements "stagnate" when it's been a while since a call to LoRa.parsePacket(). It seems to be a problem with the actual LoRa chip itself, but I'll look more into what happens when parsePacket is caled.

This also affects other RSSI measurements, such as the raw RSSI measurement on register 0x1b and packet RSSI on register 0x1a.

@sandeepmistry
Copy link
Owner

@bravech any progress on this?

Is PR #150 of any interest?

@bravech
Copy link
Author

bravech commented Aug 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants