Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Serial library - catch port busy

$
0
0

Hi,

I work with a bluetooth serial device and I regularly get the message: Error opening serial port... : Port Busy.

When I retry a few times I can get a connection. Is there a way that I can catch the error in my program itself and retry the connection.

So when this happens I could run something like:

port.clear();
port.stop();
port = new Serial(this, Serial.list()[portNumber], 9600);
port.clear();

Viewing all articles
Browse latest Browse all 2896

Trending Articles