Cómo obtener parámetros WIFI (ancho de banda, retraso) en Ubuntu usando C

I am student and I am writting simple application in C99 standard. Program should working on Ubuntu.

I have one problem - I don't know how can I get some Wifi parameters like ancho de banda or retrasar. I haven't any idea how to do this. It is possible to do this using standard functions or any linux API (ech I am windows user)?.

preguntado el 31 de julio de 12 a las 14:07

2 Respuestas

In general, you don't know the bandwidth or delay of a wifi device. Bandwidth and delay is the type of information from a link. As far as I know, there is no such information holding in WiFi drivers. The most link-related information is SINR. For measuring bandwidth or delay, you should write your own code.

Respondido 31 Jul 12, 14:07

I thought that I can read from driver/device information about max. bandwidth - isn't is well known value? Like 100MB/s. - Arturo G.

Maybe you should tell us more about your concrete problem. For now, I assume that you are interested in the rendimiento y estado latente of a specific wireless link, i.e. a link between two 802.11 stations. This could be a link between an access point and a client or between two ad-hoc stations.

The short answer is that there is no such API. In fact, it is not trivial even to estimate these two link parameters. They depend on the signal quality, on the data rate used by the sending station, on the interference, on the channel utilization, on the load of the computer systems at both ends, and probably a lot of other factors.

Depending on the wireless driver you are using it may be possible to obtain information about the currently used data rate and some packet loss statistics for the station you are communicating with. Have a look at net/mac80211/sta_info.h in your Linux kernel source tree. If you are using MadWifi, you may find useful information in the files below /proc/net/madwifi/ath0/ and in the output of wlanconfig ath0 list sta.

However, all you can do is to make a prediction. If the link quality changes suddenly, your prediction may be entirely wrong.

Respondido 31 Jul 12, 16:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.