zephyr: Lora: heltec_wireless_stick_lite_v3 send/receive samples not working

Describe the bug I’ve got 2 brand new heltec_wireless_stick_lite_v3 boards and associated pigtails and antennas and flashed the driver/lora/send and receive samples onto the boards and I am not receiving the data with the boards near each other.

Photo image

To Reproduce Steps to reproduce the behavior:

  1. west build -b heltec_wireless_stick_lite_v3 zephyr/samples/drivers/lora/receive
  2. west build -b heltec_wireless_stick_lite_v3 zephyr/samples/drivers/lora/send

Expected behavior Receive log to show data being received

Impact showstopper

Logs and console output Sender:

Sender
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x28 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fc8fe90,len:0x2aa4
load:0x40374000,len:0xbe6c
SHA-256 comparison failed:
Calculated: 06aecb40379da45d3e10468d9741260420af83446066da1bd6a5a4cddb939f54
Expected: 00000000b0160000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x4037a12c
I (80) boot: ESP Simple boot
I (80) boot: compile time May 22 2024 18:07:38
W (80) boot: Unicore bootloader
I (80) spi_flash: detected chip: gd
I (81) spi_flash: flash io: dio
W (84) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (96) boot: chip revision: v0.2
I (99) boot.esp32s3: Boot SPI Speed : 40MHz
I (103) boot.esp32s3: SPI Mode       : DIO
I (107) boot.esp32s3: SPI Flash Size : 8MB
I (111) boot: Enabling RNG early entropy source...
[esp32s3] [INF] DRAM: lma 0x00000020 vma 0x3fc8fe90 len 0x2aa4   (10916)
[esp32s3] [INF] IRAM: lma 0x00002acc vma 0x40374000 len 0xbe6c   (48748)
[esp32s3] [INF] padd: lma 0x0000e948 vma 0x00000000 len 0x16b0   (5808)
[esp32s3] [INF] IMAP: lma 0x00010000 vma 0x42000000 len 0x8cfc   (36092)
[esp32s3] [INF] padd: lma 0x00018d04 vma 0x00000000 len 0x72f4   (29428)
[esp32s3] [INF] DMAP: lma 0x00020000 vma 0x3c010000 len 0x21fc   (8700)
[esp32s3] [INF] Image with 6 segments
[esp32s3] [INF] DROM segment: paddr=00020000h, vaddr=3c010000h, size=02200h (  8704) map
[esp32s3] [INF] IROM segment: paddr=00010000h, vaddr=42000000h, size=08CFAh ( 36090) map

*** Booting Zephyr OS build v3.6.0-4473-gc211cb347e0a ***
[00:00:00.564,000] <inf> lora_send: Data sent!
[00:00:01.864,000] <inf> lora_send: Data sent!
[00:00:03.163,000] <inf> lora_send: Data sent!
[00:00:04.463,000] <inf> lora_send: Data sent!
[00:00:05.762,000] <inf> lora_send: Data sent!
[00:00:07.062,000] <inf> lora_send: Data sent!
[00:00:08.361,000] <inf> lora_send: Data sent!
[00:00:09.661,000] <inf> lora_send: Data sent!
Receiver
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fc8fe90,len:0x2a9c
load:0x40374000,len:0xbe6c
SHA-256 comparison failed:
Calculated: 0a12acc1a1859b3b4e398f9f1224c1b81c9d51dfc5af952ffab28592c645792e
Expected: 00000000b0160000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x4037a12c
I (80) boot: ESP Simple boot
I (80) boot: compile time May 22 2024 18:06:54
W (80) boot: Unicore bootloader
I (80) spi_flash: detected chip: gd
I (81) spi_flash: flash io: dio
W (84) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (96) boot: chip revision: v0.2
I (99) boot.esp32s3: Boot SPI Speed : 40MHz
I (103) boot.esp32s3: SPI Mode       : DIO
I (107) boot.esp32s3: SPI Flash Size : 8MB
I (111) boot: Enabling RNG early entropy source...
[esp32s3] [INF] DRAM: lma 0x00000020 vma 0x3fc8fe90 len 0x2a9c   (10908)
[esp32s3] [INF] IRAM: lma 0x00002ac4 vma 0x40374000 len 0xbe6c   (48748)
[esp32s3] [INF] padd: lma 0x0000e948 vma 0x00000000 len 0x16b0   (5808)
[esp32s3] [INF] IMAP: lma 0x00010000 vma 0x42000000 len 0x8e0c   (36364)
[esp32s3] [INF] padd: lma 0x00018e14 vma 0x00000000 len 0x71e4   (29156)
[esp32s3] [INF] DMAP: lma 0x00020000 vma 0x3c010000 len 0x2268   (8808)
[esp32s3] [INF] Image with 6 segments
[esp32s3] [INF] DROM segment: paddr=00020000h, vaddr=3c010000h, size=02270h (  8816) map
[esp32s3] [INF] IROM segment: paddr=00010000h, vaddr=42000000h, size=08E0Ah ( 36362) map

*** Booting Zephyr OS build v3.6.0-4473-gc211cb347e0a ***
[00:00:00.265,000] <inf> lora_receive: Synchronous reception

Environment (please complete the following information):

  • OS: Windows 11
  • Toolchain Zephyr SDK 16.3.0
  • Zephyr branch main: c211cb347e0af0a4931e0e7af3d93577bcc7af8f
  • Also tested Zephyr main : 46ed467339c9

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 37 (37 by maintainers)

Most upvoted comments

@pblxptr I repeated all my tests on both your fix branch and standard main for comparison, the behavior was the same.

Just a small update, nothing big. I’ve found why the module goes into standby mode and blocks forever, however I haven’t found yet what is the root cause, but I spent around 30 minutes on this so far. Will be working on this in the upcoming days in my free (unfortunately limited) time.

@pblxptr Update
image

I’d call that a success 😄 9 hours and nearly 24,000 messages (and still going)

Great! 😃 thanks for the test. I think I can publish my PR then and hopefully it will be merged 😃

@pblxptr Do you anticipate any potential drawbacks from operating at lower frequencies than the maximum value supported by the SX1262? If not, I believe it is reasonable to proceed with submitting the PR using the frequency best supported by the board. I noticed that you’ve asked Heltec in their support forum. Perhaps we should wait for their recommendation, based on their design considerations for the board?

I do not anticipate any drawbacks, for me running it on the edge of supported clock brings no meaningful benefits. I’m just not sure whether it’s a board’s hardware limitation or software bug in Zephyr. Unfortunately Lite V3 does not expose SPI pins to the header so I cannot check the communication under logic analyzer. I’m also not sure what’s the configured SPI frequency while using Heltec’s Arduino examples, from what I’ve found the default seems to be 10MHz, however I’m not sure, and tbh I don’t really want to spend my limited time digging into Arduino because I seriously hate this platform.

As for the speed - try to grep through semtech,sx1262 in Zephyr - most of the devices I’ve found are configured to run on 1MHz SPI clock.

I dropped an email to Heltec asking about recommended SPI frequency. Will see what they say, but I will probably raise a PR anyway with or without their recommendation.

@pblxptr I repeated all my tests on both your fix branch and standard main for comparison, the behaviour was the same.

Good. I have just got my hardware so will check it soon and try to find out what’s wrong.

Hi, I will try to test with my boards later this week.