Skip to content

Bug: Heltec V4 serial support broken - timeouts, hangs, and command failures (get prv.key, set prv.key, etc.) #2015

@neopiccolorat

Description

@neopiccolorat
  • meshcore: 2.3.0
  • meshcore-cli: 1.5.0
  • Firmware: 1.14.0-9f1a3ea (Build: 06-Mar-2026)
  • Windows 10

Running get prv.key on a Heltec V4 repeater via serial causes a write timeout and crashes meshcore-cli entirely.

Steps:

  • meshcore-cli -s COM21 -r
  • get prv.key
  • → Write timeout + crash
C: \Users>meshcore-cli -s COM21 -r
INFO:meshcore:Connecting to repeater at COM21 (115200 baud)...
Connected! Device: Heltec V4 R version 1.14.0-9f1a3ea (Build: 06-Mar-2026)
Type help for commands, quit to exit, Tab for completion
--------------------------------------------------
Heltec Repeater Test> get priv.key
Error: Write timeout
Traceback (most recent call last): 
File "C: \Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4700, in cli
asyncio.run(main(sys.argv[1:]))
File "C: \Tools\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C: \Tools\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C: \Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4553, in main
await repeater_loop(ser)
File "C: \Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4409, in repeater_loop
await process_repeater_line(ser, cmd, repeater_name=device_name)
File "C: \Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4272, in process_repeater_line
ser.write(f"{cmd}\r".encode())
File "C: \Tools\Python\Python310\lib\site-packages\serial\serialwin32.py", line 325, in write
raise SerialTimeoutException('Write timeout')
serial.serialutil.SerialTimeoutException: Write timeout

I tested on other devices like the Wio Tracker L1 Pro and we can get teh prv.key to backup.

The serial console at flasher.meshcore.co.uk is ab it the same, doesn't work (I made it work once, but then couldn't send commands). With the Wio Tracker L1 Pro it connects. With the Heltec v4 it mostly hangs during the connection phase but it worked once but has not connected successfully again since.

When it "works" with the Heltec v4, after the get prv.key command (which just worked once), all the other commands return nothing (but the meshcore-cli is still connected).

Then doing a :

  • exit
  • C:\Users>meshcore-cli -s COM21 -r (again)

doesn't work again

And sometimes (or after), it hangs :

C:\Users>meshcore-cli -s COM21 -r
INFO:meshcore:Connecting to repeater at COM21 (115200 baud)...
Error opening serial port: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
Error: 'NoneType' object has no attribute 'write'
Traceback (most recent call last):
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4700, in cli
    asyncio.run(main(sys.argv[1:]))
  File "C:\Tools\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Tools\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4553, in main
    await repeater_loop(ser)
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4354, in repeater_loop
    device_name = await get_repeater_name(ser)
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4326, in get_repeater_name
    ser.write(b"get name\r")
AttributeError: 'NoneType' object has no attribute 'write'

C:\Users>meshcore-cli -s COM21 -r
INFO:meshcore:Connecting to repeater at COM21 (115200 baud)... << it just stays there

last test I tried, to use commands that I used in the "command line" when connected in admin by lora, but doing it with serial :

C:\Users>meshcore-cli -s COM21 -r
INFO:meshcore:Connecting to repeater at COM21 (115200 baud)...
Connected! Device: Heltec V4 1.14.0-9f1a3ea (Build: 06-Mar-2026)
Type help for commands, quit to exit, Tab for completion
--------------------------------------------------
Heltec Repeater Test> get tx
  -> > 10
Heltec Repeater Test> get tx
Error: Write timeout
Traceback (most recent call last):
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4700, in cli
    asyncio.run(main(sys.argv[1:]))
  File "C:\Tools\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Tools\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4553, in main
    await repeater_loop(ser)
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4409, in repeater_loop
    await process_repeater_line(ser, cmd, repeater_name=device_name)
  File "C:\Tools\Python\Python310\lib\site-packages\meshcore_cli\meshcore_cli.py", line 4272, in process_repeater_line
    ser.write(f"{cmd}\r".encode())
  File "C:\Tools\Python\Python310\lib\site-packages\serial\serialwin32.py", line 325, in write
    raise SerialTimeoutException('Write timeout')
serial.serialutil.SerialTimeoutException: Write timeout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions