I'm running some tests on a bluetooth adapter for printers.
It works fine when I print from the PC but I'd like to print with my BlackBerry...
So I created a small application which :
-Retrieves the paired devices
-Retrieves the services available for the device
-Connects to the selected service
I am able to retrieve the devices and the services.
There is only one service available for the adapter :
Bluetooth Serial Port
Now I want to send data to the printer...
String URL = _service.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);
connection= (StreamConnection) Connector.open(URL);
byte buffer = new byte;
String msg = "hello there";
InputStream din = connection.openInputStream();
OutputStream dout = connection.openOutputStream();
I am able to get the URL but nothing happens when I call Connector.open(URL)
It doesn't crash or anything...
it just freezes there.
(PS : I know that the printer won't understand "Hello There" ;) It's just a test)