-
Notifications
You must be signed in to change notification settings - Fork 4
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
Lora python assertion error #15
Comments
These errors are generally associated with hardware connection problems, failing to communicate with the RF module. We can add a clearer error message, but first need to confirm this is an HW issue. |
The following output happens if there is no module attached, so we should definitely handle this as no hardware connected, note that the state register return 0 in that case. But we are also seeing this error if the value is 6 or something else, so in that case it is not hardware disconnected.
|
The issue is unlikely hardware related, because it happens on multiple board versions, locations and on boards that previously worked well. |
I have implemented a more rigorous reset method: https://github.com/IRNAS/PiRA-zero-firmware/blob/master/pira/modules/lora.py#L56 Behaviour is however not as expected, because if initialization fails, Lora should try to be re-initialized every time, but happens only after reboot, possibly an issue with this line: https://github.com/IRNAS/PiRA-zero-firmware/blob/master/pira/modules/lora.py#L68 Assertion error is now handled here, but the issue is not resolved: https://github.com/IRNAS/PiRA-zero-firmware/blob/master/pira/hardware/lora/SX127x/LoRa.py#L98 At some point I have observed the module not entering the incorrect mode, but can not replicate that again. |
Possibly relevant: Lora-net/LoRaMac-node#199 |
Interestingly, there is one device where this works on c7d51ba, while on some others it does not on same commit. |
I found the difference: Lora works on |
Note he problem is present also on the latest Raspbian Lite, so it may be correlated to external libraries. |
This may be relevant, some change in SPI speed sandeepmistry/node-sx127x#5 (comment) |
Adding the variable |
The issue is independent of the rpi firmware (tested). As this issue is also present on raspbian my only guess now is for the issue to be with the kernel (or maybe the kernel configuration), so will give this theory a spin soon. |
Referencing another issue: mayeranalytics/pySX127x#23 (comment) |
SPI speed fixed with 1b868fe although this is more of a workaround given that we dont know what changed in RPi firmware and caused the problem and likely some other changes. |
For some reason the spidev max clock speed defaults to 12MHz now instead of 10MHz previously. (If you look at the SPI speeds that the BCM283x processors actually support, i.e. 125MHz/(2n+1) according to this here, neither of these numbers makes any sense.) |
@mayeranalytics agreed, I have tried this fix weeks ago but with 7.8 MHz speed according to: http://www.takaitra.com/posts/492 where 5MHz is not even listed, but that list is wrong it would seem. |
I still see this issue. Is there a fix finally? |
The text was updated successfully, but these errors were encountered: