Ti SensorTag Cb module - reconnect sensor that disconnect from BLE
ProgrammingGo last edited by
I am checking the code on BLE see herebhttp://omz-software.com/pythonista/docs/ios/cb.html where the TI SensorTag is used and I saw that there is a did_disconnect_periperal function which is called in a case the SensorTag is disconnecting. My idea was that as soon as one of the TI Sensortags is disconnecting, that inside this function I am trying to reconnect the node again. I tried to re-connect it by calling cb.connect_peripheral(p) inside did_disconnect_peripheral and it connects the node , but it does not look like that it is going through the other functions to re-discover the services and characteristics because I am not receiving any values anymore.
My question is if there is a way to have a recursive function that as soon as one TI SensorTag is losing connecting it facilitates the reconnection of it ?