TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is it so hard for devices to determine WiFi network health?

19 点作者 jc_81111 个月前
I routinely run into the below scenarios:<p>- As I’m leaving a zone with WiFi, the signal drops to 1 WiFi bar for way too much time and tries to remain on the network even though it no longer serves. Forces me to toggle WiFi off so my phone switches to celular data<p>- It connects to a public WiFi I’ve used before, has full WiFi signal strength, but in reality there’s no service because to actually use the network I have to login, accept terms, or something along those lines. And if I don’t do that I’m unknowingly without service because my phone can’t tell this network isn’t actually working<p>- Similar to point 1, my phone will pick up a WiFi network that’s far away (eg my home network while I’m at my neighbor’s house) and grasp to that weak unusable 1 bar of WiFi signal forcing me to toggle WiFi off (or just forget the network if it’s one I don’t commonly use)<p>So, I’m wondering if there are any networking folks out there who can explain why this is a hard problem to solve.<p>Ideally there’d be a piece of software that can determine “should I use this WiFi network or cellular data?”. Pinging a health check or something similar perhaps?

4 条评论

toast011 个月前
For 1 and 3; Hanging onto a weak signal is tricky. Most clients can&#x27;t scan and maintain connectivity at the same time; and if you&#x27;re not associated to a network you can&#x27;t really tell how good the connection is, only the signal strength (and maybe SNR) of the beacons which might be half the story, because you won&#x27;t know how well the AP can hear you. Wifi7 is designed to allow use of multiple channels simultaneously (as an option), which should maybe result in clients being able to scan on one band while connected on the other. Roaming standards like 802.11 k r and v should help in theory (k provides information about other APs which the client can choose to roam to, r provides an abbreviated handshake when roaming, v allows access points to suggest that a client should roam) --- but enabling k seems to anger some of my clients, so lack of standard support for standards is a bigger issue, IMHO; like I don&#x27;t care if the clients use the information or not, but they shouldn&#x27;t have trouble connecting if the AP is using standards from 2011. In general, turning down the signal level on beacons seems to help clients roam better, but it requires careful tuning or you could lose out on connectivity in some locations.<p>For public wifi with login, there&#x27;s proposed standards and de facto standards that make this better than it used to be, but some OSes work better than others. Windows Phone had a nice thing where it would hit ok on consent portals for you, and prompt you if it didn&#x27;t work, but use cellular data in the meantime. I don&#x27;t think android or ios will fill out the portals for you, but they should both prompt, and use cellular in the meantime... iOS is <i>much</i> better at using cellular when wifi is flakey, but Android can do it most of the time now.
ghusto11 个月前
What none of the answers seem to touch on is the simplest case that would be a solution 99% of the time: If a previously connected to network (i.e. one we have a key for) has more bars (which I as a user can see in the UI), that is the one that will work better.<p>Since this is almost always true, the technicalities of _actual_ strength don’t come into it, right?
tonymet11 个月前
Your phone only has 1-4 antennas. For practical applications just one station can be connected at once.<p>a 10 db change in signal is 100x change in quality . You can go from good to bad quickly .<p>On a bad connection you have to wait for timeouts until you trigger a renegotiation.
评论 #40754221 未加载
Grimeton11 个月前
First of all, the problems you describe belong to different layers in the OSI stack [1]. You need to understand this stack, to understand what I’m talking about.<p>The first one belongs to layer 1 of the ISO&#x2F;OSI stack.<p><pre><code> As I’m leaving a zone with WiFi, the signal drops to 1 WiFi bar for way too much time and tries to remain on the network even though it no longer serves. Forces me to toggle WiFi off so my phone switches to cellular data </code></pre> Yeah well, WiFi depends on the propagation of radio waves and as it’s bi-directional it also requires that both ends can read the transmitted radio waves of the other side. This can be influenced by multiple factors, but there are three basic things that happen to affect it most:<p>1 - Transmit power. The higher the power used to transmit the information is, the further it usually (!) reaches. One factor is the outputted power of the transmitter, while another factor is the gain produced by the antenna (ERP&#x2F;EIRP) [2].<p>2 - Antenna&#x2F;Receiver Sensitivity: The antenna is not just responsible for transmitting the information, but also to receive it and in case of directional antennas, to fade out interference. There are many different antenna types [3], [4],[5] and to explain what they are and what they would be way past the scope of this.<p>As a golden rule: If the antenna matches the wave length of the used frequency [6], is mounted in a way so that it fits the polarization [7] and there’s not much interference on the channel, you have high chances to get a good connection.<p>3 - Interference. When you check the frequencies WiFi operates on [8], you’ll see that there are all kinds of services&#x2F;devices working on those frequencies. Even commercial radar on 5GHz, which is why 802.11a has a mechanism to detect radar and disable itself.<p>So knowing all this, here’s a simple scenario:<p>The WiFi access point transmits with a higher power, so it reaches further and can still be read by your phone, while the phone itself transmits with lower power and cannot be read by the access point anymore.<p>It can also happen that authentication to the network is working but then you’re not seeing any data anymore. This comes from the fact that the more data has to be transmitted, the bigger the packet size is, the longer the transmission time becomes. And the longer it takes to transmit the data contained in one packet, the higher the chances that there is some interference, rendering the transmission unreadable at the other end, requiring a retransmit and a retransmit and a retransmit and a retransmit and a retransmit …<p>The phone now waits for certain timeouts before it considers the network dead. That’s what you’re facing.<p>There are a million more scenarios why the receiving end cannot read the data, but in the end it always boils down to not being able to read the other side.<p>The second problem belongs to layer 1 and 3 of the ISO&#x2F;OSI stack:<p><pre><code> It connects to a public WiFi I’ve used before, has full WiFi signal strength, but in reality there’s no service because to actually use the network I have to login, accept terms, or something along those lines. And if I don’t do that I’m unknowingly without service because my phone can’t tell this network isn’t actually working </code></pre> The bars are usually just the signal strength [9] of the received signal and don’t say anything about the readability of the information that is transmitted. So if the signal is strong, the bars are much…<p>Internet connectivity however is tested via layer three and up, e.g. by requesting a specific website&#x2F;url that either returns a http status code in the 200 range for unlimited access or a 302 redirect to a captive portal [10] where you have to login to use the network.<p>If the latter is not implemented correctly or not implemented at all then your phone again goes through certain timeouts and multiple re-requests to see what’s going on.<p>Especially when the http request is black-holed as long as you’re not authenticated, the phone will sit there and wait and wait and wait… There are a lot of - excuse my french – stupid network administrators that think that black-holing everything is a good idea, while an ICMP based response is a much better one.<p>The last one is purely based on your settings:<p><pre><code> Similar to point 1, my phone will pick up a WiFi network that’s far away (eg my home network while I’m at my neighbor’s house) and grasp to that weak unusable 1 bar of WiFi signal forcing me to toggle WiFi off (or just forget the network if it’s one I don’t commonly use) </code></pre> You can set certain options like “auto connect” or “free of charge” as options for the network. Those are used to tell if a network is preferred. Same as the average connection duration to a certain SSID&#x2F;Network. This all affects the choices of your phone.<p>So your home network with a high average duration of connection, free to use, no traffic limit and auto connect, beats the neighbor’s network when both are visible. Lowering the transmit power on your network could help to solve that issue…<p>There are a million more reasons and the things are way more complicated “under the hood”, so this answer barely scratches the surface, but should give you an idea what to look for.<p>If you’re interested in learning more about radio waves, their propagation and how the technology behind it works as a hobby, then I recommend looking into becoming a member of the ham radio community [11]. There should be a local representation in your country, too [12].<p>To acquire a license you have to learn about all these things in greater detail...<p>[1] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OSI_model" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OSI_model</a><p>[2] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Effective_radiated_power" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Effective_radiated_power</a><p>[3] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monopole_antenna" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monopole_antenna</a><p>[4] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dipole_antenna" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dipole_antenna</a><p>[5] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Yagi%E2%80%93Uda_antenna" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Yagi%E2%80%93Uda_antenna</a><p>[6] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wavelength" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wavelength</a><p>[7] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Polarization_(waves)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Polarization_(waves)</a><p>[8] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;2.4_GHz_radio_use" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;2.4_GHz_radio_use</a><p>[9] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Received_signal_strength_indicator" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Received_signal_strength_indic...</a><p>[10] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Captive_portal" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Captive_portal</a><p>[11] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Amateur_radio" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Amateur_radio</a><p>[12] - <a href="https:&#x2F;&#x2F;www.iaru.org&#x2F;reference&#x2F;member-societies&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.iaru.org&#x2F;reference&#x2F;member-societies&#x2F;</a>
评论 #40743542 未加载
评论 #40754225 未加载
评论 #40754319 未加载