Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@fmark I just wanted to say THANK YOU so much for this awesome post. At my work I have been trying to get RSSI from the connected AP in Windows, and you deserve many thanks for me finally getting it done. I'm currently listing all APs, but I'm working on modifying it. I wanted to offer a recommendation towards your code. I'm not very experienced with C or the Python CTypes module, but I think I might have found a possible bug. I'm really not sure what difference it makes, but I noticed:</p> <p>You define enums like this:</p> <pre><code>DOT11_BSS_TYPE = c_uint (dot11_BSS_type_infrastructure, dot11_BSS_type_independent, dot11_BSS_type_any) = map(DOT11_BSS_TYPE, xrange(1, 4)) </code></pre> <p>But then other times you define something very similar like this:</p> <pre><code>DOT11_PHY_TYPE = c_uint dot11_phy_type_unknown = 0 dot11_phy_type_any = 0 dot11_phy_type_fhss = 1 dot11_phy_type_dsss = 2 dot11_phy_type_irbaseband = 3 dot11_phy_type_ofdm = 4 dot11_phy_type_hrdsss = 5 dot11_phy_type_erp = 6 dot11_phy_type_ht = 7 dot11_phy_type_IHV_start = 0x80000000 dot11_phy_type_IHV_end = 0xffffffff </code></pre> <p>I think the second snippit should be modeled like the first, but I could be wrong. Here was my idea:</p> <pre><code>DOT11_PHY_TYPE = c_uint (dot11_phy_type_unknown, dot11_phy_type_any, dot11_phy_type_fhss, dot11_phy_type_dsss, dot11_phy_type_irbaseband, dot11_phy_type_ofdm, dot11_phy_type_hrdsss, dot11_phy_type_erp, dot11_phy_type_ht, dot11_phy_type_IHV_start, dot11_phy_type_IHV_end) = map(DOT11_PHY_TYPE, [0,0,1,2,3,4, 5,6,7,0x80000000, 0xffffffff]) </code></pre> <p>This way those values would get correctly mapped to DOT11_PHY_TYPE. Perhaps I am completely wrong, but for future folks like myself, I just wanted whatever is stumbled on here to be correct :) Thanks again, @fmark.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload