seemoo-lab / nexmon_csi

Channel State Information Extraction on Various Broadcom Wi-Fi Chips
299 stars 122 forks source link

How to inject a frame from Asus router with only a single spatial stream #166

Open Cyrbaby opened 3 years ago

Cyrbaby commented 3 years ago

Greetings, I read the publication “ Free Your CSI: A Channel State Information Extraction Platform For Modern Wi-Fi Chipsets.” The publication mention “In the first (top) we inject a frame from another Asus router with a single spatial stream (NSS = 1). In this case, the router transmits the same data Space Time Block Coded (STBC) over four antennas. ”

How can I accomplish this step using Asus RT-AC86U? Since I want to use nexmon CSI Extractor test multi-target localization performance, I don't want different target is separated by spatial stream.

Can I control the number of spatial stream in transmitter?

Thanks in advance.

matthiasseemoo commented 3 years ago

You can define the number of spatial streams to use during transmissions: https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36

The rate is a parameter of the sendframe function: https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48

On 30. Dec 2020, at 15:39, Cyrbaby notifications@github.com wrote:

Greetings, I read the publication “ Free Your CSI: A Channel State Information Extraction Platform For Modern Wi-Fi Chipsets.” The publication mention “In the first (top) we inject a frame from another Asus router with a single spatial stream (NSS = 1). In this case, the router transmits the same data Space Time Block Coded (STBC) over four antennas. ”

How can I accomplish this step using Asus RT-AC86U? Since I want to use nexmon CSI Extractor test multi-target localization performance, I don't want different target is separated by spatial stream.

Can I control the number of spatial stream in transmitter?

Thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon_csi/issues/166, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773V7TRGED5SSBFRQ5NLSXM3QZANCNFSM4VOMNP6Q.

Cyrbaby commented 3 years ago

You can define the number of spatial streams to use during transmissions: https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 The rate is a parameter of the sendframe function: https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 On 30. Dec 2020, at 15:39, Cyrbaby @.***> wrote: Greetings, I read the publication “ Free Your CSI: A Channel State Information Extraction Platform For Modern Wi-Fi Chipsets.” The publication mention “In the first (top) we inject a frame from another Asus router with a single spatial stream (NSS = 1). In this case, the router transmits the same data Space Time Block Coded (STBC) over four antennas. ” How can I accomplish this step using Asus RT-AC86U? Since I want to use nexmon CSI Extractor test multi-target localization performance, I don't want different target is separated by spatial stream. Can I control the number of spatial stream in transmitter? Thanks in advance. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#166>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773V7TRGED5SSBFRQ5NLSXM3QZANCNFSM4VOMNP6Q.

Thank you for the hint. NEXMON is a really useful tool for frame injection.However, the devices NEXMON support don't include the ASUS router, can I control the number of spatial stream in Asus RT-AC86U?

matthiasseemoo commented 3 years ago

In the end, it would be no problem to implement it. Its always just a question of time.

On 31. Dec 2020, at 03:09, Cyrbaby notifications@github.com wrote:

You can define the number of spatial streams to use during transmissions: https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 The rate is a parameter of the sendframe function: https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 https://github.com/seemoo-lab/nexmon/blob/master/patches/bcm4356/7_35_101_5_sta/nexmon/src/sendframe.c#L48 … <x-msg://15/#> On 30. Dec 2020, at 15:39, Cyrbaby @.***> wrote: Greetings, I read the publication “ Free Your CSI: A Channel State Information Extraction Platform For Modern Wi-Fi Chipsets.” The publication mention “In the first (top) we inject a frame from another Asus router with a single spatial stream (NSS = 1). In this case, the router transmits the same data Space Time Block Coded (STBC) over four antennas. ” How can I accomplish this step using Asus RT-AC86U? Since I want to use nexmon CSI Extractor test multi-target localization performance, I don't want different target is separated by spatial stream. Can I control the number of spatial stream in transmitter? Thanks in advance. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#166 https://github.com/seemoo-lab/nexmon_csi/issues/166>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773V7TRGED5SSBFRQ5NLSXM3QZANCNFSM4VOMNP6Q https://github.com/notifications/unsubscribe-auth/ACZ773V7TRGED5SSBFRQ5NLSXM3QZANCNFSM4VOMNP6Q.

