Commit Graph

161 Commits (86f9a742f36ea441701b7c8ec78c3f2e670bf224)

Author SHA1 Message Date
Olivier Martin b5a785e4b6 dbus: Refactore gattlib_adapter_scan_enable_with_filter() to also introduce the non-blocking version 2022-05-16 21:44:31 +02:00
Olivier Martin d9c18b93a3 dbus/gattlib_discover_primary: Ensure a valid connection pointer is given 2022-05-11 20:29:07 +02:00
wurong bdc273fe0a fix mem leak. 2022-05-11 15:53:48 +02:00
tswaehn b82be455b4 fix: sigsev when service is null 2022-03-10 22:00:34 +01:00
tswaehn 5badee94b9 fix: sigsev when service property returns null 2022-03-10 22:00:34 +01:00
tswaehn c2c6b2f17b fix: device_manager not found => SIGSEV 2022-01-30 21:41:17 +01:00
tswaehn deee3766e1 fix: gattlib_adapter not found => SIGSEV 2022-01-30 21:41:17 +01:00
Olivier Martin 1afaa8b460 Introduce Gattlib logging backend 2021-10-18 16:46:45 +02:00
Olivier Martin 809a10a289 dbus/gattlib_notification: Fix warning 2021-10-17 22:28:22 +02:00
Olivier Martin e2b189d226 handle_dbus_gattcharacteristic_from_path: Ensure 'characteristic' is unref 2021-10-17 22:15:27 +02:00
Peter Rosin f90a95bcff avoid calling g_object_unref on the pointers that have just been free()d
"Steal" the notified_characteristics pointer while at it so that it
does not remain and point to a stale list.
2021-10-17 22:07:06 +02:00
Olivier Martin fa54ae42cc handle_dbus_gattcharacteristic_from_path: Ensure 'characteristic_uuid_str' is not NULL 2021-09-15 22:44:28 +02:00
Olivier Martin c3abb7eb6c dbus/gattlib.c: Fix copyright 2021-09-01 10:42:26 +02:00
Olivier Martin f4ecc64d29 Clarify and update license 2021-09-01 00:04:00 +02:00
Кирилл Зимников 2c38df5f30 Fix memory problems 2021-08-31 23:19:37 +02:00
Kevin Dewald 15210d1c35 Fixed recently introduced double-free error. 2021-04-15 22:39:10 +02:00
chenbin 3f85abd606 fix memory leak. 2021-04-13 22:49:25 +02:00
Kevin Dewald b137160afc Fixed handling of null MAC addresses during scanning. 2021-04-05 21:45:27 +02:00
Kevin Dewald 9451e19426 Add verification for null mac address. 2021-03-19 12:46:32 +01:00
Kevin Dewald 321c37dc57 Removed extra print statement. 2021-03-04 00:48:06 +01:00
Kevin Dewald 49790a92bf Fixed bug where notifications will be enabled but no events will be received. 2021-03-03 13:04:50 +01:00
Kevin Dewald fee6603fa3 Fixed uninitialized memory error. 2021-03-03 13:01:30 +01:00
Kevin Dewald 3c917fe683 Fixed missing characteristic detection when discovering services. 2021-03-02 22:23:45 +01:00
Olivier Martin b8f60de4e5 dbus/gattlib_notification: Print which UUID cannot be found 2021-02-01 16:46:25 +01:00
0xloem acf3df7da6 Force python to link with the right kind of libraries 2020-12-13 11:30:51 +00:00
Avinash Jois 6dcf6b904e Fix timeout removal 2020-12-07 23:17:08 +00:00
Avinash Jois bef872c588 Remove extra line 2020-12-07 23:17:08 +00:00
Avinash Jois 989483acdb Properly disable scan after scan_loop termination 2020-12-07 23:17:08 +00:00
Ankur Verma c6c29ad9fe Allow gattlib to be added as a subdirectory 2020-11-27 16:00:42 +00:00
Vanshil Shah 054f64e115 Set adapter name properly if non-default adapter is passed in 2020-07-20 20:19:09 +01:00
saad-s f5c2fcc906 cmake option to enable/disable python interface 2020-07-02 13:29:18 +01:00
saad-s d4bd91ad1e fix missing ARCHIVE DESTINATION for static building 2020-07-02 13:29:18 +01:00
Olivier Martin b63dc0f23e dbus: Fix 'Write-Without-Reponse' GATT operation 2020-05-25 23:54:48 +02:00
Ankur Verma 0bbe347daf Add support to build gattlib dbus mode as a static library 2020-05-22 10:50:51 +02:00
Olivier Martin 7056103e6a dbus/gattlib_advertisement: Fix advertisement_data access in get_advertisement_data_from_device() 2020-04-09 21:36:32 +02:00
Olivier Martin 9315ecfa54 dbus: Check connection parameter passed to gattlib_get_advertisement_data() 2020-04-09 11:47:34 +02:00
Olivier Martin 825fc4d07c gattlib: Introduce indefinite scan timeout 2020-04-09 10:33:27 +02:00
Olivier Martin c0215ee4ce gattlib: Introduce GATTLIB_DISCOVER_FILTER_NOTIFY_CHANGE 2020-04-09 10:33:27 +02:00
Olivier Martin 4ebc640ddd dbus: Only start BLE scan when all signals are connected 2020-04-09 10:33:27 +02:00
Olivier Martin ddc790358f dbus: Ensure GATT Notification/Indication are correctly disconnected 2020-04-08 22:30:54 +02:00
Olivier Martin 504ee7d1a7 dbus: Factorise code between GATT Notification and GATT Indication 2020-04-08 22:30:54 +02:00
Olivier Martin 46da1ee50c dbus: Prevent compiler warning 2020-04-08 22:30:54 +02:00
Olivier Martin 6f3ad714a2 dbus: Attach the BLE adapter to connection 2020-04-08 22:30:54 +02:00
Olivier Martin 71c4e71952 gattlib: Pass 'adapter' rather than MAC address to gattlib_connect() 2020-04-08 22:30:54 +02:00
Olivier Martin 7107d9f5b4 dbus: Check the disconnection of the handler has really succeeded 2020-04-08 22:30:54 +02:00
Olivier Martin 52f195f5c2 dbus: Do not free 'rssi_variant' before using 'arg_properties_builder' 2020-04-08 12:58:39 +02:00
Olivier Martin 6df99eadbe dbus: Remove scan timeout 2020-04-08 00:29:36 +02:00
Olivier Martin 0ef32af289 gattlib: Add the ability to stop scanning before timeout expired 2020-04-07 12:29:19 +02:00
Olivier Martin cfc47a0c0d Fix Python3.8 support
Fix: #146
2020-04-04 10:31:32 +02:00
Vanshil Shah 08ce1b3303 Make indications work properly 2020-03-29 12:12:48 +02:00
Khem Raj 3d656b1e19 cmake: Use GNUInstallDirs
Helps install cmakefiles in right libdir

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-17 20:39:39 +01:00
Daniels Umanovskis c6a3325222 dbus: Add support for reading manufacturer data from advertisement packets 2019-11-05 23:31:59 +01:00
Olivier Martin 6ace06d3c5 dbus: Do not free value that has been freed by gdbus API 2019-08-05 09:16:41 +02:00
Olivier Martin 3b495609ed dbus: Remove non-necessary g_variant_builder_unref() as g_variant_builder_end() free it 2019-08-05 09:16:41 +02:00
Olivier Martin 967b46bb99 dbus: Remove more memory leak 2019-07-21 20:35:57 +02:00
Olivier Martin 51c6cbeee2 dbus: Reduce memory leak 2019-07-18 20:58:26 +02:00
Olivier Martin 193c86590e gattlib: Introduce helper function to select Eddystone devices 2019-07-15 18:04:11 +02:00
Olivier Martin 69fb243fe7 gattlib: Implement `gattlib_get_advertisement_data()` 2019-07-15 18:04:11 +02:00
Olivier Martin 2e6cc4c381 dbus/gattlib.c: Return NOT_FOUND when trying to stop notification not started 2019-07-14 22:47:06 +02:00
Olivier Martin 4f8625cedf gattlib: Add stream API 2019-07-14 22:47:06 +02:00
Olivier Martin 2831cdf765 dbus: Added Bluez v5.48 DBUS API 2019-07-14 22:47:06 +02:00
Olivier Martin ca92375558 dbus: Move GATT characteristic code into 'gattlib_char.c' 2019-07-14 22:47:06 +02:00
Olivier Martin 0142c33dd8 gattlib: Disable gattlib_get_rssi() for now
This API has been disabled until this issue is clarified: https://github.com/labapart/gattlib/issues/75
RSSI can be accessed through `gattlib_get_rssi_from_mac()` before the
connection is established.
2019-07-09 20:04:35 +02:00
Olivier Martin a42f76aa7d gattlib: Added 'adapter' and 'user_data' parameter to 'gattlib_discovered_device_t' callback 2019-07-09 20:04:35 +02:00
Olivier Martin a52f66834a gattlib: Introduce 'gattlib_get_rssi_from_mac()' 2019-07-09 20:04:35 +02:00
Olivier Martin a9cd2d3c1a dbus: Refactor Adapter code 2019-07-09 20:04:35 +02:00
Olivier Martin 2ae549f9d6 gattlib: Introduce gattlib_adapter_scan_enable_with_filter() 2019-07-09 20:04:35 +02:00
Olivier Martin eca8415fd6 gattlib: Introduced gattlib_get_rssi()
Fix: #75
2019-07-09 12:34:32 +02:00
Olivier Martin e74543fa56 Initial Python support 2019-07-07 22:17:49 +02:00
Olivier Martin a1ad48f20c dbus: Fixed warnings 2019-07-07 22:17:49 +02:00
Olivier Martin 046f077085 gattlib: Move 'struct _gatt_connection_t' out of 'gattlib.h' 2019-07-07 22:17:49 +02:00
Olivier Martin 8438cd5c0d dbus: Check if the Services are really resolved 2019-07-07 22:17:49 +02:00
Olivier Martin 8020503ab6 gattlib: Added support for write-without-response 2019-07-05 22:50:23 +02:00
Olivier Martin 1e0e57070f dbus: Wait for 'ServicesResolved' before telling we are connected 2019-06-27 22:27:39 +02:00
Olivier Martin 2accddb3c7 dbus: Catch error when there is no device present 2019-06-27 22:27:39 +02:00
Olivier Martin 50401ad1c5 include/gattlib.h: Allow to call gattlib_discover_primary() with NULL arguments 2019-06-27 22:27:39 +02:00
Olivier Martin 2d81b253da dbus: Add support for handle 2019-06-12 17:15:50 +02:00
Olivier Martin ceaa8a17e4 gattlib: Change gattlib_read_char_by_uuid() to return an allocated buffer that fits GATT value size 2019-05-27 22:25:46 +02:00
Olivier Martin 683efaaca4 dbus: Fix new device discovery
We check for existing device activity to let the caller they are still present.
2019-05-27 22:25:46 +02:00
Olivier Martin e3ff819872 Reduce memory leaks 2019-05-21 21:40:55 +02:00
Olivier Martin 54f06b64f5 Check allocations are successfull 2019-05-21 21:40:55 +02:00
Olivier Martin c479cec21f include/gattlib.h: Unify error code 2019-05-21 21:40:55 +02:00
Olivier Martin 9bed1e17c8 dbus/gattlib.c: Ensure we register for 'property-changed' signals before making any method calls 2019-05-20 21:44:20 +02:00
Olivier Martin c2a07a9139 Remove legacy options from `gattlib_connect()`
Legacy options can still be set from 'options' parameter.
2019-05-20 20:15:23 +02:00
Olivier Martin e822d3268a dbus: Ensure the timeout is removed when connected 2019-05-20 20:15:10 +02:00
Olivier Martin d8fb10906b dbus/gattlib.c: Do not list 'old' devices when scanning for BLE device 2019-05-20 20:14:54 +02:00
Olivier Martin ca9725f806 dbus: Implement gattlib_connect_async() 2019-05-19 00:27:54 +02:00
Olivier Martin 510d650b85 gattlib_adapter_open: Ensure adapter pointer is not NULL 2019-05-19 00:27:54 +02:00
Olivier Martin 9db483bdcc dbus/CMakeLists.txt: Fix Bluez pre-v5.40 2019-05-19 00:16:13 +02:00
Olivier Martin 98ac9e5d2b gattlib: Introduce 'gattlib_register_on_disconnect()' 2019-05-03 09:47:58 +02:00
Olivier Martin 71f33207c7 dbus: Print error when failing 2019-05-03 09:47:02 +02:00
Olivier Martin c2e48c3fd6 dbus: Add an error message when trying to access CCC through DBUS interface 2019-03-05 17:14:10 +01:00
Olivier Martin 10af2f1971 dbus/gattlib.c: Add support to read battery level from gattlib_read_char_by_uuid() 2019-03-05 16:58:13 +01:00
Olivier Martin 62022bdab9 dbus/gattlib.c: Add support to disconnection from notification 2019-03-05 16:33:43 +01:00
Olivier Martin ff07ac89f1 dbus: Add support for Bluez Battery Profile 2019-03-05 16:18:54 +01:00
Olivier Martin 532c405323 dbus/gattlib.c: Print error message on stderr 2019-03-05 16:15:14 +01:00
Olivier Martin 60b813a770 Fix stack-based bufferoverflow
Fix: #81
Fix: #82
2019-03-05 13:11:50 +01:00
Milan Pandurov 1402183edd bugfix: Passing user provided pointer to notification handler
Instead of connection object pointer, user should receive
pointer to context it registered in gattlib_register_notification
2019-03-04 09:16:35 +01:00
Philipp Finke f0b1f7c5ef Added support for multiple connections to devices
with same GATT. This fixes issue #29.
2019-01-30 16:30:54 +01:00
Daniel Vlasenko 7a2fdbd062 andded user data pointer gatt_connect_async signature. these data will be passed to gatt_connect_cb callback to get information about object requested connection 2018-10-18 09:10:55 +02:00