firmware icon indicating copy to clipboard operation
firmware copied to clipboard

[Bug]: Broken pipe when listening over tcp for events from meshtasticd (solved: blanking screen crashes meshtasticd)

Open bmidgley opened this issue 10 months ago • 5 comments
trafficstars

Category

Other

Hardware

Linux Native

Firmware Version

2.5.15

Description

If I use the tcp listener from https://github.com/brad28b/meshtastic-cli-receive-text/blob/main/read_messages_tcp.py it gets stuck every once in a while, crashing in a background thread apparently. I can't rescue it and once it crashes, no events will be received.

bmidgley@nightvision:~ $ meshtastic --version
2.5.9
bmidgley@nightvision:~ $ python --version
Python 3.11.2
bmidgley@nightvision:~ $ dpkg -l | grep meshtastic
ii  meshtasticd                          2.5.15.79da236                      arm64        Native Linux Meshtastic binary.
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 1394, in run
    self.function(*self.args, **self.kwargs)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1062, in callback
    self.sendHeartbeat()
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1051, in sendHeartbeat
    self._sendToRadio(p)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1126, in _sendToRadio
    self._sendToRadioImpl(toRadio)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/stream_interface.py", line 120, in _sendToRadioImpl
    self._writeBytes(header + b)
  File "/home/bmidgley/env/lib/python3.11/site-packages/meshtastic/tcp_interface.py", line 79, in _writeBytes
    self.socket.send(b)
BrokenPipeError: [Errno 32] Broken pipe

Relevant log output

No response

bmidgley avatar Jan 05 '25 22:01 bmidgley