Commit Graph

171 Commits (0e34df58e5aff5b9fffb191a412d330729688af9)

Author SHA1 Message Date
Olivier Martin 0e34df58e5 Single lock for all gattlib library 2024-04-08 00:15:16 +02:00
Olivier Martin 014c2802ee Refactor code to better separate gattlib_adapter_t, gattlib_device_t, gattlib_connection_t and their backends 2024-04-05 13:20:40 +02:00
Olivier Martin 22dca4511c Require a lower version of cmake (same version as Ubuntu 22.04 LTS) 2024-04-05 10:25:54 +02:00
Olivier Martin a587aa9dfa gattlib_connect: Set the device has DISCONNECTED on error 2024-04-04 21:54:28 +02:00
Olivier Martin fcedfb9e85 gattlib_adapter: Improve BLE scan code with comments and renaming 2024-04-04 12:03:29 +02:00
Olivier Martin 2e99c4f1b6 dbus: Handle when the device is removed from DBUS 2024-04-04 12:03:29 +02:00
Olivier Martin 709b76019e Manage device state during its life cycle 2024-04-04 12:03:29 +02:00
Olivier Martin 0c1334c5b4 Consolidate device list between discovered and connected devices 2024-04-04 12:03:29 +02:00
Olivier Martin aa6a7b79bb Consolidate device state to prevent concurrent accesses 2024-04-04 12:03:29 +02:00
Olivier Martin fab0e8fa67 Consolidate device mutex 2024-04-03 21:13:33 +02:00
Olivier Martin 86f9a742f3 Ensure connection timeout is freed when the connection is free 2024-03-29 09:18:53 +01:00
Olivier Martin 6cdbe58e7b FixMe: Disable freeing the handler - there is a pointer ref counter not valid when doing so 2024-03-29 00:20:41 +01:00
Olivier Martin db629448fd Use calloc() instead of malloc() when allocating 'struct' or array in memory 2024-03-29 00:20:30 +01:00
Olivier Martin 5f43addb8f gattlib_disconnection: Added support to wait for the disconnection to be effective 2024-03-29 00:20:30 +01:00
Olivier Martin a85dd83015 Consolidate handlers 2024-03-29 00:19:56 +01:00
Olivier Martin 6e6436ceb3 gattlib_adapter: Check if 'is_scanning' before stopping BLE scan 2024-03-26 13:46:31 +01:00
Olivier Martin 5ba3eda6f5 dbus/gattlib_adapter: Use mutex to get device manager 2024-03-26 13:46:31 +01:00
Olivier Martin 6cea2d37db Ensure gattlib can be built without Python support 2024-03-25 12:43:17 +01:00
Olivier Martin 2a46780e96 Fix gattlib and examples 2024-03-18 00:19:44 +01:00
Olivier Martin d2fb01d85e Fix gattlib connection release on disconnection 2024-03-13 13:52:57 +01:00
Olivier Martin 6823c02892 dbus: Improve logging 2024-03-13 13:52:57 +01:00
Olivier Martin 7925aa6a38 Fix compilation warnings about enum type 2024-03-12 20:38:31 +01:00
Olivier Martin 36e0cb4934 Add more debug logs 2024-03-07 23:58:35 +01:00
Olivier Martin 24ab0ea95f Reduce compilation warnings 2024-03-07 23:57:58 +01:00
Olivier Martin e26e9f0b7a Fix some compiler warnings 2024-03-07 08:53:42 +01:00
Olivier Martin 6e718253b0 adapter: Add support to avoid double free of BLE adapter 2024-03-06 15:03:56 +01:00
Olivier Martin ea1fe15857 gattlib: Catch connectio timeout 2024-03-05 22:46:38 +01:00
Olivier Martin f4cc321a90 dbus/gattlib_adapter: Stop BLE scan before waiting for the loop to stop 2024-02-26 23:16:35 +01:00
Olivier Martin f38f73a9a4 gattlib: Change gattlib_connect to better use event loop 2024-02-22 19:54:43 +01:00
Olivier Martin e554dec3dc gattlib_adapter: Improve/Fix BLE scan 2024-02-22 19:54:43 +01:00
Olivier Martin 100c5d5f69 gattlib_adapter: Introduce wait_scan_loop_stop_scanning 2024-02-22 19:54:43 +01:00
Olivier Martin 13bd692bb4 ci: Generate Python package with cibuildwheel 2024-02-22 13:28:22 +01:00
Olivier Martin 18e1658d6f ci: Fix build 2024-02-22 09:30:22 +01:00
Olivier Martin d3d9600114 cmake: Specify cmake version + Fix finding Python development module 2024-02-22 09:30:22 +01:00
Olivier Martin fbd65421d0 Ensure adapter is present 2024-02-21 00:28:08 +01:00
Olivier Martin aacc53c511 Fix warnings from release build 2024-02-21 00:28:08 +01:00
Olivier Martin 2f83e85eee dbus: Remove event_thread 2024-02-19 18:00:52 +01:00
Olivier Martin 1530184776 gattlib_adapter: Add support to reconnect disconnected device 2024-02-19 18:00:52 +01:00
Olivier Martin b28a0422f0 dbus: Add support to remove device property signal 2024-02-19 18:00:52 +01:00
Olivier Martin c4e4b8fa5a dbus/gattlib_notification: Use lookup instead of looping through variant keys 2024-02-19 18:00:52 +01:00
Olivier Martin 0a868a506b Added a public function to ease the use of GLib mainloop 2024-02-19 18:00:52 +01:00
Olivier Martin 4c5f35f15f error: Introduce error module to catch DBUS error details 2024-02-15 22:00:06 +01:00
Olivier Martin ad7aa1899e on_handle_device_property_change: Logging changes 2024-02-15 22:00:06 +01:00
Olivier Martin f894c8e23a gattlib_disconnect: Add mutex to avoid double free 2024-02-15 22:00:06 +01:00
Olivier Martin db8aee543b dbus/on_handle_characteristic_indication: Fix logging 2024-02-15 22:00:06 +01:00
Olivier Martin 011f4e4c4a gattlib_disconnect: Call on_disconnect callback 2024-02-15 22:00:06 +01:00
Olivier Martin 0fde4ff82d gattlib_adapter_close: Ensure BLE scan is disabled 2024-02-15 22:00:06 +01:00
Olivier Martin 9a9e49edcd dbus/on_interface_proxy_properties_changed: Check device_manager is not NULL (could happen on disconnection) 2024-02-15 22:00:06 +01:00
Olivier Martin 2518348023 gattlib: Introduce 'gattlib_adapter_get_name()' 2024-02-12 22:35:46 +01:00
Olivier Martin 884904a3c0 dbus/gattlib_adapter: Fix 'gattlib_adapter_close()' 2024-02-12 22:35:46 +01:00