Comments (7)
As a specific example, for Android I don't see how to deduce a/b/g/n/ac. Here is a discussion of the issue. Android's WifiManager.getConnectionInfo().getLinkSpeed() could almost be mapped to the various protocols (but there is overlap between n and ac). Or we could simply return getLinkSpeed as the max bandwidth. Thoughts?
from netinfo.
There are going to be platforms where we may know the type of connection but not the specific technology (802.11a/b/g/n/ac etc.). What value do we use for maxBandwidth in those cases?
If underlying connection type is "unknown" the current algorithm would lead to +Infinity: http://w3c.github.io/netinfo/#handling-changes-to-the-underlying-connection. Alternatively, we could pick the most conservative value for that connection type, but that would lead to "GSM" for cellular, which offers a whopping 10kbps - don't think that's a very useful value. I think +Infinity makes sense?
As a specific example, for Android I don't see how to deduce a/b/g/n/ac. Here is a discussion of the issue. Android's WifiManager.getConnectionInfo().getLinkSpeed() could almost be mapped to the various protocols (but there is overlap between n and ac). Or we could simply return getLinkSpeed as the max bandwidth. Thoughts?
Josh, do you have some examples of what values getLinkSpeed
returns? Digging through the code, it looks like the value is being set directly by the driver [1]. I'm guessing it should return same values as in the spec, but it would be great to confirm this.
[1] http://androidxref.com/4.4.4_r1/xref/frameworks/base/wifi/java/android/net/wifi/WifiInfo.java#349
from netinfo.
Android's getLinkSpeed seems to return the currently configured wifi rate. For instance on my phone it changes from 54Mbps to 24Mbps as I move around. Since this is still a true maximum value, I think we should use it. Can we update to the spec to say "either use this table or if a more fine grained maximum value is available use that"?
from netinfo.
@jkarlin interesting, so the value must be changing based on some RSSI/modulation changes in the WiFi connection. I think it's reasonable to update the spec to allow more accurate estimates based on last hop network weather... This also allows the UA to refine estimates in the future, which is a nice plus.
- Where available set
maxDownlink
to the maximum download data rate of the current network interface, which may be dependent on current signal strength, modulation scheme, or other last hop network weather variables. (Note: exact algorithm is deferred to the UA). - If no estimate is available, use the standardized, or generally accepted, maximum download data rate captured in the table of maximum downlink speeds.
@marcoscaceres this would require a bit of wordsmithing and an update to the algorithm. WDYT? Reasonable?
P.S. As an aside, Android doesn't provide getLinkSpeed() for cellular connections, but it does provide cell signal strength, plus a few other variables, that we could (in theory) use to adjust the advertised maxDownlink.
from netinfo.
. I think it's reasonable to update the spec to allow more accurate estimates based on last hop network weather... This also allows the UA to refine estimates in the future, which is a nice plus.
Agree.
@marcoscaceres this would require a bit of wordsmithing and an update to the algorithm. WDYT? Reasonable?
Sounds like a really good addition.
from netinfo.
Took a run at updating wording + algorithm. PTAL.
from netinfo.
Looks good to me, thanks Ilya!
from netinfo.
Related Issues (20)
- Update the thresholds for different effective connection types HOT 7
- IANA section with registrations HOT 2
- Somewhat mangled IDL for NetworkInfomation HOT 2
- Fix indent in EXAMPLE 1
- Support .toJSON() on NetworkInformation interface
- Remove [NoInterfaceObject] HOT 2
- Include a separate “metered network” property in addition to “save data” HOT 1
- Netinfo status
- Should we archive this? HOT 21
- Can we just do metered? HOT 3
- Should `effectiveConnectionType` be a fixed set of values? HOT 15
- Revise use cases
- Privacy review and standards track plan HOT 1
- Should ontypechange be added again?
- compatibilité d'affichage mobile HOT 1
- Update repo and spec to show this is no longer being actively incubated HOT 6
- [tomayac/netinfo 🍴] `isMetered` should be `metered` HOT 1
- [tomayac/netinfo 🍴] Remove typedef HOT 1
- [tomayac/netinfo 🍴] Need to document why `sustainedSpeed` can be `Infinity` HOT 1
- Client Hints should get Sec-CH- prefixes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netinfo.