Turning Bluetooth on, on the NXT through an NXC program

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Turning Bluetooth on, on the NXT through an NXC program

Post by ricardocrl »

Hey everyone,

I am wondering if it is possible, using NXC, to turn on the bluetooth programmatically, instead of manually through the FW menu. Any ideas?

I see I can check the state, using BluetoothState(), but not setting the state.

Why? Well, sometimes for "no reason", when I start the NXT, the Bluetooth is off. I actually wonder why does it turn off by itself. It is very rare, but it happens.

Thank you!
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: Turning Bluetooth on, on the NXT through an NXC program

Post by pepijndevos »

I looked through the docs, as I'm sure I did this in pbLua, but I can't find it fro NBC. I hope someone else does.
-- Pepijn
http://studl.es Mindstorms Building Instructions
tabbycatrobots
Posts: 100
Joined: 27 Dec 2010, 19:10

Re: Turning Bluetooth on, on the NXT through an NXC program

Post by tabbycatrobots »

Will the command SysCommBTOnOff do what you need?
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Re: Turning Bluetooth on, on the NXT through an NXC program

Post by ricardocrl »

Awesome!! That's it! Bad search I did.

Thank you very much! :-)

Cheers!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest