-
Notifications
You must be signed in to change notification settings - Fork 11
No random number #17
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
Comments
Hi @Edzelf I'm unable to test as I'm waiting an access to LoRa network but will have a look when available. |
I'm pretty sure that random numbers did work when I was working on this library (I remember it did not work because I messed up the code and it worked when I fixed the code - fix is in this repo already since the first publish). Looking at the report linked by @fpistm this might be related to an incorrect timeout, but that probably only surfaces in specific timings when the radio is busy when requesting a random number, which could explain why this only happens in some cases and is not very reproducible. @Edzelf, could you try changing the value of the This is not a proper fix, but at least helps confirm the timeout is indeed the issue. |
Changing the time-out does not make any difference. The result is always zero. |
FYI, I've added the LoRa-E5 mini to the core: stm32duino/Arduino_Core_STM32#1997 I've tested and had no issue to join after several reset. // LoRaWAN definitions
#define LORAWAN_BOARD_HAS_TCXO 1U
#define LORAWAN_BOARD_HAS_DCDC 1U
#define LORAWAN_TX_CONFIG RBI_CONF_RFO_HP
#define LORAWAN_RFSWITCH_PINS PA4,PA5
#define LORAWAN_RFSWITCH_PIN_COUNT 2
#define LORAWAN_RFSWITCH_OFF_VALUES LOW,LOW
#define LORAWAN_RFSWITCH_RX_VALUES HIGH,LOW
#define LORAWAN_RFSWITCH_RFO_LP_VALUES HIGH,HIGH
#define LORAWAN_RFSWITCH_RFO_HP_VALUES LOW,HIGH So, I close this issue as it seems linked to the configuration. |
Thanks, I will test it. |
I tried to install the new version.
Error message: |
Pio is not updated. The ne variant for the LoRa E5 mini is available in the main branch of the stm32 core. You can use it with Arduino IDE. Wiki explained how to use git repo. |
I use this library for a "Seeed Lora-E5 mini" board. I had to make some changes for the 3 pins for the RF switches. I also had to fix the definition of "LORAWAN_TX_CONFIG", which should be "RBI_COF_RFO_HP" for this board.
The module works well: the OTAA JOIN was successful and several packets were sent.
After a reset, a new JOIN was not possible. The TTN error was “DevNonce has already been used”.
I found out that the devnonce was always "0000", so not very random. The problem is the function "SUBGRF_GetRandom()" in radio_driver.c. This function always returns a 32-bit zero value.
The text was updated successfully, but these errors were encountered: