简体   繁体   English

向接收者发送数据包(PCAP、WLAN、C),无需连接即可接收

[英]Send packet (PCAP, WLAN, C) to reciever, recieving without connection

I plan to use Wi-Fi by radio to navigate my drone.我计划通过无线电使用 Wi-Fi 来导航我的无人机。 I want so send packets from laptop to the drone.我想将数据包从笔记本电脑发送到无人机。 Currently I can send packets out, but only when the Wi-Fi card is in monitor mode.目前我可以发送数据包,但只有当 Wi-Fi 卡处于监控模式时。

static const u8 u8aRadiotapHeader[] = {
    0x00, 0x00, // <-- radiotap version
    0x0c, 0x00, // <- radiotap header length
    0x04, 0x0c, 0x00, 0x00, // <-- bitmap
    0x22, // <-- rate
    0x0, //<-- tx power
    0x18, 0x00  //<-- antenna 
};

static u8 u8aIeeeHeader[] = {
    0x08, 0x01, 0x00, 0x00,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
    0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
    0x10, 0x86,
};

Is it possible to set up my headers so that the Wi-Fi card will receive the packet without being in monitor mode, and if so, how can I achieve it?是否可以设置我的标头,以便 Wi-Fi 卡在不处于监控模式的情况下接收数据包,如果是这样,我该如何实现? Or am I forced to filter all packets in air?还是我被迫过滤空气中的所有数据包?

Regards, Kokos Bot.问候, Kokos Bot。

My systems:我的系统:

Sender: Linux 64-bit with PCAP for my sending program in C发件人:Linux 64-bit with PCAP for my send program in C

Reciever: R-Pi2接收器:R-Pi2

I use TL-WN722N on both the sending and receiving sides.我在发送端和接收端都使用 TL-WN722N。

The monitor mode allows to send and receive arbitrary packets without association.监控模式允许在没有关联的情况下发送和接收任意数据包。 If your sender and receiver are not connected you can send raw packets using this mode only.如果您的发送方和接收方未连接,您只能使用此模式发送原始数据包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM