Fix write and assemble
Pre-release
Pre-release
Apply the same recent fixes made to writeAndListen for writeAndAssemble as well:
- Better management of semaphore locks and releases
- Better usage of end listen
- Allow failing the operation if bluetooth becomes unavailable or if there's a disconnection after both the read and listen have been setup correctly