Bluetooth/NXC/Mac

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
fuzzball27
Posts: 103
Joined: 29 Sep 2010, 17:14
Location: US

Bluetooth/NXC/Mac

Post by fuzzball27 »

I've been using NXC on my mac for a while now. I recently found out how to use AppleScript for compiling and downloading my programs. I understand that in the command line version of the nbc compiler you can download programs using a bluetooth connection. Is it possible to use bluetooth in AppleScript? If so how?

I have a second question: the more recent line of apple computers come with a Broadcom Bluetooth chip. When I try to connect my NXT the computer says connected and the NXT says not connected. Apparently this is caused by the Broadcom chip. Does anyone know of a solution? (other than BT dongle) Perhaps Morton knows something about this?

Thanks
fuzzball27 >>-->
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bluetooth/NXC/Mac

Post by afanofosc »

fuzzball27 wrote: I've been using NXC on my mac for a while now. I recently found out how to use AppleScript for compiling and downloading my programs. I understand that in the command line version of the nbc compiler you can download programs using a bluetooth connection. Is it possible to use bluetooth in AppleScript? If so how?
To use a Bluetooth connection with the NBC command line compiler you pass -S=<port name or alias>, replacing <port name or alias> with either a full Bluetooth brick resource string as shown in the sample below or a short alias for that full string that is stored in the nxt.dat file in your home folder, i.e., ~/nxt.dat.

A Bluetooth brick resource string:

BTH::NXT::00:16:53:FF:01:56::5

Your NXT's unique ID would be used instead of mine so replace 00:16:53:FF:01:56 with your NXT''s 12 digit ID with each pair of digits separated by a colon. In nxt.dat you might have a line like this:

BT=BTH::NXT::00:16:53:FF:01:56::5

If you do then you could pass -S=BT on the NBC command line and it would look up the associated full brick resource string from nxt.dat and use that full string with the Fantom drivers to connect to the NXT. Alternatively, you can pass the full brick resource string rather than the alias. You can also pass "usb" if you want to connect via USB.
fuzzball27 wrote: the more recent line of apple computers come with a Broadcom Bluetooth chip. When I try to connect my NXT the computer says connected and the NXT says not connected. Apparently this is caused by the Broadcom chip. Does anyone know of a solution? (other than BT dongle)
Well, for sure you should check that you have the latest Fantom drivers from LEGO installed which are supposed to fix problems with newer Macs that have the Broadcomm chip rather than the Cambridge Silicon Radio chip.

I just recreated a thread from the old nxtasy forums which contains links to the newest drivers for Mac and PC on the LEGO MINDSTORMS support website. Try Bluetooth connectivity problems NXT to Mac OS X in the Mindstorms Hardware forum.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
fuzzball27
Posts: 103
Joined: 29 Sep 2010, 17:14
Location: US

Re: Bluetooth/NXC/Mac

Post by fuzzball27 »

Thank you. I achieved connection with NeXT Tools, but I have not gotten around to downloading with AppleScript through BT yet.
fuzzball27 >>-->
lizard381
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Bluetooth/NXC/Mac

Post by lizard381 »

I think this is related to the topic of this thread. Is it possible to send NXC remote commands to the NXT from the Mac Terminal over bluetooth?

Also, the NeXT Tools Watching the Brick utility doesn't seem to recognize the ultrasonic sensor, I'm not sure if I'm inputting the wrong sensor type (Lowspeed) in the Direct Controller or if this is even a question for this thread.

Kami
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bluetooth/NXC/Mac

Post by afanofosc »

To watch I2C sensor values you have to use the NXT I2C group portion of the Watch window rather than the regular analog sensor watch fields. In theory, you would have properly configured the port as a lowspeed port in the program you have running on the NXT.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest