Commit acc0c57
committed
Tell the user why a device is unreachable instead of just 'TimeOut'
An unconnected UDP socket cannot distinguish 'nothing is listening' from
'packets went nowhere' -- the kernel discards the ICMP port-unreachable and
FetchResult reports a bare TimeoutError either way. That single message
currently covers causes as different as a cloud-only WiFi module, a wrong
encryption key, and a typo'd IP address, which is a large part of why these
issues are impossible to triage from the outside.
Once the retries are spent, probe the device once through a *connected*
socket, which does surface ICMP errors, and report which of three situations
it is:
refused - reachable, but nothing listening on UDP 7000: the unit is not
running the local protocol at all (cloud-only firmware).
Retrying or changing encryption_version cannot help.
responded - port open and answering discovery, so the network is fine and
the encrypted exchange is what fails: key/encryption_version.
silent - nothing came back: wrong IP, firewall/VLAN, or device offline.
The request path itself is untouched -- same socket, same sends, same
retries, same exception raised. The probe only runs on the already-failed
path, so a working device behaves exactly as before.
Verified against three real cases:
cloud-only unit (hid U-WB05WR11V2.10, ver V3.2.M) -> refused
working unit (hid U-WB05RT11V1.44, ver V3.4.M) -> responded
unused address -> silent
README updated so users can self-diagnose before opening an issue.1 parent 4a8db99 commit acc0c57
2 files changed
Lines changed: 80 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
52 | 87 | | |
53 | 88 | | |
54 | 89 | | |
| |||
93 | 128 | | |
94 | 129 | | |
95 | 130 | | |
96 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
97 | 157 | | |
98 | 158 | | |
99 | 159 | | |
| |||
0 commit comments