2008-07-02 19:22:42

by Manuel Naranjo

[permalink] [raw]
Subject: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


Attachments:
adapter.patch (449.00 B)
(No filename) (347.00 B)
(No filename) (164.00 B)
Download all attachments

2008-07-11 10:07:57

by Manuel Naranjo

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

Hi Marcel,
> with the normal inquiry it is this way. You have to cancel that before
> you can do anything else. Nothing you can do about it. The periodic
> inquiry is special since it is meant to cancel itself on connection
> attempts and then automatically resume.
>
Periodic scanning is bluetooth chip level right? Not something internal
to bluez or I'm totally wrong?.

Anyway it makes sense to stop inquiry while doing connection attempts,
not while broadcasting data, because the amount of power used for
transmission and the amount of data required for it, it's just too much
too keep scanning.

> I applied that patch and it will be in bluez-utils-3.36 release.
>
Wow thanks, will this finally became the latest release of the 3.X
branch? Who knows... hehe

Cheers,
Manuel Naranjo
Wireless Cables Inc.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Subject: Re: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

Hi Marcel,

> with the normal inquiry it is this way. You have to cancel that before
> you can do anything else. Nothing you can do about it. The periodic
> inquiry is special since it is meant to cancel itself on connection
> attempts and then automatically resume.

Ok, that's fair enough, at least I know what the score is now. Periodic
sounds like my best solution then.

> I applied that patch and it will be in bluez-utils-3.36 release.

Excellent stuff.

Cheers Marcel,

Heston


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-07-11 08:31:55

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

Hi Heston,

> >> I've sent this patch before, but for some reason I didn't got either a
> >> positive or even negative response.
> >>
> >> Problem is like this, when we're doing a periodic scan we should be able
> >> to do bonding, but according to the code we can't, so then something is
> >> wrong, either we can't do periodic scanning, or we need to fix a bug.
> >
> > so in general you should be able to create an ACL link when even in
> > inquiry phase. So in theory it should stop periodic inquiry and then
> > create the ACL link and then continue. We might have hit some chip
> > limitations here and this is why it was there. I removed it since it low
> > risk. No so many applications use periodic inquiry :)
>
> I've experienced this very same behaviour in the past and was always
> concerned that it was me using the mainloop inappropriately, I'm glad to see
> other people find the same issue.
>
> When using period inquiry, it would seem that if I perform any other form of
> operation, such as an SDP enquiry, or creating an RFCOMM connection it halts
> the current 'period' of scanning and it doesn't start again until the start
> of the next 'period'.
>
> This does cause a fair amount of frustration as it means if you're sdping
> nearby remote device as you find them that you're only ever really dealing
> with 1 remote device per scan period which is very inefficient.
>
> I've noticed the exact same behaviour with a standard inquiry scan too, as
> soon as attempting to perform one of these other operations whilst scanning
> the scan stops and the 'discoverycomplete()' signal is emmited.

with the normal inquiry it is this way. You have to cancel that before
you can do anything else. Nothing you can do about it. The periodic
inquiry is special since it is meant to cancel itself on connection
attempts and then automatically resume.

> Manuel, I'm interested in the patch and will look at applying it to my local
> working copy to see how it behaves for me.
>
> Marcel, Are you saying that this issue cannot be resolved by a patch and is
> a chip limitation? Is there likely to be any fix for this?
>
> Marcel, for those of us that need a periodic enquiry, would you advocate the
> use of our own internal standard inquiry loops that restart a scan when
> discoverycomplete() signal is emitted? Or is this likely to crash the bluez
> deamon by putting too much strain on it?

I applied that patch and it will be in bluez-utils-3.36 release.

Regards

Marcel



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Subject: Re: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

Hi Manuel, good to see you mate.

>> I've sent this patch before, but for some reason I didn't got either a
>> positive or even negative response.
>>
>> Problem is like this, when we're doing a periodic scan we should be able
>> to do bonding, but according to the code we can't, so then something is
>> wrong, either we can't do periodic scanning, or we need to fix a bug.
>
> so in general you should be able to create an ACL link when even in
> inquiry phase. So in theory it should stop periodic inquiry and then
> create the ACL link and then continue. We might have hit some chip
> limitations here and this is why it was there. I removed it since it low
> risk. No so many applications use periodic inquiry :)

I've experienced this very same behaviour in the past and was always
concerned that it was me using the mainloop inappropriately, I'm glad to see
other people find the same issue.

When using period inquiry, it would seem that if I perform any other form of
operation, such as an SDP enquiry, or creating an RFCOMM connection it halts
the current 'period' of scanning and it doesn't start again until the start
of the next 'period'.

This does cause a fair amount of frustration as it means if you're sdping
nearby remote device as you find them that you're only ever really dealing
with 1 remote device per scan period which is very inefficient.

I've noticed the exact same behaviour with a standard inquiry scan too, as
soon as attempting to perform one of these other operations whilst scanning
the scan stops and the 'discoverycomplete()' signal is emmited.

Manuel, I'm interested in the patch and will look at applying it to my local
working copy to see how it behaves for me.

Marcel, Are you saying that this issue cannot be resolved by a patch and is
a chip limitation? Is there likely to be any fix for this?

Marcel, for those of us that need a periodic enquiry, would you advocate the
use of our own internal standard inquiry loops that restart a scan when
discoverycomplete() signal is emitted? Or is this likely to crash the bluez
deamon by putting too much strain on it?

Heston


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-07-11 06:20:12

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] CreateBonding while periodic scanning

Hi Manuel,

> I've sent this patch before, but for some reason I didn't got either a
> positive or even negative response.
>
> Problem is like this, when we're doing a periodic scan we should be able
> to do bonding, but according to the code we can't, so then something is
> wrong, either we can't do periodic scanning, or we need to fix a bug.

so in general you should be able to create an ACL link when even in
inquiry phase. So in theory it should stop periodic inquiry and then
create the ACL link and then continue. We might have hit some chip
limitations here and this is why it was there. I removed it since it low
risk. No so many applications use periodic inquiry :)

Regards

Marcel



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel