Tether icon indicating copy to clipboard operation
Tether copied to clipboard

Wi-Fi AP roaming: connection drops and does not recover until both devices use the same access point

Open japr99 opened this issue 1 month ago • 6 comments

Summary

Tether 1.9 disconnects when the Mac or the phone moves to a different access point on the same Wi-Fi network. It reconnects only when both devices are associated with the same AP.

Observed on a Tenda network (SSID Tenda_JAPR_5G). The phone's address changed during the test (192.168.0.58 -> 192.168.0.59), and a peer at 192.168.1.59 was also tried while the Mac was on 192.168.0.0/24.

Environment

Item Value
Tether version 1.9
macOS 15.7.7 (24G720)
Mac model MacBookPro16,4 (Intel)
Phone POCO X6 Pro 5G
Android version unknown
KDE Connect version unknown
Wi-Fi hardware Tenda
SSID Tenda_JAPR_5G
Number of APs / mesh unknown (multi-AP network, at least two APs)
Same SSID on all APs unknown
APs bridged, same subnet unknown; a 192.168.1.59 peer was tried while the Mac was on 192.168.0.0/24
Tailscale Not installed
Both devices keep the same IP after roaming No: phone observed at 192.168.0.58 and 192.168.0.59; a manual peer at 192.168.1.59 was also tried
Connection recovered by Tailscale n/a

Steps to reproduce

  1. Put the Mac and the phone on AP A, same network. Confirm Tether shows the phone as connected.
  2. Move one device to AP B (or let it roam), keeping both on the same network.
  3. Tether disconnects and does not recover.
  4. Move both devices back to the same AP. Tether reconnects.

Expected behaviour

The connection re-establishes within a few seconds after roaming, as long as both devices remain reachable on the same network.

Actual behaviour

The connection drops and stays down while the devices are on different APs. It only recovers when both are back on the same AP.

Evidence

At the time of capture, the Mac was on 192.168.0.62:

Check Result
ping -c 3 192.168.0.59 100% packet loss
nc -vz 192.168.0.59 1716 timed out
arp -an | grep 192.168.0.59 incomplete at the time of capture
Route to 192.168.1.0/24 none (netstat -rn)
Manual peer 192.168.1.59 did not connect
"Look for Devices" reconnects? not recorded
"Connect by Address" with the current IP reconnects? not recorded

Observed log

17:43:15 [AwayLock] POCO X6 Pro 5G disconnected while this Mac changed networks; not locking
17:44:41 [TCPListener] Accepted incoming connection from 192.168.0.59
17:44:51 [DeviceConnection] TLS Handshake failed with status: -9803
17:44:53 [DeviceConnection] TLS Handshake failed with status: -9806
17:45:29 [TetherService] Connected to POCO X6 Pro 5G
17:50:26 [TetherService] Disconnected from POCO X6 Pro 5G
17:51:02 [UDPDiscovery] Received UDP discovery from POCO X6 Pro 5G at 192.168.0.59:1716
17:51:05 [TetherService] Connected to POCO X6 Pro 5G
17:52:21 [TetherService] Disconnected from POCO X6 Pro 5G
17:53:36 [TetherService] Connected to POCO X6 Pro 5G
17:57:01 [TetherService] Disconnected from POCO X6 Pro 5G
17:57:33 [AwayLock] POCO X6 Pro 5G disconnected while this Mac changed networks; not locking

After the last network change the Mac kept broadcasting to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.58, 192.168.0.59, 192.168.1.59 but no further discovery from the phone arrived. Several reconnect attempts also failed at the TLS handshake (-9803 / -9806) before one succeeded.

Root cause analysis

Local discovery relies on UDP broadcast on port 1716.

  • Discovery is sent to the interface broadcast address and remembered peer IPs (Tether/Network/UDPDiscoveryService.swift:371-416). The /24 unicast sweep runs only on startup or when "Look for Devices" is pressed (Tether/Network/UDPDiscoveryService.swift:251-262, :407-416, Tether/Services/TetherService.swift:467-474).
  • Multi-AP deployments often do not forward broadcast/multicast between APs (broadcast filtering, client isolation, or separate subnets behind NAT). Discovery then only works while both devices share an AP.
  • When roaming, the TCP connection is detected dead by keepalive after ~11-15 s (Tether/Network/SocketTLS.swift:128-140), but there is no directed reconnect. The app waits for the next routine broadcast every 45 s (Tether/Network/UDPDiscoveryService.swift:251-262).
  • Only the last peer address is remembered automatically (tether_last_peer_ip); other addresses exist only if added manually (tether_manual_peer_ips). If the new AP assigns a different address, unicast goes to a stale IP.
  • TetherService does not react to network changes. The only NWPathMonitor is in Tether/Services/AwayLock.swift:23 and is used only for the lock decision.
  • Manual peers added by host name are resolved once in addManualPeer (Tether/Services/TetherService.swift:478-490) and never re-resolved.

Suggested fixes

  1. Add an NWPathMonitor to TetherService and, on a network change, run a thorough unicast sweep, reset the discovery throttles, clear stale endpoints, and re-resolve manual peers.
  2. When no connection is live, send discovery directly to every remembered address for the device, not just the last one.
  3. Remember multiple addresses per device and re-resolve host names.
  4. Tag connections with a network generation so a pre-roam connection cannot suppress discovery.
  5. Optional application-level heartbeat (kdeconnect.ping) for faster detection of half-open connections.

Workaround

  • Tailscale on both devices (unicast to a stable 100.x address, bypasses broadcast between APs).
  • Or press "Look for Devices" after roaming.

Notes

If the APs are on different subnets behind NAT (repeaters in router mode), or client isolation blocks unicast as well, no application change can bridge them; the APs must be put in bridge/AP mode on the same VLAN, or Tailscale must be used.

japr99 avatar Oct 24 '26 18:10 japr99

Diagnostic captures

I ran scripts/wifi-roaming-diag.sh twice from the Mac: once while the phone was unreachable after roaming, and once after both devices were back on the same AP.

Phone unreachable (after roaming) Same AP (working)
Time 2026-10-24 19:57 CEST 2026-10-24 20:27 CEST
Mac Wi-Fi 192.168.0.62, SSID Tenda_JAPR_5G same
Phone 192.168.0.59 (had just changed from .58) 192.168.0.59
ping 100% packet loss replies in 112-205 ms
TCP 1716 timed out open
ARP for the phone incomplete resolved
Default route en1 (Wi-Fi) en0 (Ethernet)

The phone was reachable again once both devices were on the same AP. Device ID and certificate fingerprint are redacted below. The working capture is truncated to log lines from 18:00 UTC onward to avoid duplicating the failure window.

Failure capture (phone unreachable after roaming)
Tether Wi-Fi roaming diagnostics
Generated: sábado, 24 de octubre de 2026, 19:57:48 CEST

== System ==
ProductName:		macOS
ProductVersion:		15.7.7
BuildVersion:		24G720
x86_64

== Tether version ==
1.9

== Wi-Fi (en1) ==
Current Wi-Fi Network: Tenda_JAPR_5G
	inet 192.168.0.62 netmask 0xffffff00 broadcast 192.168.0.255
	status: active

== Default route ==
    gateway: 192.168.0.1
  interface: en1

== Phone reachability (192.168.0.59) ==
PING 192.168.0.59 (192.168.0.59): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1

--- 192.168.0.59 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

== KDE Connect port (192.168.0.59:1716) ==
nc: connectx to 192.168.0.59 port 1716 (tcp) failed: Operation timed out

== ARP for 192.168.0.59 ==
? (192.168.0.59) at (incomplete) on en1 ifscope [ethernet]

