seemoo-lab / nexmon_csi

Channel State Information Extraction on Various Broadcom Wi-Fi Chips
309 stars 121 forks source link

Collecting csi data using raspberry pi #270

Open kavya1229 opened 2 years ago

kavya1229 commented 2 years ago

Hi

I am new to working with csi data.

I am trying to collect csi data using raspberry pi 4b.

Setup:

currently I have a net gear access point which is connected to internet via router.

I am generating traffic to my access point using laptop by playing a video.

I am using rpi to collect csi data of my access point.

I am not sure whether my devices setup is correct or not to collect the data.

I want to collect the csi data for more than one antenna from access point using rpi. So can I mention N and C values 2?

Thanks

zeroby0 commented 2 years ago

The Pi collecting CSI doesn't know about the antennas on the transmitting devices. It just collects all the packets it sees on air.

The N and C values are for selecting the antenna, and the cores on the CSI listener. Since a Pi has only one antenna, and it's WiFi chip has just one core, only N = 1 and C = 1 are possible.

kavya1229 commented 2 years ago

So, PI collects the data present in air through its single antenna, and for RPI it does not matter whether they are originating from a device that has multiple right?

Do you think my above setup of AP, PI, and laptop is it correct way of collecting the data?

I connected my PI and laptop via LAN cable.

Thanks Kavya

zeroby0 commented 2 years ago

Yes that's correct. For the RPi, it doesn't matter. Frames from different antennas may have different CSI. Even consecutive frames from the same antenna can have different CSI. But your RPi doesn't have a way of knowing which antenna the frame came from.

And yes, your setup should be able to collect CSI. All kinds of setups should be able to, except those which try to access the Pi over inbuilt WiFi or Bluetooth. Where you should physically place the Pi and your router and devices, though, depends on your application and the layout of the room.

kavya1229 commented 2 years ago

Currently, I have not connected any devices to my access point and I am sending any ping packets to my AP but I still see my RPI picking up packets.

zeroby0 commented 2 years ago

Yeah there's always some activity. Usually beacon packets with 20MHz. It could also be your neighbour's WiFi.

You should skim through the past issues: https://github.com/seemoo-lab/nexmon_csi/issues?q= They cover 90% of the problems and questions beginners have.