Thanks Linus, On 23 May 2015 at 07:15, Linus Torvalds <[email protected]> wrote: > On Wed, May 20, 2015 at 4:40 AM, Rick Walsh <[email protected]> wrote: >>> >>> I'd brute force the available ones from 1 to 31 and test. Usually rfcomm >>> have guessed (or assumed as 1?) the right one for me. >>> >> >> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 1 >> Can't connect RFCOMM socket: Connection refused >> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 2 >> Can't connect RFCOMM socket: Connection refused >> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 3 >> Can't connect RFCOMM socket: Connection refused >> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 4 >> Can't connect RFCOMM socket: Connection refused >> [rick@localhost ~]$ sudo rfcomm -i hci1 connect 0 00:13:43:0E:6B:D0 5 >> Connected /dev/rfcomm0 to 00:13:43:0E:6B:D0 on channel 5 >> Press CTRL-C for hangup >> >> The connection works with channel 5. I have no idea what's special >> about channel 5 but I'm not complaining. > > Asking Marcel (the bluetooth person), he suggested: > > "Try something like “sdptool browse <bdaddr>” and see if it shows > you information about the SDP database. Most likely they are using the > Serial Port Profile (SPP). If “browse” does not work, try “records” > which will brute force the database" > > I don't know what the output would be, but if you can try that, it > might be a reasonable addition to some FAQ about "how to connect to BT > devices". Instead of trying all different channels, maybe that > "sdptool browse" (or "sdptool records") will just give the proper > channel to use directly.
sdptool browse didn't work: [rick@localhost ~]$ sdptool -i hci0 browse 00:13:43:0E:6B:D0 Browsing 00:13:43:0E:6B:D0 ... [rick@localhost ~]$ But sdptool records tells us exactly what we need: [rick@localhost ~]$ sdptool -i hci0 records 00:13:43:0E:6B:D0 Service Name: Serial Port Service RecHandle: 0x10000 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 5 I should be able to draft up a faq section for comment this afternoon or this evening Australian time. It would be good if we could see what the output from sdptool record is for other people. It would be good to test this on many different devices and systems as possible. Channel 5 is correct for my Petrel 2 Benjamin, channel 5 works for you too - is that with a Petrel 1 or 2? Anton, can you test with your OSTC sport? I'm guessing you need channel 0. Anyone have a Predator? Other OSTCs? what other DCs out there connect by bluetooth? > > I also suggested the bluez people add auto-channel connection, and it > might happen some day. > That would be nice. And a pretty graphical tool that lists the available channels (i.e. a frontend to sdptool records) on every distro, or at least standard on KDE and Gnome. > Linus Rick _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
