I'm trying to write a very simple app that will check if my cars handsfree radio is in range and if it is connect to it. I can see the handsfree radio using DiscoveryAgent and can find the handsfree service. I can also get the connection URL which is "btspp://5453ED430AA1:1;authenticate=false;encrypt=false;master=false". I have tried to connect using "StreamConnection con =(StreamConnection)Connector.open(sURL);" in a seperate thread, which does not work. I have also tried using SocketConnection which also doesn't work. When I try "Connector.open(sURL)", the handsfree radio phone Icon flashes like it is trying to connect, but the connection doesn't hold. I thought this was going to be fair simple to achieve, but even after many hour's on google, I still can't work it out. Any advice on how to complete the connection using the connection string would be very greatfully received.
Thanks for the quick reply. I started out thinking this was a serial connection, however when I call " BluetoothSerialPortInfo info = BluetoothSerialPort.getSerialPortInfo();" nothing is returned. The "info.length = 0", even though my handsfree radio is paired to my blackberry. Is there another way to get the serial connection info I need, or is there another way to connection. Basically I want to do the same thing that happen when I go to my bluetooth options, select my handsfree device, and select connect.