meshtastic / python

The Python CLI and API for talking to Meshtastic devices
https://meshtastic.org
401 stars 170 forks source link

Exception: Timed out waiting for connection completion #374

Closed ATButteaux closed 2 years ago

ATButteaux commented 2 years ago

I'm unable to connect to a Lilygo TTGO T-Beam v1.1 running firmware 1.2.65. Error message is the title. I've tried multiple serial cables. Any other ideas or information I can provide?

Thanks so much!

OS

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

PYTHON

$ python3 -V
Python 3.10.4

PIP

$ pip3 -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

MESHTASTIC

$ pip show meshtastic
Name: meshtastic
Version: 1.3.35
Summary: Python API & client shell for talking to Meshtastic devices
Home-page: https://github.com/meshtastic/Meshtastic-python
Author: Kevin Hester
Author-email: kevinh@geeksville.com
License: MIT
Location: /home/blah/.local/lib/python3.10/site-packages
Requires: dotmap, pexpect, protobuf, pygatt, pypubsub, pyqrcode, pyserial, pyyaml, tabulate, timeago
Required-by: 

SERIAL DEVICE

$ lsusb
...
Bus 001 Device 123: ID 1a86:55d4 QinHeng Electronics USB Single Serial
...

ERROR

$ meshtastic --port /dev/ttyACM0 --info --debug
DEBUG file:__main__.py common line:711 Not logging serial output
DEBUG file:serial_interface.py __init__ line:41 Connecting to /dev/ttyACM0
DEBUG file:stream_interface.py __reader line:129 in __reader()
DEBUG file:stream_interface.py _sendToRadioImpl line:109 Sending: want_config_id: 2712943860
DEBUG file:stream_interface.py _sendToRadioImpl line:114 sending header:b'\x94\xc3\x00\x06' b:b'\x18\xf4\xf9\xd0\x8d\n'
Traceback (most recent call last):
  File "/usr/local/bin/meshtastic", line 8, in <module>
    sys.exit(main())
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/__main__.py", line 950, in main
    common()
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/__main__.py", line 727, in common
    client = meshtastic.serial_interface.SerialInterface(args.port, debugOut=logfile, noProto=args.noproto)
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/serial_interface.py", line 57, in __init__
    StreamInterface.__init__(self, debugOut=debugOut, noProto=noProto, connectNow=connectNow)
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/stream_interface.py", line 50, in __init__
    self.connect()
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/stream_interface.py", line 74, in connect
    self._waitConnected()
  File "/home/blah/.local/lib/python3.10/site-packages/meshtastic/mesh_interface.py", line 402, in _waitConnected
    raise Exception("Timed out waiting for connection completion")
Exception: Timed out waiting for connection completion
garthvh commented 2 years ago

You need to install a specific version to use the CLI with 1.2 nodes

https://meshtastic.org/docs/1.2-End-of-life/