Code Monkey home page Code Monkey logo

Comments (7)

jkarlin avatar jkarlin commented on June 23, 2024

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.

igrigorik avatar igrigorik commented on June 23, 2024

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.

jkarlin avatar jkarlin commented on June 23, 2024

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.

igrigorik avatar igrigorik commented on June 23, 2024

@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.

marcoscaceres avatar marcoscaceres commented on June 23, 2024

. 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.

igrigorik avatar igrigorik commented on June 23, 2024

Took a run at updating wording + algorithm. PTAL.

from netinfo.

jkarlin avatar jkarlin commented on June 23, 2024

Looks good to me, thanks Ilya!

from netinfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.