We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › Bluetooth Serial Init() Error 100% of the time.
Page Index Toggle Pages: 1
Bluetooth Serial Init() Error 100% of the time. (Read 1392 times)
Bluetooth Serial Init() Error 100% of the time.
Mar 17th, 2010, 5:59pm
 
Howdy,

Running XP32 bit and have a problem that fails 100% using the Serial Library.

I have a Bluetooth Serial adapter plugged into a servo controller. I can connect to it using hyperterminal fine and control as needed.

If I try to connect to the same adapter through the processing serial library I constantly get a Error inside Init(). I can see that processing is trying to connect because the rx leds flash on the servo controller. It just fails and the sketch runs, with a long stream of errors on every attempted serial write.

If I use a cable the processing code works fine, so that is not to blame.

Is the serial library just buggy, or is there something I can do to fix this.

I have tried reboots to make sure the port is closed. Also downloaded the latest processing build 1.1

Cheers.
Re: Bluetooth Serial Init() Error 100% of the time.
Reply #1 - Apr 13th, 2010, 7:21pm
 
Hello,

From WinXP, I have Processing connecting to my BlueSMiRF that I have connected to a Pololu Serial Servo controller.  

Here are the salient statements:

import processing.serial.*;
Serial serialServoPort;

println(Serial.list());  // will show all Com ports

serialServoPort = new Serial(this, Serial.list()[3], 9600);

I had a problem until I set the BlueSMiRF baud rate to 9600.
Also, you must make sure to use the increment - [3] in my case, that matches your bluetooth port displayed with the println(Serial.list());

I cannot get connected from Ubuntu however because the Serial.list() does not contain the RFCOMM port, only TTY com ports.  If anyone knows how to get around this I would be grateful.

Thanks
Page Index Toggle Pages: 1