Monday 18 May 2009

Interfacing the Nintendo DS to the Surveyor SRV1

This is a description of how to get the Nintendo DS to talk to the Surveyor SRV1 Robot/Camera. I have included binaries, source code and links. I try to give the nod to all the places I lifted source code.






I have got the basics going as you can see by the videos and I invite you all to have a go with the source code and keep me updated with any developments. My time is sadly limited so I guess my development will be slow - lots of different things to work on at once :P I have commented the code . You should have a look at http://www.surveyor.com/SRV_protocol.html for the definitions of the commands.

You will need to buy a pass through cart which will allow you to run your own software on the DS - I beleive google has kindly provided ads on this page to these kinds of things.

Unless your Surveyor is set to 192.168.2.55 then you will need to recompile with your own IP in there - its not hard - have a go :) If someone has time to get the filesystem examples a look see then perhaps a settings file could be set up. If anyone wants me to embed their IP in a binary then let me know.I can be bribed with coffee and red bull.

All the code is in link below. Actually I just zipped up the whole directory. You can even see that the wireless part was based one the ap_search example code. I have tried to comment the code sufficiently so you can see what is happening.

http://www.soleyphotos.com/ap_search.rar

Right lets get the nods out of the way :)

Surveyor SRV1 - http://www.surveyor.com

This is a very cool robotics system with a camera and wireless and a very helpful support system. Its all open source, and they are constantly improving/adding modules.

DevKitPro http://www.devkitpro.org

This is for developing NDS software. This contains libnds which has tonnes of example code and a very easy to use toolchain for compiling.

URLs for NDS programming and how to get started

http://patater.com/files/projects/manual/manual.html

http://www.double.co.nz/nintendo_ds/

And not forgetting the awsome chap who modified the jpeg library to work with NDS I am using.
http://headkaze.drunkencoders.com/

NOTES
  • The DS is only 802.11b and since where I work I am on the edge of the network, then I needed to knock the quality of the jpg down to speed up data transfer. Probably be able to set the quality up with better signal.
  • The DSi is apparently 802.11g so you should be able to knock the quality up! Also it would be cool for someone to write into the surveyor firmware a way to get arbitary size jpgs... since DS is 256 * 192 on each pane.
  • The robot you see is using the Surveyor Camera/Wifi/Blackfin system mounted onto a POB Tank.
  • I have a 3D printer, so if anyone wants any prototyping done in plastic them please contact for a quote.


If you feel like my efforts have been of any help then feel free to donate and keep me in coffee and red bull!





9 comments:

  1. Is the DS binary supposed to be titled ap_search.nds? I tried running it and all I get is something like the airscan program.

    ReplyDelete
  2. Yes, you then press the a button to accept which network point you want to use,

    ReplyDelete
  3. Which source file defines the IP address? I need to change it and recompile it with my ip address. After scanning the source, I couldn't find any place to change it.

    ReplyDelete
  4. template.c


    // Tell the socket to connect to the IP address we found, on port 10001
    // Here i set up my IP address ( you will need to change this )
    ipu.ipBroken.a = 192;
    ipu.ipBroken.b = 168;
    ipu.ipBroken.c = 2;
    ipu.ipBroken.d = 55;

    ReplyDelete
  5. Ok thanks.
    Hm.. still no luck. Should this be compatible with the SRV1 Blackfin?

    ReplyDelete
  6. Ok I recomiled with my ip address, but it gets stuck at assocauthenticating. Does the surveyor have to have a specific firmware? Does the DS have to be a lite for updated wifi functions?

    ReplyDelete
  7. How are you connecting, is this Ad-hoc or Infrastructure network? Feel free to email me at peterseandove@gmail.com for quicker responses. Needs to be infrastructure mode on surveyor and network because for some reason the DS wont connect to the surveyor with Ad-hoc

    ReplyDelete
  8. Oh ok thanks. I had it set in ad-hoc, and the DS could detect it, but it wouldn't connect.

    ReplyDelete
  9. Couldn't find the pass-through catridge online, mind posting a link?

    ReplyDelete