in reply to Re^3: Module to return signal levels on captured packets
in thread Module to return signal levels on captured packets

If I understand your question correctly, then you want to try ifconfig and Net::Interface. For an example from the source:
#!/usr/bin/perl use strict; use warnings; use Net::Interface; my @all = Net::Interface->interfaces(); print $all[0]->name,"\n"; my @allnames = "@all"; print @allnames,"\n";

Replies are listed 'Best First'.
Re^5: Module to return signal levels on captured packets
by porpoise_paul (Novice) on Jan 05, 2010 at 10:32 UTC

    I apologize for not making myself more clear...While performing frame capture on tcpdump it returns the signal level that each frame was intercepted at. So, if I ping a host on my LAN, tcpdump receives two frames per ping sent. One directly from the pinged host, and the other from the AP which has rebroadcast the ping since it is acting as a wireless hub. The measurement from the AP is different from that of the host since the host is much closer. So, somehow, tcpdump is able to read the signal levels of frames intercepted by other hosts on my LAN, not just the signal level to my AP. Ifconfig and Net::Interface do not seem to grant me access to those frame by frame stats. I would like to use perl to collect the signal levels of other hosts on my LAN in a similar manner to how tcpdump does it.


    Thanks

      porpoise_paul:

      I'm sorry I can't help. But while reading the thread, I thought that it might be helpful if you showed some sample output, and indicate what parts of the output you're specifically interested in. That way, it might clear up some misunderstandings and help you get to the answer more quickly. For example, it took a couple exchanges to find out that there were multiple packets involved, and that the AP is (apparently) reporting the signal level in a separate packet. But we still don't know how other devices are reporting the signal level.

      ...roboticus

      Never attribute to malice that which can be explained by incompetence.

        Thanks for the suggestion...I invoke tcpdump as follows.

        sudo tcpdump -e -l -i mon0 ether src 00:19:d2:b9:7d:6e

        Also, I used airmon-ng to place my interface into monitor mode. The output of tcpdump looks like this...

        22:15:51.028806 122199043083us tsft short preamble 11.0 Mb/s 2437 MHz +(0x00a0) -34dB signal -95dB noise antenna 1 [0x0000000e] CF +QoS BSSI +D:00:1b:63:2b:31:59 (oui Unknown) SA:00:19:d2:b9:7d:6e (oui Unknown) +DA:00:16:cf:91:cb:9f (oui Unknown) Data IV: d0 Pad 20 KeyID 0 22:15:51.029580 122199043849us tsft 18.0 Mb/s 2437 MHz (0x00c0) -77dB +signal -95dB noise antenna 1 [0x0000000e] DA:00:16:cf:91:cb:9f (oui U +nknown) BSSID:00:1b:63:2b:31:59 (oui Unknown) SA:00:19:d2:b9:7d:6e (o +ui Unknown) Data IV:3c51 Pad 20 KeyID 0

        The two lines are the same ping captured twice. 1 from the AP and one from the host. You can see the difference in signal level. Does that clarify things?