To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxt.nxthackingOpen lugnet.robotics.nxt.nxthacking in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / NXT Firmware Hacking / 31
     
   
Subject: 
Re: Enhanced standard NXT firmware
Newsgroups: 
lugnet.robotics.nxt.nxthacking, lugnet.robotics, lugnet.robotics.nxt
Date: 
Wed, 28 Mar 2007 00:47:30 GMT
Viewed: 
17631 times
  

"John Hansen" <afanofosc@comcast.net> wrote in message
news:JF0sGr.M2w@lugnet.com...
Over the past couple days I have used the IAR Embedded Workbench to • implement
some enhancements and bug fixes for the standard NXT firmware.

big snip

Great job John. And thank you especially for CommExecuteFunction. I couldn't
believe that Lego didn't allow a way to make a Bluetooth connection from a
program. With your firmware modifications, I am able to do this now.

I have only tested BTON, BTOFF, CONNECT, and DISCONNECT, but I intend to
test more of the commands that are a part of this syscall. I will also post
my results on here along with the parameters and return values that I am
able to interpret. I encourage others to test John's changes as well to give
him the leverage needed to convince Lego to take the changes.

3 CONNECT(Param1, Param2)

Param1 - index of device to connect to

Param2 - connection (1 - 3)

Result - BTCONNECTFAIL (0x9500, 38144). This can occur if you try to use a
connection that is already in use.



   4 DISCONNECT(Param1)

Param1 - connection (1 - 3)



12 BTON()

Result: 0 - SUCCESS

RetVal: 0 - if already ON

        1 - if was OFF


   13 BTOFF()

Result: 0 - SUCCESS

RetVal: 1 - Always


A suggestion: it would be nice if the Name struct member of
TCommExecuteFunction were implemented so you could connect by name as well
as by index.

David Wallace

   
         
   
Subject: 
Re: Enhanced standard NXT firmware
Newsgroups: 
lugnet.robotics.nxt.nxthacking, lugnet.robotics, lugnet.robotics.nxt
Date: 
Wed, 28 Mar 2007 14:32:15 GMT
Viewed: 
17924 times
  

In lugnet.robotics.nxt.nxthacking, David Wallace wrote:
Great job John. And thank you especially for CommExecuteFunction. I couldn't
believe that Lego didn't allow a way to make a Bluetooth connection from a
program. With your firmware modifications, I am able to do this now.

That's great news, David.  I'm glad that you are having success using the new
CommExecuteFunction system call.  I haven't had a chance to test it at all yet
personally but I was very confident that it would just work seeing as how
exposing it via the syscall mechanism uses these functions exactly the same as
how they are called by the user interface.

I have only tested BTON, BTOFF, CONNECT, and DISCONNECT, but I intend to
test more of the commands that are a part of this syscall. I will also post
my results on here along with the parameters and return values that I am
able to interpret. I encourage others to test John's changes as well to give
him the leverage needed to convince Lego to take the changes.

It would be great if we could pursuade LEGO to incorporate these changes since
they have no negative downside and a huge positive upside.

A suggestion: it would be nice if the Name struct member of
TCommExecuteFunction were implemented so you could connect by name as well
as by index.

I think this would be a nice feature.  I'll probably add it as a new function
id.  Something like CONNECTBYNAME which would use the next available integer
value (which I don't recall off the top of my head).

I have been working on developing a unified code base which works with GCC and
IAR.  I've got all the .txt files fixed so that the source compiles on GCC and
IAR but there are several other issues that I still need to sort out.  Once I
get that completely working I will make my changes available publically.  I'll
talk to Rasmus about putting the code on the sourceforge project he created.

John Hansen

 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR