gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Getting Started - Detecting WiFi Packets

#43435 - Vixus - Mon May 23, 2005 2:50 pm

Right, I know I'm just starting out here, a "n00b" as it were. I've noticed a lack of non-hoax NDS tunnelling projecs around (tell me if I'm wrong) and want to fill this gap. I have a vague idea of how tunnelling software works and an even vaguer idea of how to get started creating my own. For one thing I need to find out how the DS communicates its multiplayer information, right? Next I need to be able to decode these packets (I think) and pass them on to other players, correct?

So how should I go about:
- Getting my PC to detect the DS?
- Intercepting packets given off by the DS?

Thanks, just tolerate me and tell me if I'm going about anything the wrong way ;)
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.


Last edited by Vixus on Wed May 25, 2005 10:20 am; edited 1 time in total

#43439 - Mr Snowflake - Mon May 23, 2005 3:56 pm

It's not that I don't want to see this happen, but what makes you think you can pull this off and others can't? I'm just sceptic because all the hoaxes there have been on the net, since the launch

#43440 - Vixus - Mon May 23, 2005 4:07 pm

That's the point. I'm sure there are many who are way more capable than me at pulling this off, yet I haven't seen anyone try! So someone should, and everyone has to start somewhere... so I decided, why not me? Is there anything wrong with that? I'm getting tired of all these hoaxes too, don't worry. I've waited for ages since the launch and haven't seen any true work so, well, you could call it taking matters into my own hands! :)
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43475 - doublec - Mon May 23, 2005 10:33 pm

To communicate with the DS you might want to consider using the driver that the Wireless Multiboot program uses:

http://users.belgacom.net/bn967347/

Since WMB communicates with the DS using it I suppose it could be used by other programs. The downside of course is there is no docs for it. Would the author of that driver mind other people using it for other programs like tunnelling?

#43484 - Mr Snowflake - Mon May 23, 2005 11:56 pm

Ask Tim, he's around here. With this driver, I think you already have a big part of the hardest part done. Namely: getting the wificard receiving and sending ds packages, I just don't know if it will work with real game traffic.

#43556 - Vixus - Tue May 24, 2005 4:14 pm

It should, because you are simply recieving the game packets and sending a copy of them to the people at the other line, am I correct? This is what I was thinking:

[ DS ] --> *packet* --> [ WiFi Card/Router ]-->[ Server Tunnel Program ] --> ***INTERNET*** --> [ Client Tunnel Program ] --> [ WiFi ] --> *packet* --> [ DS ]

Thanks for the link doublec.
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43647 - Vixus - Wed May 25, 2005 10:21 am

Sorry for the double post, just needed to boost this up... can DS packets be detected by a normal packet sniffing program such as Packetyzer?
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43698 - Darkain - Wed May 25, 2005 8:20 pm

i would just like to point out that the reason the DS isnt tunneled, is because those of us that know HOW to do it, dont really care to. we are busy working on other more important projects currently.

but to give you a little heads up, direct tunneling of the DS wont work (too much latency over the net). instead, you will have to emulate a low latency connection by having each PC emulate a DS, and auto-respond w/ OK packets, and only forward actual data packets. this is also true for the handshaking process. plus, you might need to do some MAC translation, depending on if you can fake your MAC address or not. another note: there is currently only 1 known working chipset at the moment that can get to this level of emulation, the one that is being used for WifiMe.
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS

#43708 - Chetic - Wed May 25, 2005 9:24 pm

This means you will have to use "special" software on a PC between for all the online homebrew stuff that might come though, right?
Would be a real shame.. I was really hoping I'd be able to run stuff in school, except the normal games.
_________________
Packin':
Grey DS with FlashMe v7
1Gbit XG2T 2005 (Neoflash compatible)
GBAMP, Supercard CF, 512Mb Magic Key 3 and EZFA 256Mbit

#43717 - assassda - Wed May 25, 2005 10:10 pm

well once the official online service is released it may be possible to use over any wifi card but for anything homebrew you need a ralink card

#43719 - Vixus - Wed May 25, 2005 10:32 pm

Yep, I've been corresponding with tim. I wonder if you can use a wireless router though.
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43724 - Darkain - Wed May 25, 2005 11:12 pm

Vixus wrote:
Yep, I've been corresponding with tim. I wonder if you can use a wireless router though.


we've gone over this countless times. for nintendos service? yes. for anything else? no. why? because routers route at the TCP level, not the raw 802.11 level.
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS

#43755 - nix - Thu May 26, 2005 8:24 am

afaik, Team XLink actually did try tunnelling, but gave up. Most other people seem to have done the same.

#43761 - Vixus - Thu May 26, 2005 10:07 am

Darkain wrote:
we've gone over this countless times.

I haven't! :D

Darkain wrote:
For nintendos service? yes. for anything else? no. why? because routers route at the TCP level, not the raw 802.11 level.


Ok, well thanks for clearing that up. In short, any tunneling software would actually have to overlay TCP information on top of the raw 802.11 data for it to work with a router, right?
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43765 - linus - Thu May 26, 2005 1:26 pm

RE: router

This is a bit pointless and off the wall but if you put one of the ralink pcmcia inside the linksys WRT54G and customize the firmware would it be possible to tunnel the packets via a router?

Believe me i am in no way suggesting this as a feasable or worthwhile exercise. You would have to have a very indepth knowledge of the WRT54G firmware and ralink drivers, not to mention the problems of timing and latency with nifi tunneling. Also not to mention why bother use a router?

Anywho i just wondered if its technically possible. Im sure there would probably be problems getting an ralink pcmcia card working in a linksys router :)

