Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 2010 08:58:04 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Marek Salwerowicz <marek_sal@wp.pl>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Can't l2ping to BT device
Message-ID:  <AANLkTikyniPid9LbXgBdVo0m%2BPRkZsihN67nCYrrpAMH@mail.gmail.com>
In-Reply-To: <A9992AFBE4A04EF0BB4FBD8BC52C7443@marekdesktop>
References:  <A9992AFBE4A04EF0BB4FBD8BC52C7443@marekdesktop>

next in thread | previous in thread | raw e-mail | index | archive | help
Marek,

> 'hccontrol inquiry' discovers the device I want to connect to, but l2ping
> can't ping to it:
>
> vv1% hccontrol inquiry
> Inquiry result, num_responses=3D1
> Inquiry result #0
> =A0 =A0 =A0 BD_ADDR: FF2
> =A0 =A0 =A0 Page Scan Rep. Mode: 0x1
> =A0 =A0 =A0 Page Scan Period Mode: 00
> =A0 =A0 =A0 Page Scan Mode: 00
> =A0 =A0 =A0 Class: 00:1f:00
> =A0 =A0 =A0 Clock offset: 0x77cd
> Inquiry complete. Status: No error [00]
>
> vv1% l2ping -a FF2
> 0 bytes from FF2 seq_no=3D0 time=3D5127.835 ms result=3D0x4
> 0 bytes from FF2 seq_no=3D1 time=3D5128.129 ms result=3D0x4
> 0 bytes from FF2 seq_no=3D2 time=3D5127.133 ms result=3D0x4
> 0 bytes from FF2 seq_no=3D3 time=3D5128.159 ms result=3D0x4
> ^C
> vv1%

0x4 is page timeout, i.e. device does not answer page call. basically
baseband connection timeout.

> it's a new pair, so I typed config in hcsecd.conf:
>
> device {
> =A0 =A0 =A0 bdaddr =A000:06:66:00:e2:84; # 'FF2' results in syntax error,=
 need to be
> MAC address
> =A0 =A0 =A0 name =A0 =A0"so51-FF2";
> =A0 =A0 =A0 key =A0 =A0 nokey;
> =A0 =A0 =A0 pin =A0 =A0 "1234";
> }
> and then restarted hcsecd
>
> during l2ping'ing hcsecd throws only this message:
>
> hcsecd[2315]: Received unexpected HCI event, event=3D0xff

usually l2ping does not require any pairing. it works at l2cap control
channel level, i.e. lower than any bluetooth profile. in any case,
0xff is a vendor specific event. hcisecd(8) can not do anything about
it, so it just ignores it.

> # hcidump :
>
> vv1% # hcidump
> HCIDump - HCI packet analyzer ver 1.5
> device: any snap_len: 65535 filter: 0xffffffffffffffff
>>
>> HCI Event: Vendor(0xff) plen 2
>> HCI Event: Connect Complete(0x03) plen 11
> < HCI Command: Create Connection(0x01|0x0005) plen 13
>> HCI Event: Vendor(0xff) plen 2
>> HCI Event: Command Status(0x0f) plen 4
>> HCI Event: Vendor(0xff) plen 2
>> HCI Event: Connect Complete(0x03) plen 11
> < HCI Command: Create Connection(0x01|0x0005) plen 13
>> HCI Event: Vendor(0xff) plen 2
>> HCI Event: Command Status(0x0f) plen 4
>> HCI Event: Vendor(0xff) plen 2
>> HCI Event: Connect Complete(0x03) plen 11

interesting... there is a vendor event with every transaction with the
device. next time please run hcidump -X or obtain a binary dump with
hcidump -w (to get more information). timestamps would also be useful.

what kind of devices you have? both local and remote

> l2ping from other machine (stays next to vv1) to FF2 works great - the
> config is the same

so, are you saying that there is an already established connection
between other machine and ff2? if so, then it explains page timeout.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikyniPid9LbXgBdVo0m%2BPRkZsihN67nCYrrpAMH>