Thank you for the hint. NEXMON is a really useful tool for frame injection.However, the devices NEXMON support don't include the ASUS router, can I control the number of spatial stream in Asus RT-AC86U?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon_csi/issues/166#issuecomment-752817123, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773UCIODZIROZ3O3ZW7LSXPMO3ANCNFSM4VOMNP6Q.

Cyrbaby commented 3 years ago

Thanks for the reply

yujianyuanhaha commented 3 years ago

@Cyrbaby @matthiasseemoo Well, I think simply a SMA terminator will do to "block" 3 antennas and leave only 1 antennas. For ASUS router, you need to take off all 3 antennas and replace them with SMA terminator. In this way, there is only 1 TX antennas.

terminator

Cyrbaby commented 3 years ago

@Cyrbaby @matthiasseemoo Well, I think simply a SMA terminator will do to "block" 3 antennas and leave only 1 antennas. For ASUS router, you need to take off all 3 antennas and replace them with SMA terminator. In this way, there is only 1 TX antennas.

terminator

Thanks for the answer!But I just want use 4 TX antennas all,and these antennas transmit the same spatial stream.

matthiasseemoo commented 3 years ago

You should only use terminators on receive antennas. On transmit antennas, they will likely reflect most of the transmission power back into your transmitter and might thereby damage your hardware. In rates.h we have some macros to define the number of spatial streams (NSS) [1]. That does not necessarily mean that only one antenna is used for transmission. One stream can also be transmitted using multiple antennas using STBC. Then you can observe the effects in Figure 7 of our Free your CSI paper.

[1] https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36

On 21. Jan 2021, at 06:56, Cyrbaby notifications@github.com wrote:

@Cyrbaby https://github.com/Cyrbaby @matthiasseemoo https://github.com/matthiasseemoo Well, I think simply a SMA terminator will do to "block" 3 antennas and leave only 1 antennas. For ASUS router, you need to take off all 3 antennas and replace them with SMA terminator. In this way, there is only 1 TX antennas.

https://user-images.githubusercontent.com/9403813/104978434-d31e1b00-59cf-11eb-9c36-d3dde157269f.jpg Thanks for the answer!But I just want use 4 TX antennas all,and these antennas transmit the same spatial stream.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon_csi/issues/166#issuecomment-764399379, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773W5PWPWPO6UI6BS6E3S266XJANCNFSM4VOMNP6Q.

Cyrbaby commented 3 years ago

You should only use terminators on receive antennas. On transmit antennas, they will likely reflect most of the transmission power back into your transmitter and might thereby damage your hardware. In rates.h we have some macros to define the number of spatial streams (NSS) [1]. That does not necessarily mean that only one antenna is used for transmission. One stream can also be transmitted using multiple antennas using STBC. Then you can observe the effects in Figure 7 of our Free your CSI paper. [1] https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 https://github.com/seemoo-lab/nexmon/blob/master/patches/include/rates.h#L36 On 21. Jan 2021, at 06:56, Cyrbaby @.***> wrote: @Cyrbaby https://github.com/Cyrbaby @matthiasseemoo https://github.com/matthiasseemoo Well, I think simply a SMA terminator will do to "block" 3 antennas and leave only 1 antennas. For ASUS router, you need to take off all 3 antennas and replace them with SMA terminator. In this way, there is only 1 TX antennas. https://user-images.githubusercontent.com/9403813/104978434-d31e1b00-59cf-11eb-9c36-d3dde157269f.jpg Thanks for the answer!But I just want use 4 TX antennas all,and these antennas transmit the same spatial stream. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#166 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ773W5PWPWPO6UI6BS6E3S266XJANCNFSM4VOMNP6Q.

Thanks for the reply!I am researching the related code.

Deltaaaaaaaaaa commented 3 years ago

@Cyrbaby @matthiasseemoo Well, I think simply a SMA terminator will do to "block" 3 antennas and leave only 1 antennas. For ASUS router, you need to take off all 3 antennas and replace them with SMA terminator. In this way, there is only 1 TX antennas.

Thanks for the answer!But I just want use 4 TX antennas all,and these antennas transmit the same spatial stream.

Hi, if you are still working on this, maybe you can transmit on one antenna(SMA connector on AC86U), and apply a power splitter to the SMA connector, split the signal to 4 antennas. I hope it would help!

Arsering commented 3 years ago

@Cyrbaby Hi, Are you able to inject frame on ASUS RT-AC86U?