Jump to content

Raw packet sending & receiving


Noda

Recommended Posts

Hi,

 

I'm working on DS<>DS communication (without any PC)...

 

I'm using my own packet handler with:

Wifi_RawSetPacketHandler(myHandler);

 

and I have set the DS to receive every wifi packet:

Wifi_SetPromiscuousMode(true);

 

Then I use Wifi_RawTxFrame(256, 0x000A, (u16*)msg) to send my raw packets.

 

 

Now I have some question about this:

I read somewhere that in order to capture every single packet without any filtering and sending "true" raw packets, I need a special setup of the wifi regs, is that true or the above functions are enough?

 

When capturing raw packets, are even the malformed packets captured or only packets with 802.11 valid preample/headers/CRC?

 

When sending raw packets, are the packets somehow modified by the wifi hardware?

 

Thanks a lot.

Link to comment
Share on other sites

Hiya;

A few things to note, I'm not presently aware of a good way to "receive all packets" - the closest you're likely to come is to "receive all packets associated with a specific group" - which can be achieved by first connecting to a fake access point where you supply the MAC address (BSSID), and then disconnecting - before expecting to receive packets.

 

At present, outgoing packets are not appreciably modified (unless WEP is enabled), besides the last 4 bytes of the packet being overwritten with a CRC. The hardware may deny sending certain packets if the 802.11 header isn't correct enough.

 

When capturing, only packets with valid preamble/crc make it in.

 

-Stephen

Link to comment
Share on other sites

Thanks for the clarification.

 

So if I understand well, I need to write a correct preamble+header in my raw packet before sending them so the packet is accepted by the hardware?

 

I suspected something with the raw packet send as I capture seemed to work well (captured same frames as with a pc) but I couldn't find a trace of the packets I sent.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...