Message ID | 20200319185000.BlueZ.v4.1.Idb4f0444e40064a861ee73b098264abd30114aaa@changeid (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Luiz Von Dentz |
Headers | show |
Series | device: Allow devices to be marked as wake capable | expand |
Hi Abhishek, On Thu, Mar 19, 2020 at 6:50 PM Abhishek Pandit-Subedi <abhishekpandit@chromium.org> wrote: > > Update the docs for Add Device with information on flags mask and value. > Add information on the Wakeable flag that can be set to allow the device > to wake the system from suspend. > --- > > Changes in v4: > * Newly added support in Add Device for flags > > Changes in v3: None > Changes in v2: None > > doc/mgmt-api.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > index 27a41f334..e99c23710 100644 > --- a/doc/mgmt-api.txt > +++ b/doc/mgmt-api.txt > @@ -1997,6 +1997,8 @@ Add Device Command > Command Parameters: Address (6 Octets) > Address_Type (1 Octet) > Action (1 Octet) > + Flags Mask (1 Octet) > + Flags Value (1 Octet) > Return Parameters: Address (6 Octets) > Address_Type (1 Octet) > > @@ -2014,6 +2016,9 @@ Add Device Command > 1 Allow incoming connection > 2 Auto-connect remote device > > + The following flags are supported: > + 0x1 Wakeable > + Hmm I thought we would be adding another action, adding this as a flag is not backward compatible so the command will probably fail on older kernels. > With the Action 0, when the device is found, a new Device Found > event will be sent indicating this device is available. This > action is only valid for LE Public and LE Random address types. > @@ -2036,6 +2041,13 @@ Add Device Command > connectable setting is off. This acts as list of known trusted > devices. > > + To set flags on the device, first set the bit in the mask for the > + flag to set and then set or clear the bit in the value to indicate > + whether the flag should be set. > + > + The Wakeable flag controls whether this device can wake the system > + from suspend. > + > This command can be used when the controller is not powered and > all settings will be programmed once powered. > > -- > 2.25.1.696.g5e7596f4ac-goog >
Hi Abhishek, > Update the docs for Add Device with information on flags mask and value. > Add information on the Wakeable flag that can be set to allow the device > to wake the system from suspend. > --- > > Changes in v4: > * Newly added support in Add Device for flags > > Changes in v3: None > Changes in v2: None > > doc/mgmt-api.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > index 27a41f334..e99c23710 100644 > --- a/doc/mgmt-api.txt > +++ b/doc/mgmt-api.txt > @@ -1997,6 +1997,8 @@ Add Device Command > Command Parameters: Address (6 Octets) > Address_Type (1 Octet) > Action (1 Octet) > + Flags Mask (1 Octet) > + Flags Value (1 Octet) so we can actually not do that. This is not backwards compatible since the current kernel version have a strict size check for the command parameter size of Add Device. Is there a problem to just introduce action 3 as I mentioned before? Regards Marcel
On Wed, Mar 25, 2020 at 2:25 PM Marcel Holtmann <marcel@holtmann.org> wrote: > > Hi Abhishek, > > > Update the docs for Add Device with information on flags mask and value. > > Add information on the Wakeable flag that can be set to allow the device > > to wake the system from suspend. > > --- > > > > Changes in v4: > > * Newly added support in Add Device for flags > > > > Changes in v3: None > > Changes in v2: None > > > > doc/mgmt-api.txt | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > > index 27a41f334..e99c23710 100644 > > --- a/doc/mgmt-api.txt > > +++ b/doc/mgmt-api.txt > > @@ -1997,6 +1997,8 @@ Add Device Command > > Command Parameters: Address (6 Octets) > > Address_Type (1 Octet) > > Action (1 Octet) > > + Flags Mask (1 Octet) > > + Flags Value (1 Octet) > > so we can actually not do that. This is not backwards compatible since the current kernel version have a strict size check for the command parameter size of Add Device. > > Is there a problem to just introduce action 3 as I mentioned before? How does one mark the device as not wake capable? (if 0x3 means mark the device as wake capable, should we add 0x4 meaning mark the device as not wake capable) Does a device need to have been already added to be marked wake capable? (Answer should probably be no) If you're ok with adding new actions 0x3 and 0x4 and making them not imply 0x1 as well (LE always sets 0x2 so overwriting the value doesn't make sense), I think that will work. > > Regards > > Marcel >
diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt index 27a41f334..e99c23710 100644 --- a/doc/mgmt-api.txt +++ b/doc/mgmt-api.txt @@ -1997,6 +1997,8 @@ Add Device Command Command Parameters: Address (6 Octets) Address_Type (1 Octet) Action (1 Octet) + Flags Mask (1 Octet) + Flags Value (1 Octet) Return Parameters: Address (6 Octets) Address_Type (1 Octet) @@ -2014,6 +2016,9 @@ Add Device Command 1 Allow incoming connection 2 Auto-connect remote device + The following flags are supported: + 0x1 Wakeable + With the Action 0, when the device is found, a new Device Found event will be sent indicating this device is available. This action is only valid for LE Public and LE Random address types. @@ -2036,6 +2041,13 @@ Add Device Command connectable setting is off. This acts as list of known trusted devices. + To set flags on the device, first set the bit in the mask for the + flag to set and then set or clear the bit in the value to indicate + whether the flag should be set. + + The Wakeable flag controls whether this device can wake the system + from suspend. + This command can be used when the controller is not powered and all settings will be programmed once powered.