Skip to content

Timeout after unplugging meshtastic device #5

@aidenfoxivey

Description

@aidenfoxivey
aidenfoxivey@AidenMBP ~/s/meshcli (main)> uv run main.py
╭─────────────────────────────── Traceback (most recent call last) ───────────────────────────────╮
│ /Users/aidenfoxivey/src/meshcli/src/application.py:80 in send_message                           │
│                                                                                                 │
│   77 │   │   self.chat_window.update_display()                                                  │
│   78 │                                                                                          │
│   79 │   async def send_message(self, longname: str, message: str):                             │
│ ❱ 80 │   │   await self.conn.send_message(longname, message)                                    │
│   81 │   │   self.db.save_message(longname, "You", message)                                     │
│   82                                                                                            │
│                                                                                                 │
│ ╭──────────────────── locals ─────────────────────╮                                             │
│ │ longname = 'Meshtastic d484'                    │                                             │
│ │  message = 'checkmark'                          │                                             │
│ │     self = MeshCLI(                             │                                             │
│ │            │   title='MeshCLI',                 │                                             │
│ │            │   classes={'-dark-mode'},          │                                             │
│ │            │   pseudo_classes={                 │                                             │
│ │            │   │   'focus',                     │                                             │
│ │            │   │   'dark'                       │                                             │
│ │            │   }                                │                                             │
│ │            )                                    │                                             │
│ ╰─────────────────────────────────────────────────╯                                             │
│                                                                                                 │
│ /Users/aidenfoxivey/src/meshcli/src/mesh_connection.py:70 in send_message                       │
│                                                                                                 │
│   67 │                                                                                          │
│   68 │   async def send_message(self, longname: str, message: str):                             │
│   69 │   │   id = self.name_id_map[longname]                                                    │
│ ❱ 70 │   │   self.interface.sendText(message, destinationId=id)                                 │
│   71                                                                                            │
│                                                                                                 │
│ ╭──────────────────────────── locals ─────────────────────────────╮                             │
│ │       id = '!75cbd484'                                          │                             │
│ │ longname = 'Meshtastic d484'                                    │                             │
│ │  message = 'checkmark'                                          │                             │
│ │     self = <src.mesh_connection.MeshConn object at 0x1074c7a10> │                             │
│ ╰─────────────────────────────────────────────────────────────────╯                             │
│                                                                                                 │
│ /Users/aidenfoxivey/src/meshcli/.venv/lib/python3.13/site-packages/meshtastic/mesh_interface.py │
│ :436 in sendText                                                                                │
│                                                                                                 │
│    433 │   │   and can be used to track future message acks/naks.                               │
│    434 │   │   """                                                                              │
│    435 │   │                                                                                    │
│ ❱  436 │   │   return self.sendData(                                                            │
│    437 │   │   │   text.encode("utf-8"),                                                        │
│    438 │   │   │   destinationId,                                                               │
│    439 │   │   │   portNum=portNum,                                                             │
│                                                                                                 │
│ ╭────────────────────────────────────── locals ───────────────────────────────────────╮         │
│ │  channelIndex = 0                                                                   │         │
│ │ destinationId = '!75cbd484'                                                         │         │
│ │    onResponse = None                                                                │         │
│ │       portNum = 1                                                                   │         │
│ │          self = <meshtastic.serial_interface.SerialInterface object at 0x1074c7cb0> │         │
│ │          text = 'checkmark'                                                         │         │
│ │       wantAck = False                                                               │         │
│ │  wantResponse = False                                                               │         │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯         │
│                                                                                                 │
│ /Users/aidenfoxivey/src/meshcli/.venv/lib/python3.13/site-packages/meshtastic/mesh_interface.py │
│ :551 in sendData                                                                                │
│                                                                                                 │
│    548 │   │   if onResponse is not None:                                                       │
│    549 │   │   │   logging.debug(f"Setting a response handler for requestId {meshPacket.id}")   │
│    550 │   │   │   self._addResponseHandler(meshPacket.id, onResponse, ackPermitted=onResponseA │
│ ❱  551 │   │   p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck, hopLimit=hopLim │
│    552 │   │   return p                                                                         │
│    553 │                                                                                        │
│    554 │   def sendPosition(                                                                    │
│                                                                                                 │
│ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │           channelIndex = 0                                                                  │ │
│ │                   data = b'checkmark'                                                       │ │
│ │          destinationId = '!75cbd484'                                                        │ │
│ │               hopLimit = None                                                               │ │
│ │             meshPacket = decoded {                                                          │ │
│ │                            portnum: TEXT_MESSAGE_APP                                        │ │
│ │                            payload: "checkmark"                                             │ │
│ │                          }                                                                  │ │
│ │                          id: 3598196169                                                     │ │
│ │                          priority: RELIABLE                                                 │ │
│ │             onResponse = None                                                               │ │
│ │ onResponseAckPermitted = False                                                              │ │
│ │           pkiEncrypted = False                                                              │ │
│ │                portNum = 1                                                                  │ │
│ │               priority = 70                                                                 │ │
│ │              publicKey = None                                                               │ │
│ │                   self = <meshtastic.serial_interface.SerialInterface object at             │ │
│ │                          0x1074c7cb0>                                                       │ │
│ │                wantAck = False                                                              │ │
│ │           wantResponse = False                                                              │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                 │
│ /Users/aidenfoxivey/src/meshcli/.venv/lib/python3.13/site-packages/meshtastic/mesh_interface.py │
│ :929 in _sendPacket                                                                             │
│                                                                                                 │
│    926 │   │                                                                                    │
│    927 │   │   # We allow users to talk to the local node before we've completed the full conne │
│    928 │   │   if self.myInfo is not None and destinationId != self.myInfo.my_node_num:         │
│ ❱  929 │   │   │   self._waitConnected()                                                        │
│    930 │   │                                                                                    │
│    931 │   │   toRadio = mesh_pb2.ToRadio()                                                     │
│    932                                                                                          │
│                                                                                                 │
│ ╭────────────────────────────────────── locals ───────────────────────────────────────╮         │
│ │ destinationId = '!75cbd484'                                                         │         │
│ │      hopLimit = None                                                                │         │
│ │    meshPacket = decoded {                                                           │         │
│ │                   portnum: TEXT_MESSAGE_APP                                         │         │
│ │                   payload: "checkmark"                                              │         │
│ │                 }                                                                   │         │
│ │                 id: 3598196169                                                      │         │
│ │                 priority: RELIABLE                                                  │         │
│ │  pkiEncrypted = False                                                               │         │
│ │     publicKey = None                                                                │         │
│ │          self = <meshtastic.serial_interface.SerialInterface object at 0x1074c7cb0> │         │
│ │       wantAck = False                                                               │         │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯         │
│                                                                                                 │
│ /Users/aidenfoxivey/src/meshcli/.venv/lib/python3.13/site-packages/meshtastic/mesh_interface.py │
│ :1073 in _waitConnected                                                                         │
│                                                                                                 │
│   1070 │   │   and raise an exception"""                                                        │
│   1071 │   │   if not self.noProto:                                                             │
│   1072 │   │   │   if not self.isConnected.wait(timeout):  # timeout after x seconds            │
│ ❱ 1073 │   │   │   │   raise MeshInterface.MeshInterfaceError(                                  │
│   1074 │   │   │   │   │   "Timed out waiting for connection completion"                        │
│   1075 │   │   │   │   )                                                                        │
│   1076                                                                                          │
│                                                                                                 │
│ ╭─────────────────────────────────── locals ────────────────────────────────────╮               │
│ │    self = <meshtastic.serial_interface.SerialInterface object at 0x1074c7cb0> │               │
│ │ timeout = 30.0                                                                │               │
│ ╰───────────────────────────────────────────────────────────────────────────────╯               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
MeshInterfaceError: Timed out waiting for connection completion

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