| e71d0e80 |
mesh: Switch beaconing net key
When transitioning from Phase 1 to Phase 2 of a network key and we are
beaconing, we need to halt the beaconing on the old key version, and
begin beaconing on the new key version. |
Brian Gix |
2 years ago |
1 file, +16, -0 |
| cc8a4d85 |
tools/mesh: Add support for Mesh Private Beacons
This allows generation of Mesh Private Beacon server commands, and
recognition of the resulting Status messages. |
Brian Gix |
2 years ago |
3 files, +62, -12 |
| ebb21961 |
mesh: Add internal Mesh Private Beacon model
Adds recgnition that the Mesh Private Beacon model is internal
and foundational, without bindings. |
Brian Gix |
2 years ago |
6 files, +86, -10 |
| 5ba57cf8 |
mesh: Add Tx/Rx support of Mesh Private Beacons
With this change, we start evaluating received Mesh Private Beacons in
addition to the legacy Secure Network Beacons. We also add the ability
to request Tx of Mesh Private Beacons, which are regenerated with new
Random Nonce a minimum of every 0 - 2550 seconds. |
Brian Gix |
2 years ago |
5 files, +519, -174 |
| 6619b24c |
mesh: Add Mesh Private Beacon server
This initial server supports only the Mesh Private Beacon and returns
"Not Suppoerted" for Get/Set of Private GATT Proxy and Private Node
Identity beacons. |
Brian Gix |
2 years ago |
3 files, +160, -0 |
| cbeca2fb |
mesh: Add storage of Mesh Private Beacon settings
If current storage does not exist in node.json, the Mesh Private
Beacon will be disabled. |
Brian Gix |
2 years ago |
2 files, +54, -0 |
| 2ff937b6 |
unit/mesh: Add unit testing of Mesh Private Beaconing
This includes the Sample Data from the Mesh Profile specification v1.1,
and validates that the beacon crypto functions work as expected. |
Brian Gix |
2 years ago |
1 file, +147, -35 |
| 9923c09d |
mesh: Rename parameter list per crypto usage
The derived key generated by the "nkpk" salt and network master key is
used to create Private Beacons as of Mesh Profile Specification v1.1 |
Brian Gix |
2 years ago |
2 files, +3, -3 |
| c50ecca5 |
tools/mesh: Optimize for multiple RPR servers and NPPI
These changes allow the mesh-cfgclient tool to request remote node
compositions from page 128. Depending on the differences between
there and what is stored in the local configuration database, it may
recomend reprovisioning with NPPI-1 (Address Refresh) or NPPI-2
(Composition Refresh).
Additionally, NPPI-0 may be performed to refresh the Device Key only. |
Brian Gix |
2 years ago |
6 files, +598, -87 |
| f3243ecb |
mesh: Add Remote Provisioning
Add Remote Provisioning Server
Add Remote Provisioning Client
Remove local scanning/provisioning
Add delete-all dev key function
Add NPPI procedures |
Brian Gix |
2 years ago |
18 files, +2245, -367 |
| 265c12dc |
doc/mesh: Add Remote Provisioning DBus APIs
Remote Provisioning (introduced in Mesh Profile Specification v1.1)
* Allows Provisioners to use a remote server to scan for and
provision devices.
* Allows Config managers to reprovision existing nodes to:
* Refresh Device Keys
* Reassign Node Addresses
* Refresh Node Composition |
Brian Gix |
2 years ago |
1 file, +134, -6 |
| 5845f003 |
AUTHORS: modify Brian Gix email address |
Brian Gix |
2 years ago |
1 file, +1, -1 |
| f367fa3c |
monitor/att: Fix Set Member Lock decoding
According to CSIS specification v1.0.1: "Allowed values for the Set
Member Lock characteristic are Unlocked (corresponding to the
numeric value 0x01) and Locked (corresponding to the numeric
value 0x02); all other values are RFU". |
Marcin Kraglak |
2 years ago |
1 file, +2, -2 |
| eee6a75a |
AUTHORS: Update Marcin's email |
Marcin Kraglak |
2 years ago |
1 file, +1, -1 |
| efba4618 |
shared/util: Add CAS, HAS, TMAS and PBAS UUIDs
Add UUIDs for: Common Audio service, Hearing Aid service,
TMAS service and Public Broadcast Announcement service. |
Marcin Kraglak |
2 years ago |
1 file, +9, -1 |
| b61044d5 |
bap: Fix registering multiple endpoint for the same PAC set
This makes sure there is only one endpoint representing a local and
remote PAC set. |
Luiz Augusto von Dentz |
2 years ago |
1 file, +21, -0 |
| 814e3535 |
bap: Fix not checking if request fits when grouping
When grouping requests with the same opcode the code was queueing them
without attempt to check that that would fit in the ATT MTU causing the
following trace:
stack-buffer-overflow on address 0x7fffdba951f0 at pc 0x7fc15fc49d21 bp
0x7fffdba95020 sp 0x7fffdba947d0
WRITE of size 9 at 0x7fffdba951f0 thread T0
#0 0x7fc15fc49d20 in __interceptor_memcpy
(/lib64/libasan.so.8+0x49d20)
#1 0x71f698 in util_iov_push_mem src/shared/util.c:266
#2 0x7b9312 in append_group src/shared/bap.c:3424
#3 0x71ba01 in queue_foreach src/shared/queue.c:207
#4 0x7b9b66 in bap_send src/shared/bap.c:3459
#5 0x7ba594 in bap_process_queue src/shared/bap.c:351
Fixes: https://github.com/bluez/bluez/issues/457#issuecomment-1403924708 |
Luiz Augusto von Dentz |
2 years ago |
1 file, +34, -7 |
| 8aed9db4 |
bap: Fix not removing endpoint if local PAC is unregistered
If local PAC is unregistered it would also notify via pac_removed
callback which shall unregister the endpoint D-Bus object.
Fixes: https://github.com/bluez/bluez/issues/457#issuecomment-1402178691 |
Luiz Augusto von Dentz |
2 years ago |
1 file, +3, -3 |
| 414c8650 |
bap: Fix not setting stream to NULL
If the stream state is idle the ep->stream shall be set to NULL
otherwise it may be reused causing the following trace:
==32623==ERROR: AddressSanitizer: heap-use-after-free on address ...
READ of size 8 at 0x60b000103550 thread T0
#0 0x7bf7b7 in bap_stream_valid src/shared/bap.c:4065
#1 0x7bf981 in bt_bap_stream_config src/shared/bap.c:4082
#2 0x51a7c8 in bap_config profiles/audio/bap.c:584
#3 0x71b907 in queue_foreach src/shared/queue.c:207
#4 0x51b61f in select_cb profiles/audio/bap.c:626
#5 0x4691ed in pac_select_cb profiles/audio/media.c:884
#6 0x4657ea in endpoint_reply profiles/audio/media.c:369
Fixes: https://github.com/bluez/bluez/issues/457#issuecomment-1399232486 |
Luiz Augusto von Dentz |
2 years ago |
1 file, +3, -2 |
| d159973e |
shared/bap: Fix not detaching streams when PAC is removed
When local PAC is removed we attempt to release the streams but we left
it still attached to the endpoint, so this makes sure the stream is
properly detached by setting its state to idle.
Fixes: https://github.com/bluez/bluez/issues/457 |
Luiz Augusto von Dentz |
2 years ago |
1 file, +3, -1 |
| a1736d89 |
shared/bap: Fixing Company ID and Vendor ID endianess
This fixes Company ID and Vendor Codec ID which are supposed to be
little endian. |
Abhay Maheta |
3 years ago |
1 file, +2, -2 |
| 6f8b3544 |
shared/bap: Fix scan-build warning
This fixes the following warning:
src/shared/bap.c:2268:26: warning: Access to field 'iov_len' results in
a dereference of a null pointer (loaded from variable 'cont')
return iov_append(data, cont->iov_len, cont->iov_base);
^~~~~~~~~~~~~ |
Luiz Augusto von Dentz |
3 years ago |
1 file, +6, -0 |
| c18e3bf9 |
shared/gatt-client: Fix smatch warnings
This fixes the following warnings:
shared/gatt-client.c:2764:33: warning: Variable length array is used.
shared/gatt-client.c:2994:23: warning: Variable length array is used.
shared/gatt-client.c:3075:23: warning: Variable length array is used.
shared/gatt-client.c:3514:23: warning: Variable length array is used. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +8, -8 |
| 2f4c576a |
hog-lib: Fix not handling BT_ATT_OP_HANDLE_NFY_MULT
This is a temporary fix for not handling BT_ATT_OP_HANDLE_NFY_MULT in
GAttr so the code will use g_attrib_attach_client to attach the
bt_gatt_client instance which is then used to register notifications
including those sent with BT_ATT_OP_HANDLE_NFY_MULT.
Fixes: https://github.com/bluez/bluez/issues/71 |
Luiz Augusto von Dentz |
3 years ago |
2 files, +22, -2 |
| 47b6cfee |
attrib: Introduce g_attrib_attach_client
This introduces g_attrib_attach_client which can be used to attach a
bt_gatt_client instance to GAttr so it can be used to register
notifications. |
Luiz Augusto von Dentz |
3 years ago |
3 files, +51, -3 |
| fde32ff9 |
shared/gatt-client: Allow registering with NULL callback
This makes bt_gatt_client_register_notify allow registering with NULL
callback which is interpreted as the CCC write has already been
performed therefore it won't be written again. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +12, -4 |
| 6e3059ae |
shared/gatt-client: Use parent debug_callback if not set on clone
If clone don't have a dedicated callback set use its parent so users of
bt_gatt_client_clone don't have to keep setting the same callback for
all clone instances. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +17, -3 |
| 4e2ae14e |
media-api: Add Vendor and Metadata
This adds Vendor and Metadata properties to MediaEndpoint1. |
Abhay Maheta |
3 years ago |
1 file, +27, -0 |
| 441eeb2a |
shared/bap: Fix handling for Company ID and Vendor Codec ID
This adds fixes for handing for Company ID and Vendor Codec ID
while adding PAC record to database and responding to Attribute
Read Request for Sink/Source PAC Characteristics. |
Abhay Maheta |
3 years ago |
2 files, +6, -1 |
| 7a32f291 |
monitor: Add support for decoding RSI
This adds support for decoding Resolvable Set Identifier[1] advertising
type (0x2e) according to CIS[2] spec:
Resolvable Set Identifier: 46-BB-DB-26-D8-55
Hash: 0x26d855
Random: 0x46bbdb
[1] https://www.bluetooth.com/specifications/assigned-numbers/
[2] https://www.bluetooth.com/specifications/csis-1-0-1/ |
Luiz Augusto von Dentz |
3 years ago |
1 file, +9, -0 |
| 051ccb1e |
test-crypto: Add /crypto/sef test
This adds test /crypto/sef which validas the implementation of
bt_crypto_sef using the sample data from CSIS[1] spec:
A.2. sef SIRK Encryption Function
> unit/test-crypto -s "/crypto/sef"
SIRK:
cd cc 72 dd 86 8c cd ce 22 fd a1 21 09 7d 7d 45 ..r....."..!.}}E
K:
d9 ce e5 3c 22 c6 1e 06 6f 69 48 d4 9b 1b 6e 67 ...<"...oiH...ng
Expected:
46 d3 5f f2 d5 62 25 7e a0 24 35 e1 35 38 0a 17 F._..b%~.$5.58..
Result:
46 d3 5f f2 d5 62 25 7e a0 24 35 e1 35 38 0a 17 F._..b%~.$5.58..
[1]https://www.bluetooth.com/specifications/csis-1-0-1/ |
Luiz Augusto von Dentz |
3 years ago |
1 file, +39, -0 |
| a38b6ca5 |
shared/crypto: Adds bt_crypto_sef
This adds bt_crypto_sef is is used to create a hash as stated on CSIS
spec:
'4.5. SIRK encryption function sef'
https://www.bluetooth.com/specifications/csis-1-0-1/ |
Luiz Augusto von Dentz |
3 years ago |
2 files, +164, -9 |
| 09293fd2 |
test-crypto: Add /crypto/sih test
This adds test /crypto/sih which validas the implementation of
bt_crypto_sih using the sample data from CSIS[1] spec:
A.1. sih Resolvable Set Identifier hash function
> unit/test-crypto -s "/crypto/sih"
K:
cd cc 72 dd 86 8c cd ce 22 fd a1 21 09 7d 7d 45 ..r....."..!.}}E
R:
63 f5 69 c.i
Expected:
da 48 19 .H.
Result:
da 48 19 .H.
[1] https://www.bluetooth.com/specifications/csis-1-0-1/ |
Luiz Augusto von Dentz |
3 years ago |
1 file, +35, -0 |
| 5abd9914 |
shared/crypto: Adds bt_crypto_sih
This adds bt_crypto_sih is is used to create a hash as stated on
CSIS[1] spec:
'4.7. Resolvable Set Identifier hash function sih'
https://www.bluetooth.com/specifications/csis-1-0-1/ |
Luiz Augusto von Dentz |
3 years ago |
2 files, +38, -0 |
| 90a66239 |
monitor/att: Add decoding support for CSIP
This adds decoding support for CSIS attributes:
> ACL Data RX: Handle 3585 flags 0x02 dlen 7
ATT: Read Request (0x0a) len 2
Handle: 0x0017 Type: Set Identity Resolving Key (0x2b84)
< ACL Data TX: Handle 3585 flags 0x00 dlen 22
ATT: Read Response (0x0b) len 17
Value: 01761fae703ed681f0c50b34155b6434fb
Handle: 0x0017 Type: Set Identity Resolving Key (0x2b84)
SIRK: 01761fae703ed681f0c50b34155b6434fb
> ACL Data RX: Handle 3585 flags 0x02 dlen 7
ATT: Read Request (0x0a) len 2
Handle: 0x001b Type: Set Member Lock (0x2b86)
< ACL Data TX: Handle 3585 flags 0x00 dlen 6
ATT: Read Response (0x0b) len 1
Value: 01
Handle: 0x001b Type: Set Member Lock (0x2b86)
Locked (0x01)
> ACL Data RX: Handle 3585 flags 0x02 dlen 7
ATT: Read Request (0x0a) len 2
Handle: 0x001e Type: Set Member Rank (0x2b87)
< ACL Data TX: Handle 3585 flags 0x00 dlen 6
ATT: Read Response (0x0b) len 1
Value: 01
Handle: 0x001e Type: Set Member Rank (0x2b87)
Rank: 0x01 |
Sathish Narasimman |
3 years ago |
1 file, +85, -0 |
| b709058c |
lib/uuid: Add CSIS UUIDs
This adds Coordinated Set Identification Service UUIDs which will
be used by Coordinated Set Identification Profile. |
Sathish Narasimman |
3 years ago |
1 file, +7, -0 |
| 9a6b0e39 |
shared/util: Update UUID database for Csip services
This updates UUID database with the values from assigned numbers for
co-ordinated set identification services. |
Sathish Narasimman |
3 years ago |
1 file, +3, -0 |
| da203f5d |
shared/gatt-client: Fix not removing pending services
If there are no characteristics to discover, or for some reason
bt_gatt_discover_descriptors is skiped, or the last attribute is
actually a included service the service should be removed from
pending list as there will be no more attributes to be discovered.
Fixes: https://github.com/bluez/bluez/issues/438 |
Luiz Augusto von Dentz |
3 years ago |
1 file, +36, -10 |
| b91d9213 |
shared/gatt-db: Add gatt_db_attribute_get_service
This adds gatt_db_attribute_get_service which can be used to get the
service which the given attribute belongs to. |
Luiz Augusto von Dentz |
3 years ago |
2 files, +12, -0 |
| 1270afa5 |
client/player: Fix transport.send/receice tab completion
Commands transport.send/receive were not settings any completion
callback so this makes sure it uses transport_generator to generate the
list of transport that could be used to send. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +4, -2 |
| 318b1a19 |
client/player: Print transport progress
This uses bt_shell_echo to print out the transfer progress on the echo
area. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +14, -2 |
| e51d6c5f |
client/player: Use bt_shell_echo to print transfer progress
This uses bt_shell_echo to print transfer progress. |
Luiz Augusto von Dentz |
3 years ago |
2 files, +9, -13 |
| 7b8c87cc |
shared/shell: Add bt_shell_echo
This adds bt_shell_echo which can be used to print messages on the echo
area. |
Luiz Augusto von Dentz |
3 years ago |
2 files, +22, -0 |
| 89b2072b |
client/player: Make transport.send non-blocking
This makes transport.send command non-blocking by using timerfd
callback to initiate the transfers. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +132, -61 |
| 3d6e4bf1 |
isotest: Fix not calculating time to wait
The difference of time start and current time may have advanced just
enough to add a second leaving start nanoseconds to be bigger. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +4, -0 |
| e07c1e72 |
client/player: Fix not calculating time to wait
The difference of time start and current time may have advanced just
enough to add a second leaving start nanoseconds to be bigger. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +4, -0 |
| 253502d3 |
shared/bap: Make bt_bap_pac_register to be per session
This makes bt_bap_pac_register to be per session rather than global so
the callback don't have to match the session by itself. |
Luiz Augusto von Dentz |
3 years ago |
3 files, +45, -38 |
| be9fc922 |
shared/gatt-db: Allow passing NULL to gatt_db_attribute_write
This makes gatt_db_attribute_write to accept NULL as a func when
storing directly on the db itself. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +3, -2 |
| 3bdc16d9 |
shared/bap: Read PAC Sink/Source if respective location is found
If PAC Sink/Source has been found but not record has been recovered it
means an error must have occurred so this attempt to read the records
once again. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +64, -44 |
| 6b5b5139 |
shared/bap: Log error message if request cannot be sent
This makes sure a error message is logged if a request cannot be sent
for some reason. |
Luiz Augusto von Dentz |
3 years ago |
1 file, +40, -31 |