Page 1 of 2

Fantom's communication

Posted: 25 Apr 2011, 20:47
by webstorms
Hello, :D
Is there a way of using the "fantom" drive on a mac to tell the NXT to execute desired tasks as:
  • - Running a desired program
    - Setting a custom brick name
    - Retrieving data? - battery level, brick's name etc.
Is this possible using "Terminal" to tell the "fantom" drive what to perform?

Thanks for your time
Your help is appreciated.

PS: If are not sure but have a other idea or suggestion, feel free to share it in this thread. :)

Re: Fantom's communication

Posted: 25 Apr 2011, 21:29
by aswin0
I don't know if you can use the fanthom driver, let others comment on that. But I do know that it is possible to use direct commands over BT (and USB?). You can write a program that opens a serial port on your computer associated with the NXT. Your program can then write commands to it that are executed on the NXT. You can start programs, control motors, read senors, access the file system and communicate with a program running on the NXT.
Information about direct commands can be found on the lego website.

Btw, the fanthom dtiver can only be used from within a program written in, or linkable to, C.

Note: Corrections made

Re: Fantom's communication

Posted: 25 Apr 2011, 21:45
by afanofosc
On a Mac you can use the Fantom driver to do all the things you mention. All of them can be done using the nexttool command line application for Mac OS X or the NeXTTools for Mac OS X GUI application. These tools are written in Free Pascal - not C - and they link to the Fantom driver library that LEGO provides for Mac OS X. I think any scripting language that supports C library linking could be used to make calls into the Fantom driver library. Using shell scripts wrapped around my nexttool utility is another approach that would work for doing the things you mention.

John Hansen

Re: Fantom's communication

Posted: 26 Apr 2011, 06:09
by webstorms
Thanks a lot. :) I will definitely have a look at that approach.

Re: Fantom's communication

Posted: 26 Apr 2011, 06:21
by webstorms
One more thing: Where can I find the download link to the NeXTtool command line supported on mac?

Re: Fantom's communication

Posted: 26 Apr 2011, 06:28
by h-g-t
Is this what you are looking for?

http://bricxcc.sourceforge.net/utilities.html

Re: Fantom's communication

Posted: 26 Apr 2011, 18:12
by webstorms
I've been on that page, can't seem to find the wanted download link. I'm looking for the NeXTtool command line and not GUI. :roll:

Re: Fantom's communication

Posted: 27 Apr 2011, 13:25
by afanofosc
I have updated the utilities page with proper links for Mac OS X, Linux, and Windows versions of the nexttool command line executable. I have not had a chance to properly test the Mac OS X build so please let me know if you run into any trouble.

I have also added links for the Linux version of the NeXT Tools GUI application and the NeXT Command Center (nxtcc) tool (NeXT Tools plus code editor/compiler integration) for Linux and Mac OS X. The Mac OS X link is currently broken but I will upload the archive for that OS later today or tomorrow (if all goes well).

John Hansen

Re: Fantom's communication

Posted: 27 Apr 2011, 13:59
by webstorms
Thank you so much :) I'll play around with it and give you feedback as soon as possible. Can't wait to Test nxtcc for mac.

Re: Fantom's communication

Posted: 27 Apr 2011, 14:44
by webstorms
afanofosc wrote:I have updated the utilities page with proper links for Mac OS X, Linux, and Windows versions of the nexttool command line executable.
John Hansen
Ok, so here is the first obstacle which I can't seem to overcome - I can't find the download link to the Mac OS X command line executable. Am I missing something? :|

Here's a screen shot taken at 4:22 SAST time:

View here: https://public.me.com/webstorms/