zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.45k stars 6.4k forks source link

Lora send sample doesn't work on nucleo_wl55jc #76176

Open Martdur opened 1 month ago

Martdur commented 1 month ago

Describe the bug

The sample lora send doesn't succeed to send the message on the nucleo_wl55jc

To Reproduce Steps to reproduce the behavior:

  1. Build the sample lora\send for the nucleo_wl55jc
  2. flash the board
  3. Build the sample lora\revceive for the nucleo_wl55jc
  4. flash another board

Expected behavior An error is log while sending

[00:00:00.643,000] <err> sx12xx_common: Packet transmission failed!
[00:00:00.643,000] <dbg> sx126x: SX126xAntSwOff: No antenna switch configured
[00:00:00.643,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
[00:00:00.643,000] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)
[00:00:00.645,000] <err> lora_send: LoRa send failed

Impact This impact the use of lora driver for any test (lora_test_cw function does'nt seems to work on this board either).

Logs and console output Full log of the send :

[00:00:00.000,000] <dbg> sx126x: sx126x_lora_init: Initializing sx126x
[00:00:00.000,000] <dbg> sx126x: SX126xReset: Resetting radio
[00:00:00.030,000] <dbg> sx126x: SX126xIoIrqInit: Configuring DIO IRQ callback
--- 2 messages dropped ---
[00:00:00.032,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x9d w. 1 bytes of data
--- 21 messages dropped ---
[00:00:00.046,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x86 w. 4 bytes of data
--- 15 messages dropped ---
[00:00:00.052,000] <dbg> sx126x: SX126xWriteRegisters: Writing 1 registers @ 0x889: 0x25 , ...
[00:00:00.052,000] <dbg> sx126x: SX126xSetRfTxPower: power: 4
[00:00:00.052,000] <dbg> sx126x: SX126xReadRegisters: Reading 1 registers @ 0x8d8
[00:00:00.052,000] <dbg> sx126x: SX126xReadRegisters: register_value
                                 fe                                               |.
[00:00:00.052,000] <dbg> sx126x: SX126xWriteRegisters: Writing 1 registers @ 0x8d8: 0xfe , ...
[00:00:00.052,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x95 w. 4 bytes of data
[00:00:00.053,000] <dbg> sx126x: SX126xWriteRegisters: Writing 1 registers @ 0x8e7: 0x38 , ...
[00:00:00.054,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8e w. 2 bytes of data
[00:00:00.055,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8a w. 1 bytes of data
[00:00:00.056,000] <dbg> sx126x: SX126xWriteRegisters: Writing 1 registers @ 0x740: 0x14 , ...
[00:00:00.056,000] <dbg> sx126x: SX126xWriteRegisters: Writing 1 registers @ 0x741: 0x24 , ...
[00:00:00.056,000] <dbg> sx126x: SX126xAntSwOff: No antenna switch configured
[00:00:00.056,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
[00:00:00.056,000] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)
[00:00:00.058,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
[00:00:00.058,000] <dbg> sx126x: SX126xWakeup: Sending GET_STATUS
[00:00:00.058,000] <dbg> sx126x: SX126xWakeup: Waiting for device...
[00:00:00.059,000] <dbg> sx126x: SX126xWakeup: Device ready
[00:00:00.059,000] <dbg> sx126x: SX126xAntSwOn: No antenna switch configured
[00:00:00.061,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8 w. 8 bytes of data
[00:00:00.061,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
[00:00:00.062,000] <dbg> sx126x: SX126xWriteBuffer: Writing buffers @ 0x0 (10 bytes)
[00:00:00.062,000] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: TX (4)
[00:00:00.062,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x83 w. 3 bytes of data
[00:00:00.064,000] <dbg> sx12xx_common: sx12xx_lora_send: Expected air time of 10 bytes = 289ms
[00:00:00.643,000] <err> sx12xx_common: Packet transmission failed!
[00:00:00.643,000] <dbg> sx126x: SX126xAntSwOff: No antenna switch configured
[00:00:00.643,000] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
[00:00:00.643,000] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)
[00:00:00.645,000] <err> lora_send: LoRa send failed
aescolar commented 1 month ago

CC @JordanYates @Mani-Sadhasivam @martinjaeger @mniestroj