xieyaxiongfly / Atheros_CSI_tool_OpenWRT_src

GNU General Public License v2.0
114 stars 53 forks source link

I got continuous data such as payload = 108 even when I don't execute sendData #52

Closed vrdd21 closed 4 years ago

vrdd21 commented 4 years ago

Receiving data! Press Ctrl+C to quit!

Recv 1th msg with rate: 0x8a | payload len: 1040 Recv 2th msg with rate: 0x8a | payload len: 1040 Recv 3th msg with rate: 0x8a | payload len: 108 Recv 4th msg with rate: 0x8a | payload len: 108 Recv 5th msg with rate: 0x8c | payload len: 108 Recv 6th msg with rate: 0x8c | payload len: 108 Recv 7th msg with rate: 0x8c | payload len: 108 Recv 8th msg with rate: 0x8c | payload len: 108 Recv 9th msg with rate: 0x8c | payload len: 68 Recv 10th msg with rate: 0x8c | payload len: 108 Recv 11th msg with rate: 0x8c | payload len: 108 Recv 12th msg with rate: 0x8c | payload len: 108 Recv 13th msg with rate: 0x8c | payload len: 108 Recv 14th msg with rate: 0x8c | payload len: 68 Recv 15th msg with rate: 0x8c | payload len: 108 Recv 16th msg with rate: 0x8c | payload len: 108 Recv 17th msg with rate: 0x8c | payload len: 108 ...

Okay, I just execute "./sendData wlan0 MAC_address 1" twice on the other device(called A).

Of course, recvCSI is running on the device called B which show the text above.

My question is that I don't know why unintended data comes in.

Anyone have a idea about this problem?

vrdd21 commented 4 years ago

I look at the code 'recvCSI.c' and notice that this code just receive everything without considering where the data is from.

The problem may be caused by my router settings because I used two routers to communicate with each other. Then, I access to routers by WiFi. When I look at the Wireshark, TCP connection sends packets periodically(of course it is). Thus, Receiver router continuously receive TCP packets.

To solve the problem, I just append some codes into recvCSI.c to ignore packets which payload length is under 1000 because our intended packets usually have payload length as 1040. I know that this may cause future problems.

Maybe, the code need to accept packets only from specified MAC address.