# prototypes I was having a lot of problems finding a reasonable language/framework/library so I needed to test a couple different things. I thought that python might have good support so I started there. ## ble-gatt ble-gatt/bluetoothctl.py - ble-gatt needs external support from bluetoothctl ble-gatt/prototype.py - initial test looks okay ble-gatt/rd200.py - finished, but flawed program using GLib timeout and ble-gatt notification Regarding ble-gatt/rd-200, not super sure what happened to this one but strace on a hung process shows that the program entered a poll with a time option of `-1`. Previous polls had correct parameter of close to 300 seconds. I think the thread calling the poll was python's `GLib.timeout_add_seconds`. Making things worse the python BLE-GATT library generates callbacks using `BLE-GATT.wait_for_notifications` but does not have any system to configure the ble device. This means that if there is a problem control needs to be handed back to me, but the event loop just sits there. BLE-GATT documentation claims that one could call `BLE-GATT.cleanup` but I am having a problem doing that from the `GLib.timeout_add_seconds` callback. ## pybluez pybluez/prototype.py - this did not work with ble, only bluetooth, they are different