<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 23 May 2015 at 06:33, Benjamin <span dir="ltr"><<a href="mailto:nystire@gmail.com" target="_blank">nystire@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">For me it's a Petrel 2. I'll try running 'sdptool record' when I get back to the area containing my dive computer - currently out on a 2 day camping hike. I was told it would be fun... :'(</p><div class=""><div class="h5">
<br><div class="gmail_quote">On Sat, 23 May 2015 01:45 Rick Walsh <<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Linus,<br>
<br>
On 23 May 2015 at 07:15, Linus Torvalds <<a href="mailto:torvalds@linux-foundation.org" target="_blank">torvalds@linux-foundation.org</a>> wrote:<br>
> On Wed, May 20, 2015 at 4:40 AM, Rick Walsh <<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>> wrote:<br>
>>><br>
>>> I'd brute force the available ones from 1 to 31 and test. Usually rfcomm<br>
>>> have guessed (or assumed as 1?) the right one for me.<br>
>>><br>
>><br>
>> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 1<br>
>> Can't connect RFCOMM socket: Connection refused<br>
>> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 2<br>
>> Can't connect RFCOMM socket: Connection refused<br>
>> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 3<br>
>> Can't connect RFCOMM socket: Connection refused<br>
>> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 4<br>
>> Can't connect RFCOMM socket: Connection refused<br>
>> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 5<br>
>> Connected /dev/rfcomm0 to 00:13:43:0E:6B:D0 on channel 5<br>
>> Press CTRL-C for hangup<br>
>><br>
>> The connection works with channel 5.  I have no idea what's special<br>
>> about channel 5 but I'm not complaining.<br>
><br>
> Asking Marcel (the bluetooth person), he suggested:<br>
><br>
>    "Try something like “sdptool browse <bdaddr>” and see if it shows<br>
> you information about the SDP database. Most likely they are using the<br>
> Serial Port Profile (SPP). If “browse” does not work, try “records”<br>
> which will brute force the database"<br>
><br>
> I don't know what the output would be, but if you can try that, it<br>
> might be a reasonable addition to some FAQ about "how to connect to BT<br>
> devices". Instead of trying all different channels, maybe that<br>
> "sdptool browse" (or "sdptool records") will just give the proper<br>
> channel to use directly.<br>
<br>
sdptool browse didn't work:<br>
[rick@localhost ~]$ sdptool -i hci0 browse 00:13:43:0E:6B:D0<br>
Browsing 00:13:43:0E:6B:D0 ...<br>
[rick@localhost ~]$<br>
<br>
But sdptool records tells us exactly what we need:<br>
[rick@localhost ~]$ sdptool -i hci0 records 00:13:43:0E:6B:D0<br>
Service Name: Serial Port<br>
Service RecHandle: 0x10000<br>
Service Class ID List:<br>
 "Serial Port" (0x1101)<br>
Protocol Descriptor List:<br>
 "L2CAP" (0x0100)<br>
 "RFCOMM" (0x0003)<br>
   Channel: 5<br>
<br>
I should be able to draft up a faq section for comment  this afternoon<br>
or this evening Australian time.<br>
<br>
It would be good if we could see what the output from sdptool record<br>
is for other people.  It would be good to test this on many different<br>
devices and systems as possible.<br>
<br>
Channel 5 is correct for my Petrel 2<br>
<br>
Benjamin, channel 5 works for you too - is that with a Petrel 1 or 2?<br>
<br>
Anton, can you test with your OSTC sport?  I'm guessing you need channel 0.<br>
<br>
Anyone have a Predator? Other OSTCs? what other DCs out there connect<br>
by bluetooth?<br>
<br>
><br>
> I also suggested the bluez people add auto-channel connection, and it<br>
> might happen some day.<br>
><br>
<br>
That would be nice.  And a pretty graphical tool that lists the<br>
available channels (i.e. a frontend to sdptool records) on every<br>
distro, or at least standard on KDE and Gnome.<br>
<br>
>                  Linus<br>
<br>
<br>
Rick<br>
</blockquote></div></div></div></blockquote></div><br><div>On my Petrel 2 I get the following:<br><br>$ sdptool browse 00:13:43:0C:56:29<br>Browsing 00:13:43:0C:56:29 ...<br></div>$ sdptool records 00:13:43:0C:56:29<br>Service Name: Serial Port<br>Service RecHandle: 0x10000<br>Service Class ID List:<br>  "Serial Port" (0x1101)<br>Protocol Descriptor List:<br>  "L2CAP" (0x0100)<br>  "RFCOMM" (0x0003)<br>    Channel: 5<br><br>Benjamin<br></div></div>