Reputation: 51
I am extending tools/gatt_service.c from Bluez to create some custom read characteristics for my device.
But some of them can take a while to process like a scan wifi SSID. When my server receives the read request from the client, I start the wifi scan (that can take a maximum of 15sc) and I would like to return the list of SSID in the response of the same request. But with the D-Bus API my request always ends after 5sc without waiting until the end of the wifi scan, like a timeout. Is there any way to manage this timeout ?
I also tried with the low level Bluez API and it was successful, but I really would like to use the D-BUS API.
Thanks !
Upvotes: 2
Views: 522
Reputation: 51
I finally did a workaround by patching directly the Bluez code.
I changed the ATTRIBUTE_TIMEOUT in src/shared/gatt-db.c
#define ATTRIBUTE_TIMEOUT 28000
No side effect so far. I just don't know why this value is hard-coded and not changeable from bluethodctl or elsewhere.
Upvotes: 2