Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 4
Registered: ‎11-11-2008
My Device: Not Specified

Calling BluetoothSerialPort.write() causes an exception to be thrown.

Using a 8120 running OS version 4.5.0.37, I paired the blackberry with a bluetooth device. I then opened a BluetoothSerialPort connection with it using the constructor. Then, I tried sending a null terminated string, such as {'T', 'e', 's', 't', '\0'}. This causes an IOException to be thrown. I then replaced the \0 terminator with a newline ('\n') and the message is sent without raising an exception. Any idea what's happening here?
Highlighted
BlackBerry Development Advisor
Posts: 15,211
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Calling BluetoothSerialPort.write() causes an exception to be thrown.

What line of code is throwing the exception?  Can you provide a code snippet of your implementation?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker