NXT SDK, HDK and BDK finally released by LEGO

Today, LEGO finally released
  • the NXT driver interface specification and necessary tools for creating third-party programming environments (SDK)
  • the documentation for the executable file format on the NXT
  • the documentation and schematics for the NXT and related sensors (HDK)
  • the communications protocols to the NXT brick (BDK)

Now, community, lift off!


Christer said…
Now, if only Lego could release the Universal Binary for Intels Macs also.

Then we Mac owners could benefit from a full working product. As you probaly already know, we can't use the Bluetooth feature, because it doesn't work under Rosetta emulation.

But it will come. Some day...
Amr Malik said…
hmm.. good thing I read this comment. I was prob gonna wait till pbForth was released anyways though.
Anonymous said…
If you wander over to the lego shop they also have all of the sensors on sale now as well, boo-yah! No cables though :( Everything is slightly more expensive than education but much more convenient, for me at least.
Tony Naggs said…
The wait has been worthwhile, lots of information here!
There is even a circuit schematic of the NXT brick.

- Tony
Unknown said…
and look at all these shiny C headers in the SDK!
Almost unbelievable when remembering the dark old times of RCX hacking...
Krishna Kumar said…
Any word on the 1.0.3 firmware?


PS: First time comment poster, love this site.
All I've been told is that those needing the patch for the Clicking problem need to contact LEGO support directly... they are either emailing the patch or providing a URL for access to it. I wish I knew more...

I'll ask around again.

Anonymous said…
I must say I am a bit disappointed.
The Fantom appears to be a very low-level interface API. It basically allows locating an NXT then locating a "Module" inside, and read/write from "Module" I/O Map. what is this "Module"? There seems to be no documentation of the standard "Modules" in the NXT. Here's where a higher level
API should be but it will be hard making one without proper documentation!

Fantom allow also sending a direct command to the NXT. Great! From the example I now know that sending 0x03, 0x00, 0x18, 0x10, 0x00 makes a tone. What else can I send ?!?!?

In short, the Fantom API may give us the tools to interact with the NXT from a PC, but it is like having an F-16 with no "User Manual"...

The executable file specifications seems like a detailed description of the low-level program files. I hope it makes NBC more clear (NBC documentations isn't too good...),
but for the average user - it doesn't help much...

The hardware description is pretty informative, allthough I felt it keep the discussion on the "features" level and doesn't get into enough details. They do give the schematics
(this surprised me, I must admit) but reading these requires a good knowledge of electronics
and it would still be difficult to make a third-party firmware from this data. A 25 pages file doesn't describe such a complex hardware.

Also, I was expecting LEGO to give VIs (i.e Blocks) to make extensions for the NXT-G, allowing e.g. I2C communication (which will allow using many third-party sensors with NXT-G) etc.
My guess is that we haven't received everything yet... let's not jump too quickly on LEGO, people.

I imagine it's got to be frustrating at LEGO most days - we (the consumers) don't ever seem to be happy... negative posts, "I don't see this... I don't see that..."

We all seem to forget this is a TOY! A very advanced toy, but it is still a toy...

How about let's give LEGO a little time... we're all complaining but the majority of people don't even have a NXT kit yet.

Sorry to be so negative in a comment, but I'm just a consumer and all I can think is how I'd feel if I were an exec at LEGO... they're proud of getting the product out the door, but all they keep hearing are complaints.

Okay... I'm done.

Gonna go get an ice cream and take some deep breaths.

Anonymous said…
To Guy:

Perhaps you failed to peruse the Bluetooth Developer Kit (BDK) before you posted.

For details on Modules, see p. 18 in Appendix 1 in the Bluetooth Developer Kit (BDK).

For details on Direct Commands, see Appendix 2 in the BDK.

To all:

I think LEGO has done an excellent job so far of providing potential NXT hackers with lots of information and tools to make the hacker's job easier. But half the fun of hacking is having to figure out some things on your own! Be patient, be persistent, and be clever. I'm sure there are many intelligent people out there who realize how lucky they are to have even the current documentation and are currently working on simplifying things for the rest of us.
Anonymous said…
First let me correct the wrong impression - I'm HAPPY that LEGO released these SDKs. That's a great step forward for the NXT community.
As for the direct command set - the BDK indeed give a list of these.
As for the modules - the BDK give the list of IDs, but without the memory map of each module, Fantom is useless...
I'm sorry for being a pain, but wasn't there an MDP program? Didn't any MDP write a higher-level API, or was these SDKs not available to MDP mmbers also?
Gordon B said…
Did anyone find details on using the ultrasonic sensor in the documentation? I think there are ways to put the US in single ping mode and also control the time between pings but I could not find this anywhere.

Lots of good info in the motors. Now I just have to learn about PID!

Shoot me an email when you can...

Krishna Kumar said…
I agree with Jim, we need to learn to be patient; but the NXT is so awesome that we want to take it to new heights and every day of waiting makes it tough.

For me the thing that makes the wait tough is - knowing that the MDP have had access to the SDK and other information for their projects, wish all the work they did, in terms of Bluetooth applications to control the NXT be made available in the form of samples.

Reading thru the SDK documentation is tough without start up samples. Once again I know that LEGO's primary concern is to get the units out to the students; hackers and enthusiasts come second.
Krishna Kumar said…
Gordon have you looked at the "Appendix 7-LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdf" in the hardware developer kit, it has the commands to do single shot read etc. Hope you find it useful.
Anonymous said…
Gordon, the US commands were discussed both in lugnet and in nxtasy forums quite a while ago. These two sources are also worth looking at if you need information, beside thenxtstep (which is also great, thanks Jim :) )
Anonymous said…
For Christer:

Tnoy Buser posted an article on Mindstorms NXT Bluetooth on OSX.

I don't know if that's of any help since I don't have any Mac (yet) or even NXT (yet - good news on that for Europe by the way, dates have been moved from oct 15 to sep 21 for non-english versions. Go LEGO!).

And if it doesn't help; I've read that LEGO will indeed provide a universal binary - although I haven't seen any official statement or date estimate on this - hope the MDPers who run this site can ask and get a definitive answer on this ;-)
Gordon B said…
Thanks Krishna. Somehow I missed the document with the US info, but now I see it.

Jim, how do I email you? I can't find email addresses anywhere on this forum.

I am at gordon L buchanan @ gmail . com (no spaces).
Tony Naggs said…
Gordon: Jim has a great big tag "Email:" on the right hand side of the NXT STEP's front page.

One of those hidden in full view things!

Guy: I would have been very dissappointed if Lego had constrained programmers to using some pre-packaged wrappers.

If I had been accepted as an MDP I would have considered I had done a good job by encouraging & supporting Lego to publish such excellent documentation.

I certainly intend to have fun creating my own software interface layers with this info.

Joubarc, Christer: Yes somewhere in the NXT software documentation Lego say there is a Mac Universal binary on the way. I guess the delay is to do with National Instruments development schedule.

With the Bluetooth Development Kit is should be possible for a Mac-Intel programmer to write a native app for remote control or transferring programs.

Ttfn, Tony
Krishna Kumar said…
Bluetooth Dev Kit does let you transfer programs, but I was looking for direct commands to control the motor, and read the sensors. Either I havent digested all the information or it is missing.
Tony Naggs said…
Hi Krishna

There is certainly a lot of information.

Appendix 2 of the Bluetooth Dev Kit, "Direct Commands" describes messages including "SetOutputState", (page 6), "SetInputType" and "GetInputValues", (both on page 7).

Krishna Kumar said…
Thanks Tony for shining the light.
(I am embarrased)

I must have gone thru the document a couple of times but somehow didnt read thru each command. The names SetOuputState and GetInputValues didn't ring a bell.

Thanks once again.
Tony Naggs said…
Sorry, I sounded rude last time.

I meant to be sympathetic and write that: there is a lot of information to read through in order to find the few lines you are looking for.
Anonymous said…
tonny, how can you make an overley layer above Fhantom? The basic SDK LEGO published let you get a handle on "Modules", then you can read/write from their associated memory map. However, LEGO did not publish the structure of the modules memory map, which registers are at which address, possible values for these etc. The SDK is somewhat useless without those, unless you stick to direct commands protocol, but even these can't give you all the functionality of direct memory read/write.
Brian Davis said…
With regard to why the MDP doesn't have a higher-level API ready and waiting, well, keep in mind that what we (the MDP) had was a moving, undocumented target. LEGO didn't just give us all NXT sets months in advance, along with a complete SDK, and then spend those months stockpiling retail sets to embargo until some arbitrary shipping date. We did not have the just-release SDK during the MDP phase, and in fact had to tease a lot of things out by ourselves (as well as had some information provided by LEGO). And due (at least I think in part) to suggestions or comments from the MDP, things changed during the program. What you now have in your hands is the finished product (that will likely be extended by either LEGO or 3rd party folks)... that's not neccessarily what the MDP always had to work with.

Hehe. And if you think you were impatient, believe me, the MDP was ahead of the curve on that point as well. Hehe.

Brian Davis
Anonymous said…
Does anyone have more information on the SetOutputMode command? I know very little about the meaning of the flags and the Lego documentation is not very elobarate. I can get the motors to turn and brake but I have no idea how to do more sophisticated stuff like synchronizing the motors for a 'tank drive'.

I'd also like to get additional information on the SetInputMode command. I know how to configure all sensors but the coolest one - the sonar. Any information would be greatly appreciated since I need it for my library.
Cory Walker said…
I have a project for all of you who were wanting a higher level API or just wanting some information and examples about the fantom library. I've made an interface for fantom called NXT++ and it is intended to be simple and easy to understand. I also need some developers willing to help out. Feel free to browse the code/find out more info/download at these sites:

SourceForge: http://sourceforge.net/projects/nxtpp/
Project Site: http://nxtpp.sourceforge.net/
Manolo said…
Hi everybody! I'm not familiarized with Lego NXT, but I'm was reading a bit of documents. I have an issue: I need to read values from accelerometer. What I'm doing? Well, at first, I send the SetInputMode command to enable port 4, but I don't know which kind of SensorType and SensorMode must set to obtain the values. Then, used GetInputValues to obtain the values... I'm correct? I really got a response from brik, but always I have the same values (if these are the correct values), inclusive shaking the accelerometer.. what's bad?? what's missing??
thanks for your responses!!

Popular Posts