xieyaxiongfly / Atheros-CSI-Tool-UserSpace-APP

The user-space applications for our Atheros-CSI-Extraction-TOOL
56 stars 62 forks source link

How to send injection packet without associate the access point? #40

Open kangqf opened 6 years ago

kangqf commented 6 years ago

Hi xie, I find the sendData code must send the data by associating the access point, if not, the data won't come to the driver. Can you help me to find some method to send data in Not-Associate mode? I want to set the NIC use the command iw dev wlan0 interface add mon0 type monitor and stop the network-manage just like the intel 5300 packet injection setting. But when I do that and use sendData does not call the ath9k driver. ):

xieyaxiongfly commented 6 years ago

Our packet injector only supports OpenWRT version. Which version do you use?

kangqf commented 6 years ago

I use the pc version, what's the difference pc and OpenWRT for also using linux wireless subsystem? If the packet injector code supports OpenWRT released?

xieyaxiongfly commented 6 years ago

It's the same. All of my work are based on OpenWRT. I just didn't specifically do that for Ubuntu. It needs some modifications. I will release the code for Ubuntu when I finished it.

On Tue, Dec 19, 2017 at 4:21 PM, kangqf notifications@github.com wrote:

I use the pc version, what's the difference pc and OpenWRT for also using linux wireless subsystem? If the packet injector code supports OpenWRT released?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xieyaxiongfly/Atheros-CSI-Tool-UserSpace-APP/issues/40#issuecomment-352671805, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-RQ6xrTzx5o5_0RN-pmgHFU4SepDTsks5tB3H2gaJpZM4RGXWx .

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

kangqf commented 6 years ago

That's awesome! But can you give me some ideal about the method to inject packet in monitor mode? It's better if you can give me the OpenWRT version code as reference.

kangqf commented 6 years ago

Hi, xie. I use the Lorcon library to inject the packet to the NIC, Luckily I get the packet use wireshark. But I find the packets can't trigger the CSI record. Can you help me to solve the problem, May be it can be solve in the Tx side as I am consider.

xieyaxiongfly commented 6 years ago

Hello, what kind of version are you using? Ubuntu or OpenWRT? Did you check my Wiki https://github.com/xieyaxiongfly/Atheros_CSI_tool_OpenWRT_src/wiki/Collect-CSI#injector-monitor-mode here?

On Tue, Jan 2, 2018 at 7:23 PM, kangqf notifications@github.com wrote:

Hi, xie. I use the Lorcon library to inject the packet to the NIC, Luckily I get the packet use wireshark. But I find the packets can't trigger the CSI record. Can you help me to solve the problem, May be it can be solve in the Tx side as I am consider.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xieyaxiongfly/Atheros-CSI-Tool-UserSpace-APP/issues/40#issuecomment-354747199, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-RQwPmwoCwJMa0Jq1WfJohN3ecRxRdks5tGhGYgaJpZM4RGXWx .

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

kangqf commented 6 years ago

I use Ubuntu, I find when I use lorcon to inject the packet, the rate that the TX used is below 0x80, so, it doesn't trigger the CSI record. But I am confusing about the reason. Can you give me some tips ? Another question, why should I config all devices to the same MAC address in monitor as you refer it in the wiki?

xieyaxiongfly commented 6 years ago

Ok, I met that before. I think it is caused by the ath9k dirver together with the send_msg socket. I managed to make it work. But I have release the code yet.

In OpenWRT, the lorcon works without problem. I will add Lorcon Support for Ubuntu later.

On Wed, Jan 3, 2018 at 9:17 PM, kangqf notifications@github.com wrote:

I use Ubuntu, I find when I use lorcon to inject the packet, the rate that the TX used is below 0x80, so, it doesn't trigger the CSI record. But I am confusing about the reason. Can you give me some tips ? Another question, why should I config all devices to the same MAC address in monitor as you refer it in the wiki?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xieyaxiongfly/Atheros-CSI-Tool-UserSpace-APP/issues/40#issuecomment-355009592, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-RQ8qaIBVIGU664N0N945hTijFVHBrks5tG334gaJpZM4RGXWx .

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

kangqf commented 6 years ago

Thanks a lot, I think this problem is cause by the rate control algorithm used by the kernel, May be the rate can't be set by the user. And one way to solve this problem that used by intel 5300 tool is to modify the mac80211 and the driver as you refer to here. If you have other ideals to solve the problem please tell me, thanks a lot.

xieyaxiongfly commented 6 years ago

Yes. It is not caused by rate control algorithm. It is a rate control problem. Generally, it is because of the socket lorcon use to transmit the packet doesn't respond to the rate set by the user. Anyway, we can change it by modify the mac80211 or ath9k. I already solved it but I didn't do it on Ubuntu. I did it on OpenWRT.

On Thu, Jan 4, 2018 at 9:44 AM, kangqf notifications@github.com wrote:

Thanks a lot, I think this problem is cause by the rate control algorithm used by the kernel, May be the rate can't be set by the user. And one way to solve this problem that used by intel 5300 tool is to modify the mac80211 and the driver as you refer to here https://github.com/dhalperi/linux-80211n-csitool-supplementary/issues/12. If you have other ideals to solve the problem please tell me, thanks a lot.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xieyaxiongfly/Atheros-CSI-Tool-UserSpace-APP/issues/40#issuecomment-355177469, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-RQwvNjjncv06aJitTjTOzz6f4OX0uks5tHCzpgaJpZM4RGXWx .

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

xieyaxiongfly commented 6 years ago

Not OpenWRT, it's Linino, a special version of OpenWRT.

On Thu, Jan 4, 2018 at 10:12 AM, Yaxiong Xie xieyaxiongfly@gmail.com wrote:

Yes. It is not caused by rate control algorithm. It is a rate control problem. Generally, it is because of the socket lorcon use to transmit the packet doesn't respond to the rate set by the user. Anyway, we can change it by modify the mac80211 or ath9k. I already solved it but I didn't do it on Ubuntu. I did it on OpenWRT.

On Thu, Jan 4, 2018 at 9:44 AM, kangqf notifications@github.com wrote:

Thanks a lot, I think this problem is cause by the rate control algorithm used by the kernel, May be the rate can't be set by the user. And one way to solve this problem that used by intel 5300 tool is to modify the mac80211 and the driver as you refer to here https://github.com/dhalperi/linux-80211n-csitool-supplementary/issues/12. If you have other ideals to solve the problem please tell me, thanks a lot.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xieyaxiongfly/Atheros-CSI-Tool-UserSpace-APP/issues/40#issuecomment-355177469, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-RQwvNjjncv06aJitTjTOzz6f4OX0uks5tHCzpgaJpZM4RGXWx .

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

--

*-- Yaxiong Xie / *谢亚雄

School of Computer Engineering

Nanyang Technological University, Singapore

kangqf commented 6 years ago

ok, thanks a lot for your explanation, I will refer your Linino version code then. And, I want to give you some suggestion for the ubuntu version CSI tool, you may change the ath9k driver rather than the mac80211 module, because some users may only rebuild the ath9k driver and replace the driver, they don't want to do any change for the kernel and kernel modules. That's also the reason that I fork the repo ath9k from libing64 and add the scripts to rebuild ath9k.

DK-P commented 6 years ago

Is the Injection patch for Ubuntu ready yet/ released anywhere?, If not, is there any guide/advice on modifications required to build your OpenWRT image for x86 hardware? Thanks for your time.

junstriker commented 5 years ago

Hello, How to transmit packets of fixed length continuously from AP (running atheros csi openwrt) to a PC (running atheros csi ubuntu) without having to type "sendData wlan0 xx:xx:xx:xx:xx:xx" every time at AP side? Also, sometimes when I associate the PC to the AP and type: "sudo ./recv_csi log.dat", I start to receive packets of different lengths without even issuing the sending command at the AP. Is this normal?

Lastly, if I'm to record csi data continuously for an experiment, let say for 1 hour, how do I use the timestamp or any other parameters in the logged csi data to get a graph of csi amplitude versus time for the experiment duration? Does the timestamp include information about the date/time for each packet? I would be really grateful if somebody can enlighten me on these.

Many thanks