OpenWrt Forum Archive

Topic: No dbmAntennaSig for ieee80211_radiotap_header->it_present

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

svn info
Path: .
URL: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 40014
Node Kind: directory
Schedule: normal
Last Changed Author: nbd
Last Changed Rev: 39952
Last Changed Date: 2014-03-18 17:36:28 -0700 (Tue, 18 Mar 2014)

------------------------------------------------------------------------------------------------
#include "radioTap.h"
#include "ieee80211_radiotap.h"

uInteger32 rbitmap;
u_intFrom4Bytes(&rbitmap, (const unsigned char *) &rptr->it_present);

    switch(rbitmap.data)
    {
        case 0x0000482F:
            printf("processRadioTap(): processTLWN861N: %x\n", rbitmap.data);
            break;
        default:
            printf("processRadioTap(): unknown radio: %x\n", rbitmap.data);
    }

-----------------------------------------------------------------------------------------------
http://www.cs.fsu.edu/~baker/devices/lx … radiotap.h

182 enum ieee80211_radiotap_type {
183         IEEE80211_RADIOTAP_TSFT = 0,
184         IEEE80211_RADIOTAP_FLAGS = 1,
185         IEEE80211_RADIOTAP_RATE = 2,
186         IEEE80211_RADIOTAP_CHANNEL = 3,
187         IEEE80211_RADIOTAP_FHSS = 4,
188         IEEE80211_RADIOTAP_DBM_ANTSIGNAL = 5,
189         IEEE80211_RADIOTAP_DBM_ANTNOISE = 6,
190         IEEE80211_RADIOTAP_LOCK_QUALITY = 7,
191         IEEE80211_RADIOTAP_TX_ATTENUATION = 8,
192         IEEE80211_RADIOTAP_DB_TX_ATTENUATION = 9,
193         IEEE80211_RADIOTAP_DBM_TX_POWER = 10,
194         IEEE80211_RADIOTAP_ANTENNA = 11,
195         IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12,
196         IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
197         IEEE80211_RADIOTAP_RX_FLAGS = 14,
198         IEEE80211_RADIOTAP_TX_FLAGS = 15,
199         IEEE80211_RADIOTAP_RTS_RETRIES = 16,
200         IEEE80211_RADIOTAP_DATA_RETRIES = 17,
201         IEEE80211_RADIOTAP_EXT = 31
202 };

-----------------------------------------------------------------------------------
That means no antena signal reported by pcap. My code based on attitude_adjustment r40014 always prints:
processRadioTap(): unknown radio: a000402f
a000402f = 10100000000000000100000000101111
IEEE80211_RADIOTAP_DBM_ANTSIGNAL & a000402f = 0
IEEE80211_RADIOTAP_DB_ANTSIGNAL = 0

However, my old code on the same router based on attitude_adjustment r36859 prints:
processRadioTap(): processTLWN861N: 482f
482f = 100100000101111
IEEE80211_RADIOTAP_DBM_ANTSIGNAL & a000402f = 1
IEEE80211_RADIOTAP_DB_ANTSIGNAL = 1

I only change attitude_adjustment version from  r36859 to r40014. Image build and running are fine. But the new one cannot capture antenna signal as above.

processRadioTap(): unknown radio: a000402f
a000402f = 10100000000000000100000000101111

This shows that IEEE80211_RADIOTAP_EXT is set in the radiotap header, which needs to be considered.
See https://forum.openwrt.org/viewtopic.php?id=62865

siggi42 wrote:

processRadioTap(): unknown radio: a000402f
a000402f = 10100000000000000100000000101111

This shows that IEEE80211_RADIOTAP_EXT is set in the radiotap header, which needs to be considered.
See https://forum.openwrt.org/viewtopic.php?id=62865

If I am not missing something then

10100000000000000100000000101111


sows that antsignal is present (5th bit from right is set), am I wrong?

The discussion might have continued from here.