doc: Add Management Interface Network API definitions
RFC v3 1/1 doc: Add Management Interface Network API definitions
---
v3: added interface index to 'Network' block, removed Nework_Role parameter
and dropped text about LE being enabled.
doc/doc.txt | 0 doc/mgmt-api.txt | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 doc/doc.txt
doc/doc.txt new file +0 -0
doc/mgmt-api.txt +142 -0
151 lines not on this page · raw message
Signature · 1 line
2.1.4
Marcel Holtmann
maintainerHi Patrik,
Quoted 59 lines
---
v3: added interface index to 'Network' block, removedNework_Roleparameter
and dropped text about LE being enabled.
doc/doc.txt| 0doc/mgmt-api.txt| 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++2 files changed, 142 insertions(+)create mode 100644
doc/doc.txtdoc/doc.txt new file +0
-0doc/mgmt-api.txt +39
-0@@ -2801,6 +2801,107 @@ Start Limited Discovery Command Invalid Index +Get Networks Command +==================== + + Command Code: 0x0042 + Controller Index: <controller id> + Command Parameters: + Return Parameters: Connection_Count (2 Octets) + Network1 { + Address (6 Octets) + Address_Type (1 Octet) + Interface Index (4 Octets) + } + Network2 { } + ... + + This command is used to retrieve a list of BTLE network + connections. A pre-requisite is that LE is supported + by the controller, otherwise this command will return a + "not supported" response. + + Possible values for the Address_Type parameter: + 0 Reserved + 1 LE Public + 2 LE Random + + For devices using resolvable random addresses with a known + identity resolving key, the Address and Address_Type will + contain the identity information. + + This command can only be used when the controller is powered. + + This command generates a Command Complete event on success or + a Command Status event on failure. + + Possible errors: Invalid Parameters + Not Supported + Invalid Index + +
doc/mgmt-api.txt Start Limited Discovery Command · line 2852
Quoted 10 lines
doc/mgmt-api.txt +10
-0+Add Network Command +=================== + + Command Code: 0x0043 + Controller Index: <controller id> + Command Parameters: Address (6 Octets) + Address_Type (1 Octet) + Return Parameters: Address (6 Octets) + Address_Type (1 Octet) + Interface Index (4 Octets)
actually we have a bit of an issue here. So my understanding is that this command does not necessarily connects right away. If it is similar to Add Device, then you add your remote device here and at some point in the future if the device is found, it might get connected. If it gets connected it will also establish IPSP or BNEP.
So first of all, we are operating under the assumption that Add Network does not really do any trigger of scanning or advertising. We let that one be handled by Add Device and Add Advertising. This is just for the network side of things to decide if we establish the network layer.
The second problem here is really if the above is what we want, that the Interface Index will not be available at this point in time. Yes, for IPSP we can just create it at this point and have it available in the system, but for BNEP this is not going to work. That interface is only available once you actually connected. Unless we also want to change that and create the BNEP interface ahead of time and mark it has LOWER_DOWN (meaning no link).
In any case, we should keep a Type or Mode parameter here to select between IPSP and BNEP. Even while currently they are clearly limited to the address type, but in theory, there is nothing stopping us to run IPSP over BR/EDR or a new future IPv6 / 6LoWPAN solution coming up that might be connection-less.
And no matter what we should have a note here that mentions Add Device and Add Advertising to be used to handle the connection parts of the establishment.
Regards
Marcel
Luiz Augusto von Dentz
maintainerHi Marcel,
On Fri, Mar 4, 2016 at 7:27 PM, Marcel Holtmann <[email protected]> wrote= :
Quoted 4 lines
Hi Patrik,
Quoted 2 lines
---
v3: added interface index to 'Network' block, removedNework_Roleparame=
ter
Quoted 4 lines
Quoted 4 lines
and dropped text about LE being enabled.
doc/doc.txt| 0doc/mgmt-api.txt| 142 +++++++++++++++++++++++++++++++++++++++++++++++++=
++++++
Quoted 57 lines
Quoted 57 lines
2 files changed, 142 insertions(+)create mode 100644
doc/doc.txtdoc/doc.txt new file +0
-0doc/mgmt-api.txt +43
-0@@ -2801,6 +2801,107 @@ Start Limited Discovery Command Invalid Index +Get Networks Command +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + + Command Code: 0x0042 + Controller Index: <controller id> + Command Parameters: + Return Parameters: Connection_Count (2 Octets) + Network1 { + Address (6 Octets) + Address_Type (1 Octet) + Interface Index (4 Octets) + } + Network2 { } + ... + + This command is used to retrieve a list of BTLE network + connections. A pre-requisite is that LE is supported + by the controller, otherwise this command will return a + "not supported" response. + + Possible values for the Address_Type parameter: + 0 Reserved + 1 LE Public + 2 LE Random + + For devices using resolvable random addresses with a known + identity resolving key, the Address and Address_Type will + contain the identity information. + + This command can only be used when the controller is powered. + + This command generates a Command Complete event on success or + a Command Status event on failure. + + Possible errors: Invalid Parameters + Not Supported + Invalid Index + + +Add Network Command +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + + Command Code: 0x0043
Quoted 8 lines
doc/mgmt-api.txt Start Limited Discovery Command · line 2852
Quoted 6 lines
doc/mgmt-api.txt +6
-0+ Controller Index: <controller id> + Command Parameters: Address (6 Octets) + Address_Type (1 Octet) + Return Parameters: Address (6 Octets) + Address_Type (1 Octet) + Interface Index (4 Octets)actually we have a bit of an issue here. So my understanding is that this=
command does not necessarily connects right away. If it is similar to Add =
Device, then you add your remote device here and at some point in the futur= e if the device is found, it might get connected. If it gets connected it w= ill also establish IPSP or BNEP.
Quoted 2 lines
So first of all, we are operating under the assumption that Add Network d=
oes not really do any trigger of scanning or advertising. We let that one b= e handled by Add Device and Add Advertising. This is just for the network s= ide of things to decide if we establish the network layer.
Quoted 2 lines
The second problem here is really if the above is what we want, that the =
Interface Index will not be available at this point in time. Yes, for IPSP = we can just create it at this point and have it available in the system, bu= t for BNEP this is not going to work. That interface is only available once=
you actually connected. Unless we also want to change that and create the =
BNEP interface ahead of time and mark it has LOWER_DOWN (meaning no link).
Quoted 2 lines
In any case, we should keep a Type or Mode parameter here to select betwe=
en IPSP and BNEP. Even while currently they are clearly limited to the addr= ess type, but in theory, there is nothing stopping us to run IPSP over BR/E= DR or a new future IPv6 / 6LoWPAN solution coming up that might be connecti= on-less.
Quoted 2 lines
And no matter what we should have a note here that mentions Add Device an=
d Add Advertising to be used to handle the connection parts of the establis= hment.
Another thing to consider here is that IPSP actually mention that security level 2 and 3 (and I guess fips as well although not mentioned) may be used depending on the use case, but the 6lowpan only does level 1 which might actually not be what we want by default, so Id consider adding a MGMT command to tell when to enable the L2CAP channel and what security level it shall use. Also maybe this could be applied to router if we want to force a certain security level then Add Network perhaps should the security level as input.
--=20
Luiz Augusto von Dentz