| 22737ddb |
shared/att: Fix not notifying the callback
This makes sure that all request callback are called with
BT_ATT_OP_ERROR_RSP in case the link is dropped so they can propagate
the error back to the caller. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +24, -1 |
| a3fcd168 |
core/gatt-database: Don't always wait for response
If the characterist has set BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP it means
it won't reply to WriteValue and even if it does other Write Commands
can be outstanding which would be blocked waiting the reply of the
previous message. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +36, -0 |
| bf497206 |
gdbus/client: Use g_dbus_send_message if callback is not set
If the user don't set a function it means it doesn't care about the reply
so g_dbus_send_message can be used. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +14, -12 |
| 4432ec8b |
test/example-gatt-server: Don't order objects
This tests if the code is actually handling registration with objects out
of order which seems very common practice with ObjectManager
implementation. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +1, -2 |
| bf560695 |
gatt-database: Fix GATT object ordering
There is no guarantee the objects returned by GetManagedObjects
are ordered in the required order which is Service, Characteristic
Descriptor due to their respective dependencies.
This change ensures the objects are processed in the correct order. |
Olivier Martin |
9 years ago |
2 files, +87, -30 |
| 064f48ad |
shared/gatt-client: Fix not detecting BT_ATT_SECURITY_AUTO
Using bt_gatt_security cannot detect if BT_ATT_SECURITY_AUTO is enabled
since it actually checks the current level when operating over L2CAP, so
instead use io_sec_level internal field to detect the security level in
which ATT is supposed to be operating. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +4, -3 |
| 8e493e84 |
core/gatt-client: Fix printing errors if experimental is disabled
If experimental flag is not set don't attempt to create any objects since
it will cause error that are hard to guess such as bellow:
bluetoothd[6539]: Unable to register GATT service with handle 0x000c for device |
Luiz Augusto von Dentz |
9 years ago |
1 file, +6, -0 |
| 7664e160 |
shared/gatt-client: Fix not clearing database after discovery
The database cache needs to be in sync with discovery so once a discovery
complete handles after that last attribute found shall be cleared. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +29, -10 |
| d205d58b |
tools/btgatt-client: Fix write-value byte parsing
write-value, write-long-value and write-prepare were parsing
bytes using strtol with base '0' and restraining wtring size to
be exactly 2, forbidding to write values over 99. The string length
is no more checked, we instead check that the parsed value is in the
correct range. |
Chevallier Maxime |
9 years ago |
1 file, +13, -28 |
| 01d85fdf |
tools/avinfo: Fix big endian build
Commit 101b439 (tools/avinfo: Add partial support for Sony LDAC) added a
new a2dp_ldac_t structure but only inside a little endian ifdef. Add
the same structure in the big endian code.
The structure definition doesn't differ for the big/little endian cases
but if the unknown fields are discovered in the future it might, so a
copy is added rather than pulling the existing definition below the
endif. |
John Keeping |
9 years ago |
1 file, +5, -0 |
| 584e5f01 |
test: Fix scripts to run with python 3 |
Kurt McAlpine |
9 years ago |
2 files, +20, -13 |
| e074cc1f |
shared/gatt-client: Fix regression
The patch 9b40ecc8389fb064c6b5a35324c8031731e59131 introduced a
regression where only the characteristics of the first service would be
discovered. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +2, -2 |
| 86fa4d1c |
core/device: Fix not clearing Attributes before storing
This can leave the storage in a bad state if device start changing its
attributes the old one are never removed as the code reloads them with
g_key_file_load_from_file. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +4, -1 |
| e3c14b26 |
core/device: Fix not reseting database if attributes cannot be loaded
If one or more attributes cannot be loaded it means the database is
probably in a bad state so just clear it so the attributes can be
discovered again. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +3, -1 |
| d9fac049 |
core/device: Fix log when loading characteristic fails
It should log that loading fails not saving. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +4, -4 |
| 9b40ecc8 |
shared/gatt-client: Rename tmp_queue to svcs
The tmp_queue in fact store the processed services so just rename it to
svcs and stop creating extra variables for that. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +7, -13 |
| d85acdd6 |
shared/gatt-client: Add debug log if characteristic cannot be added
If gatt_db_service_insert_characteristic fails print an error for the
handle. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +5, -1 |
| ac52a82a |
client: Fix removing all devices
cmd_remove takes address string not device path. |
Szymon Janc |
9 years ago |
1 file, +18, -12 |
| 81757856 |
obexd: client: Fix memory leaks
We have to free the allocated memory for data and its members. |
Syam Sidhardhan |
9 years ago |
1 file, +1, -0 |
| 45ad0062 |
adapter: Fix memory leak
if strlen(str) < 32 then there is a memory leak. |
Syam Sidhardhan |
9 years ago |
1 file, +3, -2 |
| 69f0114a |
tools/gatt-service: Add missing methods
This adds the missing methods of GattCharacteristic and GattDescriptor
interfaces. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +153, -32 |
| 13463478 |
tools/gatt-service: Add missing properties
This adds the missing properties necessary to be able to register. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +72, -5 |
| dce2e15d |
tools/gatt-service: Fix using RegisterService
RegisterService no longer exists as it was replaced with
RegisterApplication, also the path being used is wrong since GattManager
interface is available per adapter path. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +28, -35 |
| 8c19cbee |
client: Fix not detecting connections when starting
If a device is connected set it as default so the prompt is updated and
attribute related commands can work. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +56, -37 |
| 42d1c2f0 |
tools: Remove discoverable flag from non-connectable advertising
According to the GAP specification non-connectable advertising packets
shall not set any of the discoverable flags. |
Johan Hedberg |
9 years ago |
2 files, +0, -2 |
| a4d1a7d6 |
shared/gatt-client: Fix crash unregistering notification
This fixes the following crash which happen when a notification is queued
waiting for CCC to be written but it cancelled before it completes:
Invalid read of size 4
at 0x4E0C38: notify_data_unref (gatt-client.c:201)
by 0x4D9BBE: queue_remove_all (queue.c:351)
by 0x4D9C14: queue_destroy (queue.c:73)
by 0x4E0DBB: notify_chrc_free (gatt-client.c:277)
by 0x4D9BBE: queue_remove_all (queue.c:351)
by 0x4D9C14: queue_destroy (queue.c:73)
by 0x4E3860: bt_gatt_client_free (gatt-client.c:1664)
by 0x4E38D0: bt_gatt_client_unref (gatt-client.c:1749)
by 0x45D324: gas_free (gas.c:65)
by 0x45D324: gap_driver_remove (gas.c:254)
by 0x4A72A0: service_remove (service.c:176)
by 0x4B74E9: device_remove (device.c:3865)
by 0x492971: adapter_remove (adapter.c:5236)
Address 0x8cb8830 is 16 bytes inside a block of size 64 free'd
at 0x4C29E00: free (vg_replace_malloc.c:530)
by 0x4E0C69: notify_data_unref (gatt-client.c:207)
by 0x4E58C9: complete_unregister_notify (gatt-client.c:1593)
by 0x4E58C9: bt_gatt_client_unregister_notify (gatt-client.c:2961)
by 0x4A8D77: characteristic_stop_notify (gatt-client.c:1214)
by 0x4D4E82: process_message.isra.3 (object.c:259)
by 0x4D56DC: generic_message (object.c:1071)
by 0x53DD1A2: ??? (in /usr/lib64/libdbus-1.so.3.14.6)
by 0x53CE733: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.14.6)
by 0x4CFADF: message_dispatch (mainloop.c:72)
by 0x50C8E39: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4600.2)
by 0x50C91CF: ??? (in /usr/lib64/libglib-2.0.so.0.4600.2)
by 0x50C94F1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4600.2) |
Luiz Augusto von Dentz |
9 years ago |
1 file, +3, -0 |
| 9025c3a7 |
shared/gatt-client: Fix bogus asserts
The asserts involving notify_count were bogus because it should be
possible to disable a notification even before the remote respond to
the write command. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +5, -10 |
| f6f5ed52 |
core/gatt-client: Fix not being able to cancel notifications
While the notification is still in process notifying flag wont be set but
it shall still be possible to cancel it otherwise the client has to wait
until the remote respond which can take a lot of time (up to 30 seconds). |
Luiz Augusto von Dentz |
9 years ago |
1 file, +0, -3 |
| befa914c |
shared/gatt-client: Fix not resetting request id
The request id shall be reset to 0 after bt_att_cancel has been called. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +1, -0 |
| 707887a3 |
shared/gatt-client: Make read_long_value more robust
Using "Read Blob Request" on attributes shorter than ATT_MTU - 3 may
return "Attribute Not Long" error on some values, but at the same time
it's ok to read this attribute using "Read Request".
Since using "Read Blob Request" as first request when reading long
characteristic value starting with offset 0 is optional, this patch
changes read_long_value to start with "Read Request" whenever possible
to remove need for caller to take care of such error.
Core v4.2, part F, section 1.3.4.4.5:
If the attribute value has a fixed length that is less than or equal to
(ATT_MTU - 3) octets in length, then an Error Response can be sent with
the error code «Attribute Not Long». |
Andrzej Kaczmarek |
9 years ago |
2 files, +69, -45 |
| 6bc64be1 |
audio/avrcp: Don't print an error if folder length is 0
Some stacks, for instance iOS, does actually send 0 as folder length
so just ignore if that happens since that means only means the folder
doesn't have a name. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +3, -1 |
| 23d0af61 |
monitor/avctp: Print <empty> if folder lenght is 0
This is a bit more clear that is was not a parsing error but just that
there is nothing to print:
> ACL Data RX: Handle 256 flags 0x02 dlen 39
Channel: 68 len 35 ctrl 0x0304 [PSM 27 mode 3] {chan 4}
I-frame: Unsegmented TxSeq 2 ReqSeq 3
AVCTP Browsing: Response: type 0x00 label 2 PID 0x110e
AVRCP: SetBrowsedPlayer: len 0x0019
Status: 0x04 (Success)
UIDCounter: 0x0000 (0)
Number of Items: 0x00000002 (2)
CharsetID: 0x006a (UTF-8)
Folder Depth: 0x01 (1)
Folder: <empty> |
Luiz Augusto von Dentz |
9 years ago |
1 file, +6, -1 |
| 70fdb77d |
audio/avrcp: Fix not always requesting capabilities
This fixes not requesting capabilities of targets that are not player
category, instead just make the creation of the player object
conditional to the category 1 so that GetCapabities is still sent in
order to fetch the supported events which might be still useful even
without a player. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +5, -6 |
| 6c3872af |
tools/btmgmt: Fix canceling pairing
Pairing cancellation needs to be sent with mgmt_reply() rather than
mgmt_send() since otherwise the mgmt library will not send the command
until the response to the original Pair Device command has been
received. |
Johan Hedberg |
9 years ago |
1 file, +1, -1 |
| a6ef3eb0 |
client: Update remove command to support removing all devices |
Francois Beaufort |
10 years ago |
1 file, +11, -0 |
| 7e9f6a41 |
doc/adapter-api: Add NotSupported error to SetDiscoveryFilter |
Johan Hedberg |
10 years ago |
1 file, +1, -0 |
| 1bad4ab4 |
core: Return error if kernel doesn't support Start Service Discovery
The discovery filter feature requires a kernel that supports Start
Service Discovery. This command was introduced in mgmt version 1.8, so
return a proper error if we have something older than that. |
Johan Hedberg |
10 years ago |
1 file, +3, -0 |
| deae2cd6 |
test: Add device discovery filter
This patch adds the below mentioned device discovery
filters.
UUIDs, RSSI, Pathloss, Transport. |
Gowtham Anandha Babu |
10 years ago |
1 file, +32, -0 |
| e81aeaea |
core/gatt-database: Fix possible memory leaks
While creating objects it may fail before it is added to its respective
queue leaving the object dangling.
To fix this the object creation now takes care of things like increasing
the attribute count and in case something go wrong free the object
properly. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +160, -167 |
| 4b927494 |
gdbus/client: Always call ready callback
Call ready callback regardless of the reply to GetManagedObjects
since otherwise the user code will be left waiting forever when in fact
no proxy will be created. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +3, -3 |
| 9b225090 |
test/example-gatt-server: Make use of RegisterApplication
This updates example-gatt-server to use RegisterApplication. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +41, -31 |
| d9d9b30f |
core/gatt-database: Implement Application API
This implements RegisterApplication/UnregisterApplication that allow
multiple services to be registered at once. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +273, -173 |
| c19813c9 |
doc/gatt-api: Make proper use of ObjectManager
ObjectManager path shall not contain other intefaces in its root path, only
child objects shall be included with many bindings following this.
Due to this limitation and also the fact that application might actually
have a single ObjectManager path so all services can be registered at
once. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -9 |
| 43657d77 |
mgmt: Add support for Start Limited Discovery |
Johan Hedberg |
10 years ago |
2 files, +10, -3 |
| 218969aa |
doc: fix typos in mgmt-api.txt |
Mike Ryan |
10 years ago |
1 file, +27, -26 |
| 56776afd |
Release 5.37 |
Marcel Holtmann |
10 years ago |
2 files, +10, -1 |
| 60b400ad |
build: Update library version |
Marcel Holtmann |
10 years ago |
1 file, +1, -1 |
| af77712a |
lib: Update company identifiers |
Marcel Holtmann |
10 years ago |
1 file, +113, -3 |
| 59dd6dc1 |
tools: fix update_compids to parse newly formatted page from SIG
This patch adds tools/parse_companies.pl, a twisted Perl script that
parses the SIG's HTML page in poor taste using regex. Improvements also
include support for non-ASCII entities such as é as well as full
unicode support for Chinese names. |
Mike Ryan |
10 years ago |
2 files, +69, -25 |
| 3f16a0cd |
monitor: Update list of GATT UUID information |
Marcel Holtmann |
10 years ago |
1 file, +17, -0 |