LoRaWAN on Nordic and SX1276 & SX1262 Shield #43428
Replies: 6 comments 10 replies
-
Hi, Thank you |
Beta Was this translation helpful? Give feedback.
-
@aogonzalez75 I'd recommend to cross check couple of things:
|
Beta Was this translation helpful? Give feedback.
-
I'm running into the same issue, I tested with an nrf52840 and an sx1262. |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same issue on Zephyr 3.1. As soon as I call lorawan_join() the application process fails to respond. I'm using a SX1276 Other notes that may be helpful:
For me, I can track that the issue is that lorawan_join() is sitting waiting to take from mlme_confirm_sem but this is never happening. Directly bove on lines 310-314 (in zephyr/subsys/lorawan/lorawan.c) it says:
this is clearly not happening... It can easily be tested using log or printk's on either side of k_sem_take() |
Beta Was this translation helpful? Give feedback.
-
Hi i used the command lorawan_set_datarate(LORAWAN_DR_5) after lorawan_start and before lorawan_join() and it worked fine. I am using llcc68mb2bas and the nrf52840dk. zephyr version is V3.3. You must check which data rates and frequencies your module supports. Also check the dev eui and the join eui. |
Beta Was this translation helpful? Give feedback.
-
Dear All.
I tried to test and evaluate LoRaWAN stack on Zephyr, without success. I will need more time to debug what is happening by the logic analyzer. Meantime I attached the configurations to confirm, if anybody tried the same.
SX1276MB1LAS + nrf52832-DK:
&spi0 {
compatible = "nordic,nrf-spi";
status = "okay";
mosi-pin = <23>;
miso-pin = <24>;
sck-pin = <25>;
cs-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
miso-pull-up;
};
SX1262MB2CAS + nrf52832-DK:
&spi0 {
compatible = "nordic,nrf-spi";
status = "okay";
miso-pin = <24>;
mosi-pin = <23>;
sck-pin = <25>;
cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
miso-pull-up;
};
enable SPI
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
Enable the SX12XX radio driver for Lora
CONFIG_LORA=y
CONFIG_LORA_LOG_LEVEL_DBG=y
CONFIG_LORA_SX12XX=y
CONFIG_LORA_SX127X=y
Enable the Lorawan stack
CONFIG_LORAWAN=y
CONFIG_LORAWAN_LOG_LEVEL_DBG=y
CONFIG_HAS_SEMTECH_LORAMAC=y
CONFIG_HAS_SEMTECH_SOFT_SE=y
CONFIG_HAS_SEMTECH_RADIO_DRIVERS=y
Define the Lorawan region to be used
CONFIG_LORAMAC_REGION_AU915=y
#CONFIG_LORAMAC_REGION_US915=y
#CONFIG_LORAWAN_SYSTEM_MAX_RX_ERROR=90
seems that it is not transmitting anything...
00> [00:00:00.271,942] sx126x.sx126x_lora_init: Initializing sx1262
00> [00:00:00.272,033] sx126x.SX126xReset: Resetting radio
00> [00:00:00.302,398] sx126x.SX126xIoIrqInit: Configuring DIO IRQ callback
00> [00:00:00.302,520] sx126x.SX126xWakeup: Sending GET_STATUS
00> [00:00:00.302,703] sx126x.SX126xWakeup: Waiting for device...
00> [00:00:00.302,703] sx126x.SX126xWakeup: Device ready
00> [00:00:00.302,734] sx126x.SX126xWriteCommand: Issuing opcode 0x80 w. 1 bytes of data
00> [00:00:00.302,947] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:00.302,947] sx126x.SX126xIoTcxoInit: No TCXO configured
00> [00:00:00.302,978] sx126x.SX126xIoRfSwitchInit: Configuring DIO2
00> [00:00:00.302,978] sx126x.SX126xWriteCommand: Issuing opcode 0x9d w. 1 bytes of data
00> [00:00:00.303,192] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:00.303,19
00> [00:00:05.719,268] sx126x.SX126xWriteCommand: Issuing opcode 0x80 w. 1 bytes of data
00> [00:00:05.719,390] sx126x.SX126xWakeup: Sending GET_STATUS
00> [00:00:05.719,543] sx126x.SX126xWakeup: Waiting for device...
00> [00:00:05.720,703] sx126x.SX126xWakeup: Device ready
00> [00:00:05.720,703] sx126x.SX126xAntSwOn: Enabling antenna switch
00> [00:00:05.720,916] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:05.720,947] sx126x.SX126xWriteCommand: Issuing opcode 0x86 w. 4 bytes of data
00> [00:00:05.722,351] sx126x.SX126xWriteCommand: Issuing opcode 0x9f w. 1 bytes of data
00> [00:00:05.722,564] sx126x.SX126xWriteCommand: Issuing opcode 0x80 w. 1 bytes of data
00> [00:00:05.722,778] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:05.722,808] sx126x.SX126xWriteCommand: Issuing opcode 0x8a w. 1 bytes of data
00> [00:00:05.723,052] sx126x.SX126xWriteCommand: Issuing opcode 0x8b w. 4 bytes of data
00> [00:00:05.724,426] sx1[00:00:05.725,402] sx126x.SX126xWriteRegisters: Writing 1 registers @ 0x736: 0x9 , ...
00> [00:00:05.725,646] sx126x.SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
00> [00:00:05.725,891] sx126x.SX126xWriteCommand: Issuing opcode 0x8 w. 8 bytes of data
00> [00:00:05.726,165] sx126x.SX126xSetOperatingMode: SetOperatingMode: RX (5)
00> [00:00:05.726,196] sx126x.SX126xWriteRegisters: Writing 1 registers @ 0x8ac: 0x94 , ...
00> [00:00:05.726,440] sx126x.SX126xWriteCommand: Issuing opcode 0x82 w. 3 bytes of data
00> [00:00:05.775,939] sx126x.sx126x_dio1_irq_work_handler: Processing DIO1 interrupt
00> [00:00:05.776,000] sx126x.SX126xReadCommand: Issuing opcode 0x12 (data size: 2)
00> [00:00:05.776,214] sx126x.SX126xReadCommand: -> status: 0xa6
00> [00:00:05.776,245] sx126x.SX126xWriteCommand: Issuing opcode 0x2 w. 2 bytes of data
00> [00:00:05.776,458] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:05.776,489] sx126x.SX126xAntSwOff: Disabling antenna switch
00> [00:00:05.776,489] sx126x.SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
00> [00:00:05.776,702] sx126x.SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)
00> [00:00:06.739,990] sx126x.SX126xWriteCommand: Issuing opcode 0x80 w. 1 bytes of data
00> [00:00:06.740,051] sx126x.SX126xWakeup: Sending GET_STATUS
00> [00:00:06.740,173] sx126x.SX126xWakeup: Waiting for device...
00> [00:00:06.741,363] sx126x.SX126xWakeup: Device ready
00> [00:00:06.741,394] sx126x.SX126xAntSwOn: Enabling antenna switch
00> [00:00:06.741,607] sx126x.SX126xSetOperatingMode: SetO0m
00> [00:00:06.743,011] sx126x.SX126xWriteCommand: Issuing opcode 0x9f w. 1 bytes of data
00> [00:00:06.743,255] sx126x.SX126xWriteCommand: Issuing opcode 0x80 w. 1 bytes of data
00> [00:00:06.743,469] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:06.743,469] sx126x.SX126xWriteCommand: Issuing opcode 0x8a w. 1 bytes of data
00> [00:00:06.743,682] sx126x.SX126xWriteCommand: Issuing opcode 0x8b w. 4 bytes of data
00> [00:00:06.745,086] sx126x.SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
00> [00:00:06.745,360m
00> [00:00:06.745,574] sx126x.SX126xWriteRegisters: Writing 1 registers @ 0x706: 0x28 , ...
00> [00:00:06.745,819] sx126x.SX126xReadRegisters: Reading 1 registers @ 0x736
00> [00:00:06.746,032] sx126x: register_value
00> 0d |.
00> [00:00:06.746,063] sx126x.SX126xWriteRegisters: Writing 1 registers @ 0x736: 0x9 , ...
00> [00:00:06.746,307] sx126x.SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
00> [00:00:06.746,551] sx126x.SX126xWriteCommand: Issuing opcode 0x8 w. 8 bytes of data
00> [00:00:06.746,917] sx126x.SX126xSetOperatingMode: SetOperatingMode: RX (5)
00> [00:00:06.746,948] sx126x.SX126xWriteRegisters: Writing 1 registers @ 0x8ac: 0x94 , ...
00> [00:00:06.747,161] sx126x.SX126xWriteCommand: Issuing opcode 0x82 w. 3 bytes of data
00> [00:00:06.829,437] sx126x.sx126x_dio1_irq_work_handler: Processing DIO1 interrupt
00> [00:00:06.829,528] sx126x.SX126xReadCommand: Issuing opcode 0x12 (data size: 2)
00> [00:00:06.829,742] sx126x.SX126xReadCommand: -> status: 0xa6
00> [00:00:06.829,772] sx126x.SX126xWriteCommand: Issuing opcode 0x2 w. 2 bytes of data
00> [00:00:06.830,017] sx126x.SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:06.830,017] sx126x.SX126xAntSwOff: Disabling antenna switch
00> [00:00:06.830,047] sx126x.SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
00> [00:00:06.830,261] sx126x.SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)
00> [00:00:06.832,458] lorawan.MlmeConfirm: Received MlmeConfirm (for MlmeRequest 1)
00> [00:00:06.832,489] lorawan: MlmeConfirm failed : Rx 2 timeout
00> [00:00:06.835,357] lorawan_class_a: lorawan_join_network failed: -116
Thanks in advance...
https://devzone.nordicsemi.com/f/nordic-q-a/85257/lorawan-on-zephyr-sx1276-sx1262
Beta Was this translation helpful? Give feedback.
All reactions