== Tether log (last 200 matching lines) ==
[2026-10-24T17:14:00.598Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:14:01.622Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:16:05.993Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.0.51, 192.168.0.53, 192.168.0.55, 192.168.0.56, 192.168.0.57, 192.168.0.64, 192.168.0.66, 192.168.0.254
[2026-10-24T17:20:35.995Z] [UDPDiscovery] Broadcasting discovery to 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.0.51, 192.168.0.53, 192.168.0.55, 192.168.0.56, 192.168.0.57, 192.168.0.64, 192.168.0.66, 192.168.0.254
[2026-10-24T17:33:20.292Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:33:56.135Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:34:22.964Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T17:34:27.119Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T17:34:27.119Z] [DeviceConnection] Disconnecting from 192.168.0.58:44642
[2026-10-24T17:34:27.120Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T17:34:27.120Z] [DeviceConnection] Deallocating connection for 192.168.0.58:44642
[2026-10-24T17:34:27.627Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.0.51, 192.168.0.53, 192.168.0.55, 192.168.0.56, 192.168.0.57, 192.168.0.58, 192.168.0.64, 192.168.0.66, 192.168.0.254, 192.168.0.59
[2026-10-24T17:34:49.390Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:34:49.391Z] [TetherService] Connecting to [device-id] at 192.168.0.58:1716
[2026-10-24T17:34:49.391Z] [DeviceConnection] Initiating outgoing TCP connection to 192.168.0.58:1716
[2026-10-24T17:34:49.487Z] [DeviceConnection] TCP connection established to 192.168.0.58:1716
[2026-10-24T17:34:49.487Z] [DeviceConnection] Sending initial plaintext connection packet to 192.168.0.58:1716
[2026-10-24T17:34:49.487Z] [DeviceConnection] Starting TLS handshake (isServer: true) on socket 7
[2026-10-24T17:34:49.498Z] [TCPListener] Accepted incoming connection from 192.168.0.58:41884
[2026-10-24T17:34:49.498Z] [DeviceConnection] Handling incoming connection from 192.168.0.58:41884
[2026-10-24T17:34:49.506Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:34:49.506Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:34:49.729Z] [DeviceConnection] TLS Handshake failed with status: -9806
[2026-10-24T17:34:49.729Z] [DeviceConnection] Disconnecting from 192.168.0.58:1716
[2026-10-24T17:34:49.729Z] [TetherService] Outgoing connection to 192.168.0.58 failed; inviting a reverse connection on port 1716
[2026-10-24T17:34:49.729Z] [DeviceConnection] Deallocating connection for 192.168.0.58:1716
[2026-10-24T17:34:49.764Z] [DeviceConnection] TLS Handshake completed successfully! (isServer: false)
[2026-10-24T17:34:49.765Z] [DeviceConnection] Peer certificate fingerprint: [certificate-fingerprint]
[2026-10-24T17:34:49.766Z] [DeviceConnection] Device POCO X6 Pro 5G is paired (certificate verified)
[2026-10-24T17:34:49.766Z] [DeviceConnection] Received full identity from POCO X6 Pro 5G ([device-id])
[2026-10-24T17:34:49.766Z] [TetherService] Pair state updated to paired for POCO X6 Pro 5G
[2026-10-24T17:34:49.768Z] [TetherService] Connected to POCO X6 Pro 5G
[2026-10-24T17:34:51.002Z] [UDPDiscovery] Broadcasting discovery to 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.0.51, 192.168.0.53, 192.168.0.55, 192.168.0.56, 192.168.0.57, 192.168.0.64, 192.168.0.66, 192.168.0.254
[2026-10-24T17:37:07.013Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.58:1716
[2026-10-24T17:42:44.391Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T17:42:44.391Z] [DeviceConnection] Disconnecting from 192.168.0.58:41884
[2026-10-24T17:42:44.392Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T17:42:44.392Z] [DeviceConnection] Deallocating connection for 192.168.0.58:41884
[2026-10-24T17:43:05.423Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.59, 192.168.0.58
[2026-10-24T17:43:15.311Z] [AwayLock] POCO X6 Pro 5G disconnected while this Mac changed networks; not locking
[2026-10-24T17:44:41.891Z] [TCPListener] Accepted incoming connection from 192.168.0.59:42472
[2026-10-24T17:44:41.891Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:42472
[2026-10-24T17:44:41.948Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:44:41.948Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:44:43.115Z] [TCPListener] Accepted incoming connection from 192.168.0.59:43296
[2026-10-24T17:44:43.116Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:43296
[2026-10-24T17:44:43.145Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:44:43.145Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 7
[2026-10-24T17:44:51.948Z] [DeviceConnection] TLS Handshake failed with status: -9803
[2026-10-24T17:44:51.948Z] [DeviceConnection] Disconnecting from 192.168.0.59:42472
[2026-10-24T17:44:51.949Z] [DeviceConnection] Deallocating connection for 192.168.0.59:42472
[2026-10-24T17:44:53.037Z] [DeviceConnection] TLS Handshake failed with status: -9806
[2026-10-24T17:44:53.037Z] [DeviceConnection] Disconnecting from 192.168.0.59:43296
[2026-10-24T17:44:53.037Z] [DeviceConnection] Deallocating connection for 192.168.0.59:43296
[2026-10-24T17:45:14.170Z] [TetherService] Adding manual peer 192.168.1.59 (192.168.1.59)
[2026-10-24T17:45:14.175Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.58, 192.168.0.59, 192.168.1.59
[2026-10-24T17:45:21.597Z] [TCPListener] Accepted incoming connection from 192.168.0.59:60518
[2026-10-24T17:45:21.597Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:60518
[2026-10-24T17:45:21.643Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:45:21.643Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:45:29.455Z] [DeviceConnection] TLS Handshake completed successfully! (isServer: false)
[2026-10-24T17:45:29.458Z] [DeviceConnection] Peer certificate fingerprint: [certificate-fingerprint]
[2026-10-24T17:45:29.598Z] [DeviceConnection] Device POCO X6 Pro 5G is paired (certificate verified)
[2026-10-24T17:45:29.598Z] [DeviceConnection] Received full identity from POCO X6 Pro 5G ([device-id])
[2026-10-24T17:45:29.604Z] [TetherService] Pair state updated to paired for POCO X6 Pro 5G
[2026-10-24T17:45:29.606Z] [TetherService] Connected to POCO X6 Pro 5G
[2026-10-24T17:45:39.999Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T17:46:06.005Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T17:50:26.041Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T17:50:26.041Z] [DeviceConnection] Disconnecting from 192.168.0.59:60518
[2026-10-24T17:50:26.043Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T17:50:26.043Z] [DeviceConnection] Deallocating connection for 192.168.0.59:60518
[2026-10-24T17:50:36.008Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.59, 192.168.0.58, 192.168.1.59
[2026-10-24T17:50:37.500Z] [TCPListener] Accepted incoming connection from 192.168.0.59:47872
[2026-10-24T17:50:37.501Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:47872
[2026-10-24T17:50:42.501Z] [DeviceConnection] Failed to parse incoming connection packet: 
[2026-10-24T17:50:42.501Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:50:52.502Z] [DeviceConnection] TLS Handshake failed with status: -9803
[2026-10-24T17:50:52.502Z] [DeviceConnection] Disconnecting from 192.168.0.59:47872
[2026-10-24T17:50:52.502Z] [DeviceConnection] Deallocating connection for 192.168.0.59:47872
[2026-10-24T17:50:56.046Z] [AwayLock] POCO X6 Pro 5G left; locking this Mac
[2026-10-24T17:51:02.659Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T17:51:02.660Z] [TetherService] Connecting to [device-id] at 192.168.0.59:1716
[2026-10-24T17:51:02.660Z] [DeviceConnection] Initiating outgoing TCP connection to 192.168.0.59:1716
[2026-10-24T17:51:03.020Z] [DeviceConnection] TCP connection established to 192.168.0.59:1716
[2026-10-24T17:51:03.021Z] [DeviceConnection] Sending initial plaintext connection packet to 192.168.0.59:1716
[2026-10-24T17:51:03.021Z] [DeviceConnection] Starting TLS handshake (isServer: true) on socket 7
[2026-10-24T17:51:03.271Z] [DeviceConnection] TLS Handshake failed with status: -9806
[2026-10-24T17:51:03.271Z] [TCPListener] Accepted incoming connection from 192.168.0.59:41820
[2026-10-24T17:51:03.271Z] [DeviceConnection] Disconnecting from 192.168.0.59:1716
[2026-10-24T17:51:03.271Z] [TetherService] Outgoing connection to 192.168.0.59 failed; inviting a reverse connection on port 1716
[2026-10-24T17:51:03.271Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:41820
[2026-10-24T17:51:03.271Z] [DeviceConnection] Deallocating connection for 192.168.0.59:1716
[2026-10-24T17:51:03.570Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:51:03.570Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:51:04.737Z] [DeviceConnection] TLS Handshake completed successfully! (isServer: false)
[2026-10-24T17:51:04.738Z] [DeviceConnection] Peer certificate fingerprint: [certificate-fingerprint]
[2026-10-24T17:51:05.051Z] [DeviceConnection] Device POCO X6 Pro 5G is paired (certificate verified)
[2026-10-24T17:51:05.051Z] [DeviceConnection] Received full identity from POCO X6 Pro 5G ([device-id])
[2026-10-24T17:51:05.058Z] [TetherService] Pair state updated to paired for POCO X6 Pro 5G
[2026-10-24T17:51:05.059Z] [TetherService] Connected to POCO X6 Pro 5G
[2026-10-24T17:51:21.007Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T17:52:21.338Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T17:52:21.338Z] [DeviceConnection] Disconnecting from 192.168.0.59:41820
[2026-10-24T17:52:27.797Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T17:52:27.797Z] [DeviceConnection] Deallocating connection for 192.168.0.59:41820
[2026-10-24T17:52:51.008Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.58, 192.168.0.59, 192.168.1.59
[2026-10-24T17:52:55.477Z] [TCPListener] Accepted incoming connection from 192.168.0.59:60478
[2026-10-24T17:52:55.477Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:60478
[2026-10-24T17:52:59.236Z] [AwayLock] POCO X6 Pro 5G left; locking this Mac
[2026-10-24T17:53:00.478Z] [DeviceConnection] Failed to parse incoming connection packet: 
[2026-10-24T17:53:00.478Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:53:01.341Z] [DeviceConnection] TLS Handshake failed with status: -9847
[2026-10-24T17:53:01.341Z] [DeviceConnection] Disconnecting from 192.168.0.59:60478
[2026-10-24T17:53:01.341Z] [DeviceConnection] Deallocating connection for 192.168.0.59:60478
[2026-10-24T17:53:36.485Z] [TCPListener] Accepted incoming connection from 192.168.0.59:49894
[2026-10-24T17:53:36.485Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:49894
[2026-10-24T17:53:36.498Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T17:53:36.498Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:53:36.594Z] [DeviceConnection] TLS Handshake completed successfully! (isServer: false)
[2026-10-24T17:53:36.596Z] [DeviceConnection] Peer certificate fingerprint: [certificate-fingerprint]
[2026-10-24T17:53:36.691Z] [DeviceConnection] Device POCO X6 Pro 5G is paired (certificate verified)
[2026-10-24T17:53:36.691Z] [DeviceConnection] Received full identity from POCO X6 Pro 5G ([device-id])
[2026-10-24T17:53:36.697Z] [TetherService] Pair state updated to paired for POCO X6 Pro 5G
[2026-10-24T17:53:36.699Z] [TetherService] Connected to POCO X6 Pro 5G
[2026-10-24T17:54:21.008Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T17:56:36.010Z] [UDPDiscovery] Broadcasting discovery to 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T17:57:01.405Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T17:57:01.405Z] [DeviceConnection] Disconnecting from 192.168.0.59:49894
[2026-10-24T17:57:01.405Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T17:57:01.405Z] [DeviceConnection] Deallocating connection for 192.168.0.59:49894
[2026-10-24T17:57:21.010Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.59, 192.168.0.58, 192.168.1.59
[2026-10-24T17:57:25.961Z] [TCPListener] Accepted incoming connection from 127.0.0.1:50728
[2026-10-24T17:57:25.962Z] [DeviceConnection] Handling incoming connection from 127.0.0.1:50728
[2026-10-24T17:57:25.965Z] [DeviceConnection] Failed to parse incoming connection packet: 
[2026-10-24T17:57:25.965Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 3
[2026-10-24T17:57:25.965Z] [DeviceConnection] TLS Handshake failed with status: -9806
[2026-10-24T17:57:25.965Z] [DeviceConnection] Disconnecting from 127.0.0.1:50728
[2026-10-24T17:57:25.965Z] [DeviceConnection] Deallocating connection for 127.0.0.1:50728
[2026-10-24T17:57:33.398Z] [AwayLock] POCO X6 Pro 5G disconnected while this Mac changed networks; not locking
Working capture (same AP)
Tether Wi-Fi roaming diagnostics
Generated: sábado, 24 de octubre de 2026, 20:27:08 CEST

== System ==
ProductName:		macOS
ProductVersion:		15.7.7
BuildVersion:		24G720
x86_64

== Tether version ==
1.9

== Wi-Fi (en1) ==
Current Wi-Fi Network: Tenda_JAPR_5G
	inet 192.168.0.62 netmask 0xffffff00 broadcast 192.168.0.255
	status: active

== Default route ==
    gateway: 192.168.0.1
  interface: en0

== Phone reachability (192.168.0.59) ==
PING 192.168.0.59 (192.168.0.59): 56 data bytes
64 bytes from 192.168.0.59: icmp_seq=0 ttl=64 time=184.386 ms
64 bytes from 192.168.0.59: icmp_seq=1 ttl=64 time=205.681 ms
64 bytes from 192.168.0.59: icmp_seq=2 ttl=64 time=112.535 ms

--- 192.168.0.59 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 112.535/167.534/205.681/39.850 ms

== KDE Connect port (192.168.0.59:1716) ==
Connection to 192.168.0.59 port 1716 [tcp/xmsg] succeeded!

== ARP for 192.168.0.59 ==
? (192.168.0.59) at ca:4e:7f:d2:e:ca on en0 ifscope [ethernet]
? (192.168.0.59) at ca:4e:7f:d2:e:ca on en1 ifscope [ethernet]

== Tether log (last 200 matching lines) ==
[2026-10-24T18:00:21.012Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T18:04:53.073Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:06:07.008Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:08:17.876Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:10:22.341Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:11:35.959Z] [UDPDiscovery] Broadcasting discovery to 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.1.59
[2026-10-24T18:14:26.982Z] [DeviceConnection] SSL connection closed gracefully/aborted by peer (status: -9806) on socket 3
[2026-10-24T18:14:26.982Z] [DeviceConnection] Disconnecting from 192.168.0.59:38538
[2026-10-24T18:14:26.982Z] [TetherService] Disconnected from POCO X6 Pro 5G
[2026-10-24T18:14:26.982Z] [DeviceConnection] Deallocating connection for 192.168.0.59:38538
[2026-10-24T18:14:35.958Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.255, 192.168.0.1, 192.168.0.50, 192.168.0.59, 192.168.0.72, 192.168.0.58, 192.168.1.59
[2026-10-24T18:14:48.995Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:14:48.995Z] [TetherService] Connecting to [device-id] at 192.168.0.59:1716
[2026-10-24T18:14:48.995Z] [DeviceConnection] Initiating outgoing TCP connection to 192.168.0.59:1716
[2026-10-24T18:14:48.999Z] [DeviceConnection] TCP connection established to 192.168.0.59:1716
[2026-10-24T18:14:49.000Z] [DeviceConnection] Sending initial plaintext connection packet to 192.168.0.59:1716
[2026-10-24T18:14:49.000Z] [DeviceConnection] Starting TLS handshake (isServer: true) on socket 3
[2026-10-24T18:14:49.005Z] [TCPListener] Accepted incoming connection from 192.168.0.59:40976
[2026-10-24T18:14:49.005Z] [DeviceConnection] Handling incoming connection from 192.168.0.59:40976
[2026-10-24T18:14:49.007Z] [DeviceConnection] Received incoming plaintext connection packet from [device-id]
[2026-10-24T18:14:49.007Z] [DeviceConnection] Starting TLS handshake (isServer: false) on socket 7
[2026-10-24T18:14:49.009Z] [DeviceConnection] TLS Handshake failed with status: -9806
[2026-10-24T18:14:49.009Z] [DeviceConnection] Disconnecting from 192.168.0.59:1716
[2026-10-24T18:14:49.009Z] [TetherService] Outgoing connection to 192.168.0.59 failed; inviting a reverse connection on port 1716
[2026-10-24T18:14:49.009Z] [DeviceConnection] Deallocating connection for 192.168.0.59:1716
[2026-10-24T18:14:49.070Z] [DeviceConnection] TLS Handshake completed successfully! (isServer: false)
[2026-10-24T18:14:49.071Z] [DeviceConnection] Peer certificate fingerprint: [certificate-fingerprint]
[2026-10-24T18:14:49.076Z] [DeviceConnection] Device POCO X6 Pro 5G is paired (certificate verified)
[2026-10-24T18:14:49.076Z] [DeviceConnection] Received full identity from POCO X6 Pro 5G ([device-id])
[2026-10-24T18:14:49.080Z] [TetherService] Pair state updated to paired for POCO X6 Pro 5G
[2026-10-24T18:14:49.081Z] [TetherService] Connected to POCO X6 Pro 5G
[2026-10-24T18:14:49.095Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:15:20.958Z] [UDPDiscovery] Broadcasting discovery to 192.168.0.1, 192.168.0.50, 192.168.0.72, 192.168.1.59
[2026-10-24T18:17:21.850Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:17:21.873Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:21:17.262Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:21:17.294Z] [UDPDiscovery] Received UDP discovery from: POCO X6 Pro 5G ([device-id]) at 192.168.0.59:1716
[2026-10-24T18:21:18.603Z] [TetherService] kdeconnect.notification announced 2746 bytes; fetching from 192.168.0.59:1739
[2026-10-24T18:26:35.954Z] [UDPDiscovery] Broadcasting discovery to 169.254.169.254, 192.168.0.1, 192.168.0.50, 192.168.0.72, 192.168.1.59

Note: even in the working capture, the log still shows an outgoing TLS handshake failure (-9806) followed by a successful reverse connection. That looks like a separate connection race, but it may add delay after roaming.

japr99 avatar Oct 24 '26 18:10 japr99

The main symptom is the network, not Tether. Your own failure capture shows the Mac can't reach the phone at all while they're on different access points:

  • ping 192.168.0.59 --> 100% loss
  • TCP to port 1716 --> timed out
  • Mac's ARP entry for the phone --> (incomplete): the Mac's "who has .59?" got no answer

When even ARP fails, the two access points aren't passing traffic between their clients: the Tenda units aren't properly bridged, or something like AP or client isolation is on. No app can connect over that: not Tether, not our mDNS, not a sweep, not the official KDE Connect. It "recovers when both are on the same AP" simply because the network works again then.

regarding the part where tether takes long or has trouble to reconnect even when they reconnect to the same network, this pr tries to tackle faster discovery of devices - https://github.com/subhashhhhhh/Tether/pull/7

zzjjaayy avatar Oct 25 '26 06:10 zzjjaayy

I have a Vodafone router and a Tenda router; the latter is configured to use the same IP addresses as the Vodafone one, and I don’t have any issues with other connections. The Vodafone router provides two networks: "japr5g.wifi" and "japr.wifi." If I connect both my Mac and my smartphone to the same network, everything works fine; however, if one is connected to "japr5g.wifi" and the other to "japr.wifi," the connection fails—they both need to be on the same Wi-Fi network. I’ve configured the app using IP addresses, and it works perfectly. Since it’s working fine for you, I’ll try restarting my routers when I get a chance. I have the IP addresses reserved, and my smartphone is always assigned the one ending in .59.

Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos EXCLUSIVAMENTE a los destinatarios especificados. La información contenida puede ser CONFIDENCIAL y/o estar LEGALMENTE PROTEGIDA. Si usted recibe este mensaje por ERROR, por favor comuníqueselo inmediatamente al remitente y ELIMINELO ya que usted NO ESTA AUTORIZADO al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida. Gracias.

El dom, 25 oct 2026, 7:32, Jay Rathod @.***> escribió:

zzjjaayy left a comment (subhashhhhhh/Tether#5) https://github.com/subhashhhhhh/Tether/issues/5#issuecomment-6394416841

The main symptom is the network, not Tether. Your own failure capture shows the Mac can't reach the phone at all while they're on different access points:

  • ping 192.168.0.59 --> 100% loss
  • TCP to port 1716 --> timed out
  • Mac's ARP entry for the phone --> (incomplete): the Mac's "who has .59?" got no answer

When even ARP fails, the two access points aren't passing traffic between their clients: the Tenda units aren't properly bridged, or something like AP or client isolation is on. No app can connect over that: not Tether, not our mDNS, not a sweep, not the official KDE Connect. It "recovers when both are on the same AP" simply because the network works again then.

regarding the part where tether takes long or has trouble to reconnect even when they reconnect to the same network, this pr tries to tackle faster discovery of devices - #7 https://github.com/subhashhhhhh/Tether/pull/7

— Reply to this email directly, view it on GitHub https://github.com/subhashhhhhh/Tether/issues/5?email_source=notifications&email_token=AOM77XHJRARASJISM7ALELD5VWM75A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZZGQ2DCNRYGQY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-6394416841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOM77XCJMNT7RUJF2N5JM4L5VWM75AVCNFSNUABGKJSXA33TNF2G64TZHMYTIMBRHE3TONZRGI5US43TOVSTWNRQGE3DCNZQGQ2TFILWAI . You are receiving this because you authored the thread.Message ID: @.***>

japr99 avatar Oct 25 '26 08:10 japr99

I could not understand your message, the manual IP address settings works when they are on the same SSID or different? if it is working even on different SSIDs can you try this - """ put the Mac on japr5g.wifi and the phone on japr.wifi, then run ping 192.168.0.59 and arp -n 192.168.0.59 from the Mac. If ping fails or ARP shows (incomplete), no app can connect, and reboots won't change that. """

zzjjaayy avatar Oct 25 '26 10:10 zzjjaayy

If I have my Mac on japr5g.wifi and my phone on japr.wifi, it doesn't work. I'm on the same router and the same network. What don't you understand? It only works properly if I have the app configured by IP address.

I downloaded the repo and told DeepSeek 4.1 I'll review the code and send you the summary.

Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos EXCLUSIVAMENTE a los destinatarios especificados. La información contenida puede ser CONFIDENCIAL y/o estar LEGALMENTE PROTEGIDA. Si usted recibe este mensaje por ERROR, por favor comuníqueselo inmediatamente al remitente y ELIMINELO ya que usted NO ESTA AUTORIZADO al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida. Gracias.

El dom, 25 oct 2026, 11:47, Jay Rathod @.***> escribió:

zzjjaayy left a comment (subhashhhhhh/Tether#5) https://github.com/subhashhhhhh/Tether/issues/5#issuecomment-6396673977

I could not understand your message, the manual IP address settings works when they are on the same SSID or different? if it is working even on different SSIDs can you try this - """ put the Mac on japr5g.wifi and the phone on japr.wifi, then run ping 192.168.0.59 and arp -n 192.168.0.59 from the Mac. If ping fails or ARP shows (incomplete), no app can connect, and reboots won't change that. """

— Reply to this email directly, view it on GitHub https://github.com/subhashhhhhh/Tether/issues/5?email_source=notifications&email_token=AOM77XBEYA2UAV5MN3ICV6T5VXK2TA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZZGY3DOMZZG432M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-6396673977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOM77XAMEAOLHAEH72CBLML5VXK2TAVCNFSNUABGKJSXA33TNF2G64TZHMYTIMBRHE3TONZRGI5US43TOVSTWNRQGE3DCNZQGQ2TFILWAI . You are receiving this because you authored the thread.Message ID: @.***>

japr99 avatar Oct 25 '26 10:10 japr99

Thanks for all the testing you did here. From your diagnostics, the Mac couldn't reach the phone at all while they were on different networks, even with ping, so the router isn't passing traffic between those two Wi-Fi networks and no app can connect across that. Putting both devices on the same network, or using Tailscale or the phone's IP address like you did, is the way around it. 1.9.1 also reconnects much faster once the devices can see each other again. I'll close this, but feel free to reopen it if you still see trouble on the same network.

subhashhhhhh avatar Nov 01 '26 02:11 subhashhhhhh