Yes, you can specify ports, but I think you may have to use Reflection on 
Android.


This will give you a connection to port 17:


*BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();*
*
*
*BluetoothDevice device = adapter.getRemoteDevice(address);*
*
*
*M**ethod m = device.getClass().getMethod("createInsecureRfcommSocket", new 
Class[] { int.class }); *
*
*
*socket = (BluetoothSocket) m.invoke(device,Integer.valueOf(17));*
*
*
*socket.connect();*

On a Windows server, you would change BT_PORT_ANY to a number between 1 and 
30.  

There is more info here:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa362899(v=vs.85).aspx

"The valid range for requesting a specific RFCOMM port is 1 through 30."




On Thursday, February 14, 2013 3:56:41 AM UTC-6, tom_mai78101 wrote:
>
> The UUID just says what port the Bluetooth Server is on.  I could have a 
>> server running on Bluetooth port 1. 
>>
>
> Does this imply there's a way to specify different Bluetooth ports, if the 
> port(s) exists? I have never heard of Bluetooth using ports like TCP. If 
> you're just making an example, then please disregard this and above.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to