rt25x0 Nintendo DS Client Driver
This is a work in progress. It currently does not work and only supports the rt2570 chipset.
This driver allows you to associate with a Nintendo DS hosting a WMB session. You can send and receive
packets using a PF_PACKET and SOCK_DGRAM socket bound to the network interface.
The driver can also be used for hosting WMB sessions in the normal manner.
The source for the driver is here.
How the driver been hacked
Beacons
DSs send out beacon frames with a special Nintendo information element. To associate with them
information held in this IE must be included in the Association Request. You can find more information
here. The driver notices beacons with this IE and sets up the SSID for
the request accordingly.
CF-Poll
This is the bit that does not work as I cannot get the driver to send out the response quickly
enough. My understanding is be incomplete, any help welcome.
The DS host polls the client with data + CF-Poll frames. The client must reply to this poll in a
timely manner (I believe this is about a window of 500 microseconds - a DS replys in around 200
microseconds).
The driver takes packets sent from the application and, if associated with a DS, places them on a
special queue (Nin Data queue) so they are not transmitted immediately. Received frames are examined
and if they are CF-Polls the driver will transmit the packet at the head of the Nin Data queue in
a Data + CF-Ack frame. If the queue is empty a No Data + CF-Ack frmae is sent.
Getting the interface to associate
You associate with a DS in the same way as you would any access point. Bring the interface up and
put it into managed mode if it is not already.
Perform a scan (iwlist <if_name> scan). This does not always pick up the DS immediately in which
case perform the scan again. Information regarding your DS should be displayed
(its address will start with 00:09:bf). You can then associate with iwconfig <if_name>
ap 00:09:bf:xx:xx:xx where the xx:xx:xx is replaced with the address returned by the scan.
If the interface is associated it will show the access point address when you run
iwconfig.
Sometimes the interface will associate automatically, which is a bit annoying. I do not use wireless
networks normally and not entirely sure how to control the association process.
Example Application
Here is an example application showing how to communicate using the driver. If you run the application
whilst associated with (or just before associating) a DS it will print stuff letting you know it is
working.
|