RE: TCP

As far as i understand it you would have to encapsulate the raw nifi packets in some TCP packets. It is very easy to have a simplified view of tunneling but there is quite a lot to it, and i dont claim to have anywhere near the amount of knowledge required to do it. Im sure there are people like Darkain who could do it but there working on other things. For that reason i strongly encourage people to talk about it even if they themselves cant do it because it sparks ideas.

Many people dont really see tunneling as worthwhile now that nintendo has announced its online service, but i still think its worth doing because many games will still be released that are [edit]not[/edit] online that we will want to play over the net.

[/waffle]

Linus


Last edited by linus on Thu May 26, 2005 6:17 pm; edited 1 time in total

#43771 - Vixus - Thu May 26, 2005 3:57 pm

It's for the games that aren't online already.

Well...

*TCP*NiFi*TCP* <--- this is my impression of a NiFi packet getting packaged inside a TCP thing.

OK, I was thinking about this to get it working with a wireless router:

DS=>[NiFi] ---> Card=> Program (Nifi + TCP) --router-internet--> [*TCP*NiFi*TCP*] ---> Router=> Client (NiFi - TCP) ---> Card=> [NiFi]=>DS

Because the router cannot use raw 802.11 frames... but first, wouldn't it be simply possible to:

DS=>[NiFi] ---> Card=> Program (Encode Nifi) --internet--> [*TCP*NiFi*TCP*] ---> Router=> Client (Decode NiFi) ---> Card=> [NiFi]=>DS

***Where NiFi == DS Packet.***
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.


Last edited by Vixus on Thu May 26, 2005 6:28 pm; edited 1 time in total

#43778 - linus - Thu May 26, 2005 6:16 pm

im a bit confused, on the second one it looks like your trying to send a raw DS packet over the net. The top one looks ok, where you've encapsulated the DS packet in a TCP packet. Sending a raw DS (nifi) packet over the web wouldnt do anything, it wouldnt know where to go youd have to specify an IP which is the IP of the computer "client" program. Darkains website has some differences between a NiFi and WiFi packet.

I think for simplicities sake you should forget about routers theyre confusing what your trying to do. The program should be running on a pc at either end, each computer should use its internet connection to send packets but you shouldnt worry whether this is via a router or not.

Linus

PS

i meant *not* online in my last post ill edit it now

#43779 - Vixus - Thu May 26, 2005 6:24 pm

Oh sorry, I didn't change the second one... the NiFi packet would be packaged within a packet created by the tunneling software.
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.

#43821 - linus - Fri May 27, 2005 1:19 am

urm i dont understand the difference between:

Client (Decode NiFi)

and

Client (NiFi - TCP)

i still think you shouldnt be worrying about routers, the hard bit is sorting out the timing and latency issues between the ds's connected over the internet. Itd be an achievement just to get tunneling over a lan or anything with lowish latency.

#43822 - doublec - Fri May 27, 2005 1:25 am

A good first step would be to document the protocol for the communication between the two DS's. Then someone could get started writing the program to do the tunnelling.

Even just starting the first step of documenting the protocol for the part where DS1 sends out "I've got data for another DS'. Then you could write a program to tunnel this specific bit.

Testing could be fun. Running the program on DS1, tunnelling it on your PC. Running 30 feet away to DS2 and PC2 (so DS2 doesn't pick up the direct communication with DS1). Sounds like a good way to get fit :-)

#43823 - Darkain - Fri May 27, 2005 1:28 am

woah... nice idea... too bad nobody thought about this in the "DS wireless cracking thread" that started last year...
[/sarcasm]

really tho, go read that thread if you want "documentation". its full of our already existing trial and error comments and other stuff from figuring out the DSs various protocols.
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS

#43864 - Vixus - Fri May 27, 2005 12:07 pm

Thanks, darkain and everyone else... I better carry out some more research first! :)

Hmm, that topic seems to be based on people trying to decode the actual DS packets... I didn't really think you'd have to... I thought you could just insert the DS packets into another with the appropriate information to sent it across the web, and then get the client at the other end to 'remove' the extra information, get the raw DS packet, and pass it on to the client DS.
_________________
TunnelVision Website - Bringing DS multiplayer to the masses.