I'm attempting to connect to a Bluetooth port on my MacBook Pro (OS X v10.8 "Mountain Lion") from an android app (Device Version 2.2 "Froyo").
Starting with the BluetoothChat example, I removed the server-side code (only need client), and updated for API Level 8 compatibility. I can pair fine, but then I receive an IOException: Connection Refused
error on bluetoothSocket.connect()
.
I am using the standard Serial Port Profile UUID 00001101-0000-1000-8000-00805f9b34fb
, and I verified that it was supported using reflection, as show in
The Missing Manual: Android Bluetooth RFCOMM
After doing some research here on Stack Overflow and on the Google Code Forums I tried using reflection to get a socket, which gives me the same result.
I've tried playing around with the Bluetooth port settings in OS X, but I can't find any documentation on them, and I have no idea what options I should set.
I have checked "Discoverable" in the main preferences panel:
I found the Serial Ports Menu, which is hidden by default. First you have to click options->Show More Info. Then Click options again, and you should see "Edit Serial Port...". I have no idea what to set here:
There are more serial port settings in the Advanced pane:
Anyone have any experience with this, or know what these options mean?
Edit
I'm running Serial Communication in OSX Terminal on all ports returned by ls /dev/tty.*
. As shown in the link, I basically use screen /dev/tty.<port name> <datarate>
I've been using 9600 for the datarate, although I don't know if it matters.