Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Code fails with WinError in certain conditions (MQTT issues, Unstable Network, Unstable solar power - for solar nodes, low USB power, etc) #1

@mr-tbot

Description

@mr-tbot

Discovered an issue where in my case - the solar node on my home at sun up and sun down was resetting, causing the code to force the Meshtastic reader to close. (bug logs to follow once I get a good copy of them)

This is a known bug - and is being actively investigated.

There is already some pretty robust error handling in the script, but something is missing here still...

Nodes that have a proper diode set up or capacitance on the solar panel to prevent back feeding voltage during low light conditions - or nodes that are simply hard wired or battery powered should not experience this issue. As long as power to the node remains stable, the code is solid as a rock - and I am still not convinced this isn't an issue with Meshtastic's 2.6 preview - which is what I am currently testing with.

Error output looks something like this:

`ERROR:root:Unexpected OSError, terminating meshtastic reader... [WinError 10053] An established connection was aborted by the software in your host machine
ERROR:root:Meshtastic thread error: [WinError 10054] An existing connection was forcibly closed by the remote host
Traceback (most recent call last):
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1342, in run
self.function(*self.args, **self.kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\mesh_interface.py", line 1116, in callback
self.sendHeartbeat()
~~~~~~~~~~~~~~~~~~^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\mesh_interface.py", line 1105, in sendHeartbeat
self._sendToRadio(p)
~~~~~~~~~~~~~~~~~^^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\mesh_interface.py", line 1180, in _sendToRadio
self._sendToRadioImpl(toRadio)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\stream_interface.py", line 120, in _sendToRadioImpl
self._writeBytes(header + b)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "C:\Users\mr_tbot\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\tcp_interface.py", line 79, in _writeBytes
self.socket.send(b)
~~~~~~~~~~~~~~~~^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions