Using unsecure/unauthenticated RFCOMM
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/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Alexei Czeskis