Bluetooth audio (once again)

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Tue Oct 7 16:13:16 UTC 2008


On 10/4/08, Vladimir Grebenschikov <vova at fbsd.ru> wrote:
> В Fri, 03/10/2008 в 09:45 -0700, Maksim Yevmenkin пишет:
>
>
>  > >  > sco sockets support was also added, however 1) sco sockets hook is
>  > >  > *not* connected by default and 2) there are some known problems with
>  > >  > the code. more specifically problems are related to "broken" bluetooth
>  > >  > devices and the way they report sco buffer size/packet count. i happen
>  > >  > to have few of those devices. we need to have a way to handle those
>  > >  > kind of devices nicely.
>  > >
>  > > I have Platronics P590 headset with advanced audio and Nokia headset. I
>  > >  may to check them against our bluetooth stack.
>
>
> I bit strange that I can inquiry and l2ping device, but can't list
>  services:
>
>  # l2ping -a p590
>  0 bytes from p590 seq_no=0 time=1794.348 ms result=0x6
>  0 bytes from p590 seq_no=1 time=2023.401 ms result=0x6
>  0 bytes from p590 seq_no=2 time=1761.475 ms result=0x6
>  ^C
>  # l2control -a p590 Read_Channel_List
>  l2control: Could not bind socket, bdaddr=00:19:7f:1b:de:77: Network is
>  down

please read man page for l2control(8) utility. more specifically,

"
    The l2control utility connects to the *local* device with the specified
     BD_ADDR and attempts to send the specified command.
"

l2control(8) will dump information about open channels as seen by
*local* device. NOT remote. therefor is does not make much sense to
put *remote* bd_addr as parameter. it will never work.

>  Should I do "pairing" somehow ?

generally speaking, yes. usually pairing happens when host (i.e. pc)
is trying to connect to the headset's rfcomm channel. in most cases,
the headset will request authentication. however, if it does not, use
hccontrol(8) write_authentication_enable command on host's device to
force authentication (i.e. paring)

>  > ok.be warned, you will need to write some code for that. its
>  > relatively simple. basically open an rfcomm socket and then open a sco
>  > socket. i can provide examples if you want me to.
>
> Please, send me an example if you have.

attached

thanks,
max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scotest.c
Type: application/octet-stream
Size: 4734 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bluetooth/attachments/20081007/14874022/scotest.obj


More information about the freebsd-bluetooth mailing list