| e4078df9 |
core/gatt: Don't return an error if notification is already enabled
In case the client is already subscribed and attempt to register again
just return success as the handling should be the same as success. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -1 |
| f585e7ac |
client: Fix using RegisterProfile
RegisterProfile no longer works for registering GattProfile instances
as this functionality has been moved to RegisterApplication.
In order to make this more clear this replaces the (un)register-profile
with (un)register-application and enable ObjectManager, here is an
example how to register for 12345678-1234-5678-1234-56789abcdef1:
[bluetooth]# register-application 12345678-1234-5678-1234-56789abcdef1
Application registered
bluetoothd[8777]: src/gatt-database.c:manager_register_app() Registering application: :1.483:/
bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/application, iface: org.bluez.GattProfile1
bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/agent, iface: org.bluez.Agent1
bluetoothd[8777]: src/gatt-database.c:profile_add() Added ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1"
bluetoothd[8777]: src/gatt-database.c:client_ready_cb() GATT application registered: :1.483:/
[bluetooth]# unregister-application
Application unregistered
bluetoothd[8777]: src/gatt-database.c:profile_remove() Removed ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1"
bluetoothd[8777]: src/gatt-database.c:profile_release() Releasing ":1.483" |
Luiz Augusto von Dentz |
8 years ago |
3 files, +68, -44 |
| 6b34bdd9 |
shared/gatt-client: Fix not removing services that had disappeared
If a service cannot be found in the middle of the database the current
logic don't clear its range leaving it still active which cause upper
layer to believe its attributes are still available.
In order to fix the code now loads existing services into the pending
list and remove the services left at the end of the discovery:
src/device.c:gatt_debug() Primary services found: 2
src/device.c:gatt_debug() start: 0x0001, end: 0x0005, uuid: 00001800-0000-1000-8000-00805f9b34fb
src/device.c:gatt_debug() start: 0x0100, end: 0x0104, uuid: 0000180a-0000-1000-8000-00805f9b34fb
src/device.c:gatt_debug() Secondary service discovery failed. ATT ECODE: 0x0a
src/device.c:gatt_debug() Characteristics found: 2
src/device.c:gatt_debug() start: 0x0101, end: 0x0102, value: 0x0102, props: 0x02, uuid: 00002a24-0000-1
src/device.c:gatt_debug() start: 0x0103, end: 0x0104, value: 0x0104, props: 0x02, uuid: 00002a29-0000-1
src/device.c:gatt_debug() service disappeared: start 0x0006 end 0x000a
src/device.c:gatt_service_removed() start: 0x0006, end: 0x000a |
Luiz Augusto von Dentz |
8 years ago |
1 file, +63, -1 |
| bec76570 |
mgmt-tester: Fix controller version number expectation to be 5.0 |
Johan Hedberg |
8 years ago |
1 file, +7, -7 |
| 14f1c751 |
unit/test-gatt: Adjust the PDUs for characteristic discovery
The new behavior of bt_gatt_client is to discovery the characteristics
of the entire range (0x0001-0xffff) not service by service. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +27, -33 |
| a39cd38a |
shared/gatt-client: Simplify characteristics discovery
Instead of discovering characteristics per service in a depth-first
fashion do it in breadth-first like its done for primary, secondary and
included.
As a bonus this can also speed up the discovery procedure since it will
result in less traffic over the air. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +41, -98 |
| 82c7e036 |
shared/gatt-db: Add gatt_db_insert_descriptor
This introduces gatt_db_insert_descriptor which is similar to
gatt_db_service_insert_descriptor but doesn't require the caller to
know the service where the attribute should be inserted. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +29, -0 |
| 87abac45 |
shared/gatt-db: Add gatt_db_insert_characteristic
This introduces gatt_db_insert_characteristic which is similar to
gatt_db_service_insert_charactersitic but doesn't require the caller to
know the service where the attribute should be inserted. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +32, -0 |
| 5d6ad0db |
unit/test-gatt: Adjust the PDUs to the new behavior
The new behavior of bt_gatt_client is to discovery the entire range
(0x0001-0xffff) not service by service. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +6, -14 |
| f78146f9 |
shared/gatt-client: Simplify included discovery
Instead of doing include per service in a depth-first fashion do it
in breadth-first like its done for primary and secondary since it is
now possible to insert the include handle, not just append at the end,
it is not longer necessary to fetch the attribute in order to have
included handle.
As a bonus this can also speed up the discovery procedure since it will
result in less traffic over the air. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +42, -88 |
| 0c9f030b |
shared/gatt-db: Add gatt_db_insert_included
This introduces gatt_db_insert_included which is similar to
gatt_db_service_insert_included but doesn't require the caller to
know the service where the attribute should be inserted. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +17, -0 |
| 7aaa6c89 |
shared/gatt-client: Insert included attribute with handle
This ensures the local representation matches exactly the handle used
by the remote in its database. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -1 |
| 108336ee |
shared/gatt-db: Add gatt_db_service_insert_included
This introduces gatt_db_service_insert_included which is a variant of
gatt_db_service_add_included containing the handle where it should be
inserted. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +36, -8 |
| ba07a8bf |
shared/gatt-db: Add gatt_db_get_service
This adds gatt_db_get_service which can be used to lookup service by
handle. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +21, -3 |
| a530b1d2 |
emulator: Update emulated controller HCI version from 4.2 to 5.0 |
Johan Hedberg |
8 years ago |
1 file, +2, -2 |
| 5ee722e3 |
Release 5.45 |
Marcel Holtmann |
8 years ago |
2 files, +11, -1 |
| e9c76b0d |
core/gatt-client: Add support for Includes property
Add implementation of Includes property in GATT service interface.
Include services are updated after exporting all services, when new service
has been added or service was removed. |
Marcin Kraglak |
8 years ago |
1 file, +106, -7 |
| 535913b8 |
unit/test-gatt: Add test for unknown request
This send an unknown command (0xff) to test that no response is sent
since the spec mandates the server to not respond to commands:
BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F page 2179
'If a server receives a command that it does not support, indicated
by the Command Flag of the PDU set to one, then the server shall
ignore the Command.' |
Luiz Augusto von Dentz |
8 years ago |
1 file, +18, -0 |
| d99df1d3 |
unit/test-gatt: Add test for unknown request
This send an unknown request (0xbf) to test if a response is sent since
the spec mandates the server to always respond to all requests it
receives:
BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F page 2173
'A client may send attribute protocol requests to a server, and the
server shall respond to all requests that it receives.' |
Luiz Augusto von Dentz |
8 years ago |
1 file, +6, -0 |
| de01c27a |
shared/att: Respond to any opcode that is not command
Although get_op_type does now check for the command mask it must
respond to anything other than ATT_OP_TYPE_CMD since there is no mask
for response opcode. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +4, -4 |
| e6051649 |
emulator: Improved handling of Set Default PHY command |
Marcel Holtmann |
8 years ago |
1 file, +69, -5 |
| c2713b60 |
monitor: Change decoding for channel selection algorithm event |
Marcel Holtmann |
8 years ago |
1 file, +15, -20 |
| 95354181 |
emulator: Enable LE power class and minimum channels feature |
Marcel Holtmann |
8 years ago |
1 file, +2, -2 |
| 8d6646fc |
emulator: Fix comments for event mask descriptions |
Marcel Holtmann |
8 years ago |
1 file, +9, -9 |
| eb129aaf |
monitor: Fix handling of Set Default PHY command complete event |
Marcel Holtmann |
8 years ago |
1 file, +2, -1 |
| cea8ed99 |
emulator: Add basic PHY command handling to LE only controller |
Marcel Holtmann |
8 years ago |
1 file, +52, -5 |
| fbf4a060 |
monitor: Fix parameter indentation for PHY commands |
Marcel Holtmann |
8 years ago |
1 file, +9, -9 |
| d2af5c68 |
emulator: Add Bluetooth 5.0 defines to LE only controller |
Marcel Holtmann |
8 years ago |
1 file, +51, -2 |
| 8ffff6d3 |
smp-tester: Add CT2 to expected valid SMP PDU |
Johan Hedberg |
8 years ago |
1 file, +1, -1 |
| 56178b62 |
Revert "build: Make btmgmt tools installable"
Don't install btmgmt as there are plans for other tools to cover the
likes of hciconfig, etc. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -3 |
| 9702e6b2 |
shared/att: Fix responding to unknown command opcode
In case of receiving an unknown command no response shall be generated. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +3, -0 |
| 008093fc |
monitor: Add option -A/--a2dp to dump A2DP stream data
This is similar to SCO which disable audio dumping by default so only
signalling data is shown:
< ACL Data TX: Handle 256 flags 0x02 dlen 850 #6041 11:32:29.299212
Channel: 451 len 846 [PSM 25 mode 0] {chan 2} |
Luiz Augusto von Dentz |
8 years ago |
4 files, +15, -2 |
| 6db3470c |
client: Always start an agent
Always register agent with default capability. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +7, -6 |
| 657ca31b |
monitor: Fix not decoding control frames
In order to enable decoding control frames packet_monitor needs to check
if the index is set to HCI_DEV_NONE since that will call packet_ctrl_open
which setups the ctrl and assign it a cookie. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +5, -4 |
| 9425f193 |
monitor: Add frame counter support
This adds frame counter support for io frames:
> HCI Event: Command Complete (0x0e) plen 4 #86 [hci1] 13:00:02.639412
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #87 [hci1] 13:00:02.639663
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 #88 [hci1] 13:00:02.640420
LE Set Scan Enable (0x08|0x000c) ncmd 2
Status: Success (0x00) |
Luiz Augusto von Dentz |
8 years ago |
1 file, +35, -10 |
| f3cc1765 |
obexd/pbap: Fix hanging when maxlistcount = 0
vobject_list_get_next_header shall only attempt to call
g_obex_apparam_encode otherwise it will just keep adding the same tag
in a loop. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +4, -1 |
| 07943b87 |
gobex: Make g_obex_apparam_encode NULL safe
Make g_obex_apparam_encode ignore if the apparam pointer is NULL. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +3, -0 |
| 677a3456 |
monitor: Add LE PHY update complete event decoding |
Łukasz Rymanowski |
8 years ago |
2 files, +20, -1 |
| c71c36f0 |
monitor: Add LE Set PHY decoding
< HCI Command: LE Set PHY (0x08|0x0032) plen 7
Handle: 1
All PHYs preference: 0x00
TX PHYs preference: 0x07
LE 1M
LE 2M
LE Coded
RX PHYs preference: 0x07
LE 1M
LE 2M
LE Coded
PHY options preference: S8 coding (0x0002) |
Łukasz Rymanowski |
8 years ago |
2 files, +51, -12 |
| c7bd4f9e |
monitor: Add LE Set default PHY decoding
< HCI Command: LE Set Default PHY (0x08|0x0031) plen 3
All PHYs preference: 0x00
TX PHYs preference: 0x07
LE 1M
LE 2M
LE Coded
RX PHYs preference: 0x0e
LE 2M
LE Coded
Reserved (0x08)
< HCI Command: LE Set Default PHY (0x08|0x0031) plen 3
All PHYs preference: 0x03
No TX PHY preference
No RX PHY preference
TX PHYs preference: 0x00
RX PHYs preference: 0x00 |
Łukasz Rymanowski |
8 years ago |
2 files, +76, -1 |
| 1cec19a5 |
monitor: Add LE Read PHY decoding |
Łukasz Rymanowski |
8 years ago |
2 files, +53, -1 |
| 146756f8 |
monitor: Add description for filter in scan parameters
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
Type: Active (0x01)
Interval: 30.000 msec (0x0030)
Window: 30.000 msec (0x0030)
Own address type: Public (0x00)
Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02) |
Łukasz Rymanowski |
8 years ago |
1 file, +6, -0 |
| b8f65a8b |
tools/obexctl: Fix not being able to PullAll
The change to use wordexp breaks PullAll since '*' seems to be expanded
to something else, the manpage in fact mention the $* is expansion is
undefined:
[40:88:05:14:3A:7A]# cp * /tmp/all.vcf
Attempting to Pull
[NEW] Transfer /org/bluez/obex/client/session7/transfer29
Pull successful
[CHG] Transfer /org/bluez/obex/client/session7/transfer29 Status: error
[DEL] Transfer /org/bluez/obex/client/session7/transfer29
[40:88:05:14:3A:7A]# cp *.vcf /tmp/all.vcf
Attempting to PullAll
[NEW] Transfer /org/bluez/obex/client/session7/transfer30
PullAll successful
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Status: active
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Transferred: 4085 (@4KB/s)
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Transferred: 8170 (@4KB/s)
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Transferred: 12255 (@4KB/s)
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Transferred: 20425 (@8KB/s)
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Transferred: 24510 (@4KB/s)
[CHG] Transfer /org/bluez/obex/client/session7/transfer30 Status: complete
[DEL] Transfer /org/bluez/obex/client/session7/transfer30 |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -1 |
| d2a1f8da |
audio/avdtp: Increase timeout for Suspend request
There have been reports that some device may delay the Suspend response
when switching to HFP/SCO. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +14, -5 |
| 94eda760 |
monitor: Add support for decoding LE Channel Selection Algorithm Event
> HCI Event: LE Meta Event (0x3e) plen 4 44.589780
LE Channel Selection Algorithm (0x14)
Handle: 1
LE Channel Selection Algorithm #2 (0x01) |
Szymon Janc |
8 years ago |
2 files, +35, -1 |
| 8944a38c |
core: replace sizeof(filename) with PATH_MAX
This commit replaces sizeof(filename) with PATH_MAX to match the common
scheme which is used in other places. |
Konrad Zapałowicz |
8 years ago |
2 files, +2, -2 |
| 1d9ac1ec |
build: Make btmgmt tools installable |
Luiz Augusto von Dentz |
8 years ago |
1 file, +3, -1 |
| 14b04698 |
tools: Add hw_variant for Intel Bluetooth 9160/9260
This patch adds hw_variant for Intel Bluetooth 9160/9260 also
known as ThunderPeak(ThP). |
Tedd Ho-Jeong An |
8 years ago |
1 file, +1, -0 |
| d4ecd13f |
client: Use selected attribute when selecting by UUID
There could be multiple instances of the same UUID, like e.g CCC and CEP,
so instead of matching the first one found from the beginning this uses
the current selected attribute as parent looking up existing child
attributes first. |
Luiz Augusto von Dentz |
8 years ago |
3 files, +22, -10 |
| 7dd5e10b |
client: Add support to pass UUIDs to select-attribute
This adds support to match attributes by UUID instead of object path. |
Luiz Augusto von Dentz |
8 years ago |
2 files, +47, -3 |