Help - Search - Members - Calendar
Full Version: Official DS Wifi FAQ
1Emulation.Com > Official Emulator Forums > DSWifi
sgstair
Since I'm feeling especially helpful.... here's a listing of the frequently asked questions here and answers for them.
If you have a question that you think should be here, please post it in this thread and I may add it to this post.

Q: What exactly is DS Wifi and what can it do?
A: the DS Wifi library I'm working on is a software toolkit for homebrew developers that will let them use the wifi capabilities on the DS in a very similar way to the way computers use a wireless network card. It's not designed to have a specific set of end uses, rather it will provide a way for the community to create application using internet support, ds-ds communications, and other things that standard wifi cards can do.

Q: What license will DS Wifi be released under?
A: Probably the BSD licence, I've had people also suggest the MIT license, I'll review them and pick one before release.

Q: Will DS Wifi support WEP/WPA?
A: The hardware has built in support for WEP, so it will be supported. WPA is a software extension of WEP that changes the key, I'm looking into what it will take to support WPA but I don't know if it can be done yet.

Q: Will the DS Wifi support access points? ad hoc mode? Nifi?
A: The initial release is planned to support both access points and ad-hoc operation (there are a few small technical difficulties with ad-hoc at the moment, but those will likely be fixed before release). Nifi is merely a modification of 802.11, and a raw wireless interface will be provided for those who want to construct their own nifi packets (technically it will be possible to run regular 802.11 and nifi at the same time, but this isn't a wonderful idea) - To use Nifi though, you will have to understand 802.11 enough to create your own 802.11 packets and read and understand the incoming packets.

Q: What will the developer interface look like?
A: The TCP/IP interface will try to mimic traditional Berkley sockets, for the purpose of allowing software to easily be ported to DS. There will also be some special API for connecting to access points, setting up IP addresses, and raw wifi traffic.

Q: When will it be released???
A: Well, that's really complicated. Please try to remember that I'm working off of my own documentation of a foreign hardware system - not all of the features of the wifi hardware are completely mapped out yet, and I run into problems due to that from time to time. Also, despite my best efforts I have been unable to make lwIP do what I want it to. So, I'm not going to give an estimate as I'll probably wind up being way off the mark. I try to post updates on my website (www.akkit.org) when I have something to report.

Q: Can the DS Wifi be used to run things on the DS?
A: The DS Wifi Library is merely a tool for developers to add to their programs, it does not in any way change how you run code on the DS - you still will need passme/flashme/wifime to run the homebrew that the library is used in, just like any other homebrew at the moment.

Q: What will you do with the money from the DS Wifi Bounty (sc.tri-bit.com)?
A: Well, perhaps you're being too curious by asking a question like this... but the money will go to paying bills, keeping me fed, and buying new equipment to play with.

Q: What's the deal with the DS trojan/virus/bricking thingy?
A: First, see this news post (1emulation.com) - A few notes, it's a trojan, which means it will not spread, and it requires someone to download it and run it to be hurt. There are only two known files at the moment that have it, but by far most homebrew can be trusted. Just as a general rule you shouldn't be going off and running things from shady places on the net anyway wink.gif

Q: I have no experience writing server/client software. What do I need to learn in order to be ready to use DS Wifi in my projects?
A: As programming client/server applications on the DS Will be nearly identical to programming them on the PC and other systems, there are undoubtedly other places where you can find tutorials for writing client/server software. As for what you need to learn, you will need a working knowledge of Berkley Sockets, sometimes just called 'sockets' (for which there are countless tutorials on the web). That's all that's really required, but having some understanding of how existing client/server apps work will be very useful in making your system run smoothly.


Ok, if you have more questions you think should be listed here, let me know in this thread and I might add them.

-Stephen
Izhido
I'm just dying for this...

I know I have no right to ask you this, especially since there is a bounty involved, but... we ALL were waiting SOOOO long for this to happen...

So, please, please, please, PLEEEEEEEEEEASE...

Do tell us: HOW does WiFi work in the DS? WHAT is required? Registers? Traps? Mem addresses? ANYTHING???

(sits back, crossing fingers)

- Izhido
sgstair
Well uh, I won't add this to the faq until I release my documentation..... but, it's complicated.
Reeeeeally complicated...

the DS Wifi is a custom hardware register set integrated onto the main DS chip with all the other hardware (video, sound, etc) - it contains some dedicated ram and a huge register map (over 100 registers) and is tied in to the interrupt system, and has serial connections to 2 chips in the RF daughterboard.

Mainly what is required to use the wifi, is a whole lot of init and some basic understanding of how a few important parts of the hardware work. The ds hardware does a lot of the work for you, but it's unclear just how much it does, that will require very extensive testing to figure out and I haven't managed to get through anywhere near all the possibilities yet. At the core of what I consider to be the "important" parts of wifi is a hardware FIFO/circular buffer in the attached memory chunk, the hardware system of sending data(register and interrupt based), and the hardware interfaces to the two external chips.

well, now you're going to ask for more information, but that'd take much longer to explain, so it's best just to wait for my documentation which I promise is comprehensive about the topics I know about, specificly the ones that are important. At the rate I'm presently going, it shouldn't be long, either.

-Stephen
SuperKoopa
Wow. That sounds incredibly complicated. I hope the GUI is generally not as complicated.. I could learn.. but yeah.
mike260
Hello!

Can you tell us anything about what the dswifi memory footprint will be like?

Thanks,
Mike
sgstair
QUOTE (mike260 @ Oct 29 2005, 07:26 AM)
Hello!

Can you tell us anything about what the dswifi memory footprint will be like?

Thanks,
Mike
*


Hiya, Right now the ds wifi memory footprint is just under 40k, and sgIP memory usage is also just about 40k (note though, dynamic memory is presently being used on a per-connection basis)

So, I don't think it's unreasonable to say that the entire package should use around 96k of ram under normal conditions. This can be tweaked and tuned, and I'll probably drop the amount of memory a while after the first revision has been out for a while. (when I get a chance to play around with some apps and figure out just how much is actually being used.)

-Stephen
mike260
QUOTE (sgstair @ Nov 3 2005, 02:27 PM)
So, I don't think it's unreasonable to say that the entire package should use around 96k of ram under normal conditions.  This can be tweaked and tuned, and I'll probably drop the amount of memory a while after the first revision has been out for a while. (when I get a chance to play around with some apps and figure out just how much is actually being used.)


Cool, that sounds pretty reasonable. Re. dynamic memory though, is there any chance you could support user-supplied malloc/free functions?

Can't wait for the lib, best of luck getting it wrapped up and collecting the rest of that well-deserved bounty.
sgstair
Yes, it's presently designed to support user malloc/free functions. And, there is the option to go with fully static allocated memory too.

-Stephen
Lockwood
Hey sgstair,
Will I be able to make a online filesystem with my computer for my ds?
thoduv
Do you have progress on the TCP/IP protcol ?
Lockwood
I have everything:

a house
a computer
parents
stupid sister
brother
a nds
a supercard sd with superpasskey

tongue.gif laugh.gif
alexa999
QUOTE (thoduv @ Nov 6 2005, 05:46 AM)
Do you have progress on the TCP/IP protcol ?
*


I was wondering the same thing, its been a week since an update! cool.gif
MasterKevosavi
QUOTE (alexa999 @ Nov 6 2005, 11:37 AM)
QUOTE (thoduv @ Nov 6 2005, 05:46 AM)
Do you have progress on the TCP/IP protcol ?
*


I was wondering the same thing, its been a week since an update! cool.gif
*



Just wondering that to!
sgstair
Of course I'm making progress... just wait, something big is about to happen... smile.gif

-Stephen
thoduv
Ha haven't all understant in your last news... Is the project paused ? Will it be late ? About 1 week, 2 week, or undermined ?

(Sorry but I've a bad english...)
Lockwood
He is not feeling very well he's sick do you mean that?
naughty.gif
thoduv
12 days without an update ! Have you progressed ?
alexa999
Update Update Update! But no change in percentages...
bafio
QUOTE (sgstair @ Nov 7 2005, 06:21 AM)
Of course I'm making progress... just wait, something big is about to happen... smile.gif

-Stephen
*


Updates updates updates.....
It's all MKDS fault!? dry.gif
(meaning that you are all playing that all the time)

Any news with the tcp stack?
Lockwood
Hey Stephen,
Can you make a little update for backlight off when closing nds and a ''zoeff'' signal for getting a signal?
My nds can hold for only 2 hours with your tool!
yorel
Hello,

I have some stupid (?) questions. Could you answer me ?

What are exactly the BaseBand and the RF chips ?

What are spinlock and WIFI_AUTHLEVEL ? ( wifi_shared.h )

I know what is SSID but BSSID ? RSSI ?

I read somewhere that only the ARM7 was able to use Wifi's registers but i see the file wifi_arm9.h and wifi_arm9.c. So, i'm a little disappointed.

There is a great function in wifi_arm7.c : Wifi_ProcessReceivedFrame. Is-it possible to have more explanation about the code ? what is for ?
sgstair
QUOTE (yorel @ Mar 6 2006, 04:48 AM)
Hello,

I have some stupid (?) questions. Could you answer me ?

What are exactly the BaseBand and the RF chips ?

What are spinlock and WIFI_AUTHLEVEL ? ( wifi_shared.h )

I know what is SSID but BSSID ? RSSI ?

I read somewhere that only the ARM7 was able to use Wifi's registers but i see the file wifi_arm9.h and wifi_arm9.c. So, i'm a little disappointed.

There is a great function in wifi_arm7.c : Wifi_ProcessReceivedFrame. Is-it possible to have more explanation about the code ? what is for ?
*


The baseband & RF chips make up the chipset that does most of the work involved in sending and receiving data. Specificly the RF chip is composed of a Phase Locked Loop translating a reference frequency into a specific transmit frequency, and a mixer, which "moves" a data signal into the RF domain. The baseband chip talks to the RF chip, and controls when to send and receive data, as well as handling buffering of the sending and receiving processes.

a spinlock is a type of locking mechanism used in multithreaded interprocess communication, to ensure atomic data access.
WIFI_AUTHLEVEL is an arbitrary specifier used to track the process of authenticating and then associating to an access point.
BSSID is the base station SSID, or group SSID in the case of an ad-hoc network
RSSI is Received Signal Strength Indicator

Yes; the wifi hardware can *only* be used from the arm7. The reason I have a lot of code on the arm9 side is that I've written a transport interface that allows the arm9 to command the arm7, and tell it what to do basicly, and the data is transferred between the processors automaticly.

Wifi_ProcessReceivedFrame is called whenever a frame is received; it's purpose is to detect certain types of frames (specificly: beacons, and authentication and associacion related packets) and to change the local state or local data store based on them. The function itself is large, but it's premise and layout is very simple.

-Stephen
yorel
Thanks. smile.gif
Yooz Urnaim
How precise can timestamps be generated on the DS? I see that sgstair mentioned microsecond counters in his Hardware Reference page; are discrete microseconds (1 E-6 seconds) as precise as the DS can count? Or can it count fractions of microseconds as well? If so, how small of a fraction? 1/10 microseconds (1 E-7 seconds)? 1/100?...
sgstair
QUOTE (Yooz Urnaim @ Mar 18 2006, 05:14 AM)
How precise can timestamps be generated on the DS? I see that sgstair mentioned microsecond counters in his Hardware Reference page; are discrete microseconds (1 E-6 seconds) as precise as the DS can count? Or can it count fractions of microseconds as well? If so, how small of a fraction? 1/10 microseconds (1 E-7 seconds)? 1/100?...
*

Technically the DS timer system can operate at a maximum resolution of about 33MHz, I think. (which is 32 times more accurate than a microsecond timer)

-Stephen
Two9A
QUOTE (sgstair)
Technically the DS timer system can operate at a maximum resolution of about 33MHz, I think.
Of course, then your problem becomes how to service interrupts that happen every two clocks. Not sure you can do a great deal in that amount of time. tongue.gif
sgstair
QUOTE (Two9A @ Mar 20 2006, 08:52 AM)
QUOTE (sgstair)
Technically the DS timer system can operate at a maximum resolution of about 33MHz, I think.
Of course, then your problem becomes how to service interrupts that happen every two clocks. Not sure you can do a great deal in that amount of time. tongue.gif
*


blah, you don't need to service an interrupt every 2 clocks, just read whenever you like and you get a cycle accurate count.

-Stephen
Grey
Is it possible at all to change the timeout value for things such as autoconnect or recv? I find that if those operations fail for any reasons, it takes a long time, (if ever) for them to come back (I've never actually waited that long). This essentially freezes up the DS if there's a failure. So... is there a way to change the timeout?
sgstair
QUOTE (Grey @ May 16 2006, 12:30 PM)
Is it possible at all to change the timeout value for things such as autoconnect or recv?  I find that if those operations fail for any reasons, it takes a long time, (if ever) for them to come back (I've never actually waited that long).  This essentially freezes up the DS if there's a failure.  So... is there a way to change the timeout?
*

Well.... yes and no.
Autoconnect does time out, but even so, you are in charge of the loop that waits until it's connected, so you are responsible for stopping it early if you want to.
it is possible that recv() will never return in the current version of the lib, but work is being done to fix this - additionally you can switch to non-blocking mode and recv() will always return immediately.

-Stephen
BasiX
Hi! I'm new on this forum and I have a question: Why can my DS not connect to my internet / router if I use my normal WFC-settings? When I play online games, such as Mario Kart DS, it works fine. But i can't connect with homebrew software... (My connection is WEP secured) PLEAS HELP sad.gif
sgstair
BasiX: this is likely due to lack of shared key authentication support, or possibly because your AP is not broadcasting it's SSID - both of these issues are in the pipeline and will be resolved soon though!

-Stephen
regothealien
very complicated all i know is to turn ur pc on then play a ds game that is wifi competable and off you go
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.