#75029 - masscat - Thu Mar 09, 2006 5:22 pm
I have been beavering away porting my WMB host over to the NDS and decided to release what I have done so far. It does not work yet.
It can authenticate and associate a client but the data transfer does not work.
You can get it from here.
It sends the nds file called test.nds on the root of the CF card.
So why release a non-working version? Well for a couple of reasons.
Two heads are better than one. The wifi code (base on the dswifi lib) cannot receive 802.11 Data + CF-Ack frames (frame type 0x18). So if anybody wants to help out and get this working then please do - it is what I am trying to figure out at the moment.
I only have one DS and a GBAMP so I have been testing against my linux WMB client (also broken - see website). So let me know if you have any luck talking to a real DS and any code changes needed to work with other carts (M3, supercard and the like).
Ben
#75036 - funkaster - Thu Mar 09, 2006 6:56 pm
masscat wrote: |
You can get it from here.
Ben |
I'm trying to compile wmbhost, but fails with this:
Code: |
gcc -g -W -Wall -O2 -I ../core/include -I include src/socket_things.c -c -o build/socket_things.linux.o
src/socket_things.c: In function ?init_iface?:
src/socket_things.c:17: error: storage size of ?ifr? isn?t known
src/socket_things.c:18: error: storage size of ?sll? isn?t known
src/socket_things.c:34: error: ?ETH_P_ALL? undeclared (first use in this function)
|
#75038 - tetsujin - Thu Mar 09, 2006 7:15 pm
So switching to the PCI card didn't get the latency down enough for the WMB client to work? That's too bad... Glad to see the work on the WMB code is still progressing, though. I know a lot of people will be happy to have the capability to WMB beacon arbitrary stuff off their CF card. WMB client on the NDS will be sweet, too, as it'll made demo capture much easier.
I can't yet do much with this, either, as I also have just the one NDS right now... Maybe when the Lites are easier to come by...
_________________
---GEC
I think that all the work that's been done by the homebrew community so far to support people who want to program for the GBA or DS is amazing.
Thank you, everyone, I look forward to taking advantage of your work.
#75042 - funkaster - Thu Mar 09, 2006 7:36 pm
funkaster wrote: |
I'm trying to compile wmbhost, but fails with this:
Code: |
gcc -g -W -Wall -O2 -I ../core/include -I include src/socket_things.c -c -o build/socket_things.linux.o
src/socket_things.c: In function ?init_iface?:
src/socket_things.c:17: error: storage size of ?ifr? isn?t known
src/socket_things.c:18: error: storage size of ?sll? isn?t known
src/socket_things.c:34: error: ?ETH_P_ALL? undeclared (first use in this function)
|
|
All right... You missed a few #includes:
linux_lib/src/socket_things.c:
- #include <net/if.h>
- #include <netpacket/packet.h>
- #include <net/ethernet.h>
#75045 - masscat - Thu Mar 09, 2006 8:46 pm
tetsujin wrote: |
So switching to the PCI card didn't get the latency down enough for the WMB client to work? |
My PCI card was proving a little unstable so I gave up on trying to get the client to work with it and moved over to the NDS port instead. If the wifi problem is solved then I can port the WMB client over to the DS where latency will not be a problem. A nice portable demo capturer.
funkaster wrote: |
All right... You missed a few #includes: |
I will move from the linux/*.h includes to net*/*.h includes. Should this make the code more portable?
#75177 - tetsujin - Fri Mar 10, 2006 8:07 pm
masscat wrote: |
tetsujin wrote: | So switching to the PCI card didn't get the latency down enough for the WMB client to work? |
My PCI card was proving a little unstable so I gave up on trying to get the client to work with it and moved over to the NDS port instead. If the wifi problem is solved then I can port the WMB client over to the DS where latency will not be a problem. A nice portable demo capturer. |
Unstable? How so?
If it's unstable in a way that my card isn't, then perhaps I could help out by working on that.. Though I'm not sure how much I'll actually get accomplished - last time around it felt like the best I could manage was just monkeying around with other people's code...
_________________
---GEC
I think that all the work that's been done by the homebrew community so far to support people who want to program for the GBA or DS is amazing.
Thank you, everyone, I look forward to taking advantage of your work.
#76140 - masscat - Sat Mar 18, 2006 4:34 pm
I have not been around for a bit (been building a AUX line in interface for a Ford car stereo) and not done much work on this.
My rt2500 card does not always transmit packets after a reboot and I have to remove the module and reload it to get it working.
I am not going to work on the linux rt2500 client driver as I cannot be sure that the driver is doing what I think it is doing and I believe that a WMB host and client for the DS will be useful for more people. I may return to this when the new version of the open source driver is released.
Tetsujin, if you (or anybody else) want to play around with it, you are more than welcome. The plan was to do similar changes to those of the rt2570 client driver from my site.
No news of the DS side of things, still poking around seeing if I can get the DS to receive the data frames. I see that the DSWifi lib test app now has a packet capture feature (not working yet I think) so if sgstair gets this working then I should be able to use the same technique to get packets in.
#76223 - masscat - Sun Mar 19, 2006 4:50 pm
A step closer:
I can now receive and send data frames. The wifi register values are as follows :
Code: |
8012 = 0x703f
81ae = 0x1fff
80d0 = 0x0301
80e0 = 0x000d
8008 = 0xe000
8004 = 0x0001 |
I think the interesting one is the 8008 register. The MAC address and BSS id are set to the hardware address of the DS.
The RSA frames are not getting sent out now (these are just normal data frames so a little surprising). I am investigationg this and when solved I will stick a new version up on my web site.
EDIT: The RSA problem was a 16 bit word alignment problem. The RSA frame was not 16 bit word aligned and when the ARM came to copy them it got a little confused. Also happened when accessing 16 bit fields within frames that happened to fall on a odd boundary. Alignment fixed and out come the frames.
Still not working though :). There is data transfer but the wifi is a little unstable and dies before the transfer can complete (transmitting appears to stop). No release yet then. I am going to tidy up the wifi code (lots of hacks lying around) and investigate getting it to be happier.
Last edited by masscat on Sun Mar 19, 2006 11:05 pm; edited 2 times in total
#76263 - melw - Sun Mar 19, 2006 9:41 pm
Sounds promising... thumbs up! Would be handy indeed to be able to share a homebrew software by simply sending it over WiFi to another NDS.
#76265 - tepples - Sun Mar 19, 2006 9:53 pm
But unless and until WiFiMe2 becomes a reality, you'd still have to carry around a PassMe2 and a GBA flash card in order to get "another DS" to a point where it will accept unsigned WMB.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#76675 - masscat - Thu Mar 23, 2006 1:38 pm
If you are interested in investigating how DS wifi works and is configured then here are some shell scripts and awk programs that could be useful.
wifi_investigation.tar.bz
It dumps the ARM7 asm from the meteos demo as html files and then references these for wifi register accesses. You can then wonder through and annotate this with your favourite web browser and editor combination.
Once you have unpacked the tar change to the wifi_investigation directory and run it as follows:
Code: |
./make_html ~/NintendoHacking/Demos/meteos_demo_e3_2005.nds |
Replacing the second bit with the location of the meteos demo on your system.
This should create lots of html files in the meteos_html directory for you to explore. A good place to start is regs.html.
For the scripts/programs to run you need dsd (part of devkitARM), gawk and some sort of bash like shell (msys under windows?).
EDIT: Forgot to mention, these scripts will not find all accesses to the wifi registers as they look for register address values being loaded from memory. Therefore register addresses passed around in the ARM registers or constructed arithmetically will be missed.
You can use the scripts to search for other things by changing the build_wifi_reg_list.awk awk program.