petzval / btferret

Python and C Bluetooth Library
MIT License
111 stars 21 forks source link

Is it possible to call notify_ctic without discovering find_ctics as a BLE client? #52

Closed gregoiregentil closed 1 week ago

gregoiregentil commented 1 week ago

As a btferret BLE client, is there a way to call notify_ctic(NODE_SERVER, uiid, NOTIFY_ENABLE, notify_callback) without discovering the characteristics with find_ctics(NODE_SERVER) ? Obviously, uiid is known on the client side.

If find_ctics is not called, btlib returns "Invalid node or characteristic index in write_ctic".

I have tried to put the known characteristics below the NODE_SERVER in the configuration file without any success.

petzval commented 1 week ago

You can avoid calling find_ctics by putting all the required information in the devices.txt file. Most important is the HANDLE setting. From btferret use v - Read services (which is find_ctics) and then i - Device information to display the handle values, then put the handle values in the devices.txt LECHAR entries.

gregoiregentil commented 1 week ago

Working. Thank you.