Removed shutDownBluetooth method when writing to device compeletes (this call was preventing the writing from finishing properly).
Removed shutDownBluetoothConfiguration from method onWriteToDeviceComplete (this call was preventing the writing from finishing properly).