Skip to content

RP2040 timeout connection #2780

@yo2ldk

Description

@yo2ldk

I have two modules, one flash it with USB companion, other for room server
when i open https://app.meshcore.nz/ or https://config.meshcore.io/
for configuration, I cannot do that, it say timeout connection, but serial port is ok, it have Comm port, all is ok
and I was happy with this version you say not issue with rx...
on platformio, I wait to compile lib and all and now, after 3 hours

Waveshare RP2040-LoRa: companion_radio_usb does not respond to appstart packet over USB CDC serial

Board: Waveshare RP2040-LoRa (RP2040 without WiFi chip — not Pico W)
Firmware version tested: v1.12, v1.16, and custom build from current main
Environment: PicoW_companion_radio_usb target, compiled with board = rpipico (earlephilhower core)
Host OS: Windows 11
meshcore-cli version: latest


Description

The USB CDC serial port appears correctly in Device Manager after flashing, and meshcore-cli opens the port successfully. However, the node never responds to the appstart binary packet, causing an immediate disconnect.

Confirmed with Meshtastic firmware on the same hardware: USB CDC serial works perfectly, the board boots and communicates without issues. This isolates the problem to MeshCore firmware.


Steps to reproduce

  1. Flash PicoW_companion_radio_usb firmware to Waveshare RP2040-LoRa board
  2. Connect via USB, verify COM port appears in Device Manager
  3. Run: meshcore-cli -s COM9 -D

Observed output

DEBUG:meshcore:port opened
INFO:meshcore:Serial Connection started
DEBUG:meshcore:Connected successfully: COM9
DEBUG:meshcore:Sending appstart command
DEBUG:meshcore:Sending raw data: bytearray(b'\x01\x03      mccli')
DEBUG:meshcore:sending pkt : b'<\r\x00\x01\x03      mccli'
DEBUG:meshcore:Dispatching event: EventType.CONNECTED, {'connection_info': 'COM9'}
ERROR:meshcore:No response from meshcore node, disconnecting
ERROR:meshcore:Are you sure your node is a serial companion ?
DEBUG:meshcore:Serial Connection closed
ERROR:meshcore:To connect to a repeater, use -r option.

Expected output

Node responds to appstart and connection is established.


Investigation

  • Serial.ignoreFlowControl(true) was added to PicoWBoard::begin() — no change
  • Serial.ignoreFlowControl(true) was added directly in setup() in main.cpp before Serial.begin() — no change
  • LED_BUILTIN does not light up even when digitalWrite(LED_BUILTIN, HIGH) is placed at the very first line of begin(), suggesting begin() may not be the bottleneck — the firmware boots (COM port appears) but the companion protocol layer is not processing the binary packet
  • Tested with firmware versions v1.12 through v1.16 — all exhibit the same behaviour
  • Meshtastic firmware flashed to the same board works immediately on first connection

Hardware pinout used (Waveshare RP2040-LoRa)

P_LORA_DIO_1  = 16
P_LORA_NSS    = 13
P_LORA_RESET  = 23
P_LORA_BUSY   = 18
P_LORA_SCLK   = 14
P_LORA_MISO   = 24
P_LORA_MOSI   = 15
SX126X_ANT_SW = 17

Notes

The original rpi_picow variant targets rpipicow (Pico W with CYW43 WiFi chip). This board is plain RP2040 with no WiFi. Compiled with board = rpipico to avoid CYW43 init hang.

It would be very useful to have an officially supported variant for plain RP2040 + SX1262 boards (no WiFi), as these are common and low-cost options for USB companion use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions