Re: Using unsecure/unauthenticated RFCOMM
Re: Using unsecure/unauthenticated RFCOMM
- Subject: Re: Using unsecure/unauthenticated RFCOMM
- From: Matthias Ringwald <email@hidden>
- Date: Mon, 27 Feb 2012 14:11:20 +0100
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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden