Re: Using unsecure/unauthenticated RFCOMM
Hi I would assume that at least one of your devices insists on an authorized RFCOMM connection, which is at least true for Windows MS stack. It makes sense to allow unencrypted baseband connections - by this, you can do SDP queries and learn about the remote device before setting up an encrypted connection for the actual data. Best Matthias On Feb 23, 2012, at 7:09 PM, Alexei Czeskis wrote:
Hello!
Does anyone have any experience using unsecure/unauthenticated RFCOMM on OS X? I'm trying to do unsecure RFCOMM between two unpaired bluetooth devices (one is a MacBook running 10.7.3, the other is an Android phone running ICS). I seem to be able to open an unauthenticated baseband connection, but not an unauthenticated RFCOMM channel over an unauthenticated basebandconnection.
What's odd is that I am able to open an unauthenticated baseband connection successfully, but when I try to open an RFCOMM channel over that connection, the devices try to pair. Here is roughly what I'm doing:
/* * Before this part, I: * 1. Create device from a BT address string * 2. Perform an SDP query * 3. Extract the SDP record by UUID, make sure the service name matches my service * (whine that getServiceRecordForUUID returns one record instead of a list) * 4. Get the channel ID from SDP record */
// Try connecting to device if( [device openConnection:nil withPageTimeout:100000 authenticationRequired:false] != kIOReturnSuccess ) { NSLog(@"Couldn't open unauthenticated baseband connection to client device"); exit(3); } NSLog(@"\tOpened unauthenticated baseband connection successfully");
// Try opening an RFCOMM channel IOBluetoothRFCOMMChannel *channel = nil; IOReturn status; if ( [device openRFCOMMChannelSync:&channel withChannelID:channelID delegate:self] != kIOReturnSuccess) { NSLog(@"Couldn't open RFCOMM channel"); [device closeConnection]; exit(8); } NSLog(@"\tOpened RFCOMM channel");
The above code fails at the openRFCOMMChannelSync() call.
I'm fairly certain that the other endpoint is doing what it's supposed to be doing -- I've been able to created unauthenticated RFCOMM channels to it using unbuntu without pairing the two devices.
Can anyone point me in the right direction? Thanks!
-Alexei
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/mringwal%40inf.ethz.ch
This email sent to mringwal@inf.ethz.ch
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matthias Ringwald