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>

index | next in thread | previous in thread | raw e-mail

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=1
> Inquiry result #0
>       BD_ADDR: FF2
>       Page Scan Rep. Mode: 0x1
>       Page Scan Period Mode: 00
>       Page Scan Mode: 00
>       Class: 00:1f:00
>       Clock offset: 0x77cd
> Inquiry complete. Status: No error [00]
>
> vv1% l2ping -a FF2
> 0 bytes from FF2 seq_no=0 time=5127.835 ms result=0x4
> 0 bytes from FF2 seq_no=1 time=5128.129 ms result=0x4
> 0 bytes from FF2 seq_no=2 time=5127.133 ms result=0x4
> 0 bytes from FF2 seq_no=3 time=5128.159 ms result=0x4
> ^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 {
>       bdaddr  00:06:66:00:e2:84; # 'FF2' results in syntax error, need to be
> MAC address
>       name    "so51-FF2";
>       key     nokey;
>       pin     "1234";
> }
> and then restarted hcsecd
>
> during l2ping'ing hcsecd throws only this message:
>
> hcsecd[2315]: Received unexpected HCI event, event=0xff

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


home | help

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