gattlib
gattlib copied to clipboard
get notification crash issue
Hi, I used notification .c code to test receiving data from Nexgo-POS-BLE device.It was able to recive correct data but was crashing with following error:
Notification Handler: 30 30 30 30 30 30 30 30 30 30 30 munmap_chunk(): invalid pointer Aborted (core dumped)
(30 30 30 30 30 30 30 30 30 30 30 was the data i sent and i was able to receive it correctly)
However when i used following indication fns instead of notification fns ,it worked flawlessly:
gattlib_register_indication(connection, notification_handler, NULL); gattlib_indication_start(connection, &g_notify_uuid);
I do not see the gattlib_indication_start() in the gattlib.h file. Are you certain this is part of the library? I want to use it.
@felwiz
gattlib_indication_start() is in the library:
https://github.com/labapart/gattlib/blob/1afaa8b460d0395989663e0e3baa6f8aeec48b78/include/gattlib.h#L547-L555
https://github.com/labapart/gattlib/blob/1afaa8b460d0395989663e0e3baa6f8aeec48b78/dbus/gattlib_notification.c#L253-L255