Hi @omarrayyann,
Thanks for sharing this great project! We're trying to use TeleDex for sim-based teleoperation but running into a connection issue. Here are the setup and a few things I've tried.
Environment
- teledex Python package: 0.0.6 (latest from PyPI)
- websockets: tested with 11.0.3, 12.0, 13.1, and 16.0
- Python: 3.10 / 3.13
- OS: macOS (also tested on Ubuntu 22.04 EC2)
- iOS app: TeleDex (latest from App Store)
- iPhone: connected to same WiFi as Mac
Problem
The iOS app always shows "Connection Failed" when trying to connect, even though the server is running and accepting connections from other WebSocket clients.
Steps to reproduce
- Install teledex 0.0.6:
pip install teledex
- Run minimal server:
from teledex import Session
session = Session()
session.start()
- Console shows:
[INFO] Session Starting on port 8888...
[INFO] Session Started. Connect using: 192.168.1.x:8888
[INFO] Waiting for a device to connect...
- Open TeleDex app on iPhone
- Enter
192.168.1.x:8888 → tap Connect
- App shows "Connection Failed"
What I've verified
- Port is listening:
lsof -i :8888 confirms Python is listening
- Server accepts WebSocket connections: Connecting from a Python websockets client on the same machine works:
async with websockets.connect('ws://localhost:8888') as ws:
print('Connected!') # This works, server prints "[INFO] Device connected successfully!"
- Phone can reach the port: Opening
http://<mac-ip>:8888 in Safari on the phone returns the expected websockets error: "failed to open a websocket connection: invalid connection header: keep-alive"
- Tested multiple ports: 8888, 9999 — same result
- Tested multiple websockets versions: 11.0.3, 12.0, 13.1, 16.0 — same result
- Tested multiple networks: regular WiFi, phone hotspot — same result
- No Mac firewall blocking: disabled firewall, same result
- Also tried
mujoco_ar package with MujocoARConnector — same result
Expected behavior
App should connect to the server and server should print "[INFO] Device connected successfully!"
Hi @omarrayyann,
Thanks for sharing this great project! We're trying to use TeleDex for sim-based teleoperation but running into a connection issue. Here are the setup and a few things I've tried.
Environment
Problem
The iOS app always shows "Connection Failed" when trying to connect, even though the server is running and accepting connections from other WebSocket clients.
Steps to reproduce
pip install teledex192.168.1.x:8888→ tap ConnectWhat I've verified
lsof -i :8888confirms Python is listeninghttp://<mac-ip>:8888in Safari on the phone returns the expected websockets error: "failed to open a websocket connection: invalid connection header: keep-alive"mujoco_arpackage withMujocoARConnector— same resultExpected behavior
App should connect to the server and server should print "[INFO] Device connected successfully!"