That's odd - only difference I can see is when I used it, I typed in a lowercase address. Could you try that?
In https://github.com/rlangoy/bluepy_examples_nRF51822_mbed/blob/master/writeLed2.py that I based it on there's a try...finally for disconnection but the exception that's reported is from earlier in the code, so that wouldn't have caused an issue.
You could also try sudo /etc/init.d/bluetooth restart at the console which should restart the Bluetooth service and would automatically disconnect if it has stayed connected to the device for some reason.
sudo /etc/init.d/bluetooth restart
© Espruino, powered by microcosm.
Report a problem