From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] [PATCH] Variable arguments to Inquiry and PeriodicInquiry D-BUS methods
Date: Tue, 08 Nov 2005 14:54:30 +0100 [thread overview]
Message-ID: <1131458070.5824.181.camel@blade> (raw)
In-Reply-To: <20051108134311.GA7150@localhost.localdomain>
Hi Johan,
> Here's a patch which allows Inquiry and PeriodicInquiry to be called
> with two possible sets of parameters. We can't unfortunately get (at
> least very easily) the same flexibility that you can get with e.g.
> command line options because there are no "labels" for the D-BUS
> parameters. So, the solution I went for was that either you provide only
> the essential parameters (the ones that don't have a sane default
> value), or then you provide all parameters.
>
> The possible ways of calling the methods after applying this patch are:
>
> Inquiry()
> Inquiry(byte: length, byte: num_rsp, uint32: lap)
> PeriodicInquiry(byte: length, uint16: min_period, uint16: max_period)
> PeriodicInquiry(byte: length, uint16: min_period, uint16: max_period,
> byte: num_rsp, uint32: lap)
please swap the lap and num_rsp (call it num_responses btw.) and make
the num_responses also optional. It is more usual that you will specify
a different lap instead of num_responses. The reason for this is,
because the num_responses value is not really useful anymore. All chips
in inquiry mode 1 or 2 tend to send results multiple times and this
makes the num_responses value useless. It is only good for devices where
the memory storage for inquiry results is limited. Maybe we shouldn't
use it at all.
Is it not better to call it access_code instead of lap?
The length parameter should also be in seconds and not the slot timing
we get from the baseband.
> Then, I'd like to start some discussion about the interface for setting
> default values for certain parameters. I'd suggest to use a similar
> interface that we currently have for the properties where there are only
> two methods ("Set" and "Get") and strings are used to identify the
> parameter which should be operated on. I think it would be good to have
> each module under the device path (e.g. "Controller", "PAN", etc.)
> implement this interface. You would then do something like:
>
> Object: /org/bluez/Device/hci0/Controller
> Interface: org.bluez.Defaults
> Method: Set("LAP", 0x9e8b00)
>
> Object: /org/bluez/Device/hci0/Controller
> Interface: org.bluez.Defaults
> Method: Set("role", "slave")
>
> Object: /org/bluez/Device/hci0/RFCOMM
> Interface: org.bluez.Defaults
> Method: Set("authenticate", True)
>
> Does this sound like a sensible way to do it?
I am not unhappy with it at the moment.
Regards
Marcel
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-11-08 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 13:43 [Bluez-devel] [PATCH] Variable arguments to Inquiry and PeriodicInquiry D-BUS methods Johan Hedberg
2005-11-08 13:54 ` Marcel Holtmann [this message]
2005-11-08 14:30 ` Johan Hedberg
2005-11-08 14:45 ` Claudio Takahasi
2005-11-08 15:03 ` Marcel Holtmann
2005-11-08 16:17 ` Claudio Takahasi
2005-11-08 17:31 ` Johan Hedberg
2005-11-08 14:59 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1131458070.5824.181.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.