Bluetooth Proximity Monitor on FreeBSD ?

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Wed May 16 19:26:55 UTC 2007


On 5/16/07, Vladimir Grebenschikov <vova at sw.ru> wrote:
> В ср, 16/05/2007 в 09:45 -0700, Maksim Yevmenkin пишет:
>
> > > Connection expires somehow in ~5 secs after creation.
> > > Probably there is some way to do keep-alive connection ?
> > >
> > > My device is Nokia E60.
> >
> > run hcidump and see who initiated disconnect. my guess, its your nokia
> > phone kills baseband after some period of inactivity. if that is the
> > case then you have to use l2ping or something else. the idea is to
> > keep sending stuff over baseband connection to keep it alive.
>
> Hm, l2ping does not helps (output just after connecting):
> # l2ping -a e60
> 0 bytes from e60 seq_no=0 time=65.077 ms result=0
> 0 bytes from e60 seq_no=1 time=52.096 ms result=0
> 0 bytes from e60 seq_no=2 time=54.053 ms result=0
> 0 bytes from e60 seq_no=3 time=42.082 ms result=0
> 0 bytes from e60 seq_no=4 time=42.151 ms result=0
> 0 bytes from e60 seq_no=5 time=5129.224 ms result=0x4  <<< connection
> lost here
> ...

well, that is just weird. while zero bytes response is normal (for
nokia's), killing baseband connection while l2ping (in other words
l2cap control channel) is active, is just does not make any sense. can
you provide hcidump with l2ping active? i'd like to see who is killing
baseband.

btw, but if you let l2ping to continue to run it should re-establish
baseband connection again.

> hcidump (without l2ping):
>
> # hcidump -xt
> HCIDump - HCI packet analyzer ver 1.5
> device: any snap_len: 65535 filter: 0xffffffff
> 1179336718.824335 < HCI Command: Create Connection(0x01|0x0005) plen 13
>   36 E3 48 D1 12 00 18 4C 00 00 00 00 01
> 1179336718.827102 > HCI Event: Command Status(0x0f) plen 4
>   00 01 05 04
> 1179336719.858619 > HCI Event: Connect Complete(0x03) plen 11
>   00 0B 00 36 E3 48 D1 12 00 01 00
> 1179336719.858674 < HCI Command: Write Link Policy Settings(0x02|0x000d)
> plen 4
>   0B 00 0F 00
> 1179336719.861166 > HCI Event: Command Complete(0x0e) plen 6
>   01 0D 08 00 0B 00
> 1179336719.881159 > HCI Event: Max Slots Change(0x1b) plen 3
>   0B 00 05
> 1179336729.090790 > HCI Event: Disconn Complete(0x05) plen 4
>   00 0B 00 13
> #

yep, it seems like nokia kills baseband :(

thanks,
max


More information about the freebsd-bluetooth mailing list