-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdebug-connection.sh
More file actions
executable file
·66 lines (58 loc) · 1.87 KB
/
Copy pathdebug-connection.sh
File metadata and controls
executable file
·66 lines (58 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
echo "🔍 Arvos Connection Debug"
echo "========================"
echo ""
# Get the iPhone IP from user
read -p "Enter iPhone IP (from app): " IPHONE_IP
echo ""
echo "1️⃣ Checking your Mac's network..."
echo "Your Mac's IP addresses:"
ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print " " $2}'
echo ""
echo "2️⃣ Testing if iPhone is reachable..."
if ping -c 2 -t 2 $IPHONE_IP >/dev/null 2>&1; then
echo "✅ iPhone is reachable at $IPHONE_IP"
else
echo "❌ Cannot reach iPhone at $IPHONE_IP"
echo ""
echo "Possible issues:"
echo " • iPhone and Mac not on same WiFi network"
echo " • Wrong IP address"
echo " • Firewall blocking ping"
echo ""
echo "Make sure both devices show same WiFi name in settings!"
exit 1
fi
echo ""
echo "3️⃣ Testing WebSocket server on iPhone..."
if nc -zv -w 2 $IPHONE_IP 8765 2>&1 | grep -q "succeeded"; then
echo "✅ WebSocket server is running on $IPHONE_IP:8765"
else
echo "❌ WebSocket server NOT accessible on $IPHONE_IP:8765"
echo ""
echo "Make sure:"
echo " • iOS app is running"
echo " • You tapped 'START STREAMING' button"
echo " • App shows the server is running"
echo ""
exit 1
fi
echo ""
echo "4️⃣ Testing WebSocket connection..."
# Try to connect with a simple test
(echo -e "GET / HTTP/1.1\r\nHost: $IPHONE_IP\r\n\r\n"; sleep 1) | nc $IPHONE_IP 8765 > /tmp/ws-test.txt 2>&1
if [ -s /tmp/ws-test.txt ]; then
echo "✅ Got response from server!"
echo "First line:"
head -1 /tmp/ws-test.txt
else
echo "⚠️ No response from server (might be normal for WS)"
fi
echo ""
echo "========================"
echo "✅ Connection test complete!"
echo ""
echo "If all checks passed, try connecting from Web Studio again."
echo "Web Studio URL: http://localhost:3000/studio"
echo "iPhone IP: $IPHONE_IP"
echo "Port: 8765"