Bluetooth Proximity Monitor on FreeBSD ?

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Wed May 16 22:39:00 UTC 2007


On 5/16/07, Vladimir Grebenschikov <vova at sw.ru> wrote:
> В ср, 16/05/2007 в 12:26 -0700, Maksim Yevmenkin пишет:
> > 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.
>
> # hcidump -xt

[...]

yep, seems like nokia killed connection again. but your dump looks
kinda strange, i.e. i can see multiple 'connection create' commands to
the same device. are you using 'hccontrol create connection' and
l2ping at the same time? is there any other process tries to talk to
your nokia?

> > btw, but if you let l2ping to continue to run it should re-establish
> > baseband connection again.
>
> Yes, every ~5s it timeouts and then it re-establish connection and then
> gets several replays with usual delay
>
> # /usr/sbin/hccontrol -n ubt0hci read_connection_list
> Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
> e60                 3869  ACL    0 MAST    NONE       0     0
> W4_CONN_COMPLETE
>
> ...
> 0 bytes from e60 seq_no=47 time=1162.826 ms result=0
> 0 bytes from e60 seq_no=48 time=68.149 ms result=0
> 0 bytes from e60 seq_no=49 time=45.690 ms result=0
> 0 bytes from e60 seq_no=50 time=50.061 ms result=0
> 0 bytes from e60 seq_no=51 time=65.745 ms result=0
> 0 bytes from e60 seq_no=52 time=1142.827 ms result=0
> 0 bytes from e60 seq_no=53 time=62.854 ms result=0
> 0 bytes from e60 seq_no=54 time=42.855 ms result=0
> 0 bytes from e60 seq_no=55 time=58.678 ms result=0
> 0 bytes from e60 seq_no=56 time=51.960 ms result=0
> 0 bytes from e60 seq_no=57 time=1183.973 ms result=0
> 0 bytes from e60 seq_no=58 time=57.024 ms result=0
> 0 bytes from e60 seq_no=59 time=55.461 ms result=0
> 0 bytes from e60 seq_no=60 time=58.316 ms result=0
> 0 bytes from e60 seq_no=61 time=42.456 ms result=0
> 0 bytes from e60 seq_no=62 time=5129.594 ms result=0x4
> 0 bytes from e60 seq_no=63 time=1497.149 ms result=0
> ...
>
> > yep, it seems like nokia kills baseband :(
>
> Any hint how encourage it to keep connection ?

i do not think there is a way do to it other than using bluetooth
services on the phone, for example keep rfcomm link open (i.e. connect
to serial port service).

thanks,
max


More information about the freebsd-bluetooth mailing list