OpenWrt Forum Archive

Topic: Parsing radiotap header (DBM_ANTSIGNAL) in ChaosCalmer

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all!

I coded a tool that uses libpcap to parse the signal strengths from radiotap headers.
On AttitudeAdjustment, everything works fine, but on ChaosCalmer, the same code fails to parse the signal strengths (always returns 0).

The libpcap version used in AttitudeAdjustment: 1.1.1-2
The libpcap version used in ChaosCalmer: 1.5.3-1
I use TL-MR3020 as hardware.
Any ideas what could be a reason for this, e.g., maybe related to different packing/padding behavior?

Looking at the change log of libpcap, I could not find any related changes. Tcpdump for example works on both versions and returns the correct signal strength.

The question https://forum.openwrt.org/viewtopic.php?id=49703 looks similar. Unfortunately there is no answer.

Many thanks!

(Last edited by siggi42 on 26 Feb 2016, 10:43)

Fixed it. The problem was in my code (of course :)
The code did not took the header extension IEEE80211_RADIOTAP_EXT correctly into account.
In the ChaosCalmer version IEEE80211_RADIOTAP_EXT was set, in AttitudeAdjustment is was not.

From the documentation:

IEEE80211_RADIOTAP_EXT
             This bit is reserved for any future extensions to the radiotap
             structure.  A driver sets IEEE80211_RADIOTAP_EXT to extend the
             it_present bitmap by another 64 bits.  The bitmap can be extended
             by multiples of 32 bits to 96, 128, 160 bits or longer, by set-
             ting IEEE80211_RADIOTAP_EXT in the extensions.  The bitmap ends
             at the first extension field where IEEE80211_RADIOTAP_EXT is not
             set.

The discussion might have continued from here.