Closed jbaldwinroberts closed 7 years ago
I think its caused when waiting for a reply after writing the characteristic to start the boot-loader
if err = client.WriteCharacteristic(dfu, []byte{nrf51822.Start}, false); err != nil {
return err
}
If the ENM does not not wait for a reply the boot-loader does not start
Issue still occurring - seems to coming from:
b.Log.Debug("Starting bootloader")
client, err := bluetooth.Connect(b.Micro.LocalUUID, 10)
if err != nil {
return err
}
dep.device logs
09.03.17 23:18:08 (+0000) INFO Starting update
09.03.17 23:18:08 (+0000) DEBU Extracting firmware Bin=micro-bit.bin Data=micro-bit.dat Firmware path="/data/assets/18534/6a1b7e36728d8b707d67964d41f912cd36036d53"
09.03.17 23:18:08 (+0000) DEBU Extracted firmware Size=59620
09.03.17 23:18:09 (+0000) DEBU Starting bootloader
09.03.17 23:18:12 (+0000) INFO Starting update
09.03.17 23:18:12 (+0000) DEBU Extracting firmware Bin=micro-bit.bin Data=micro-bit.dat Firmware path="/data/assets/18534/6a1b7e36728d8b707d67964d41f912cd36036d53"
09.03.17 23:18:12 (+0000) DEBU Extracted firmware Size=59620
09.03.17 23:18:13 (+0000) DEBU Starting bootloader
09.03.17 23:18:14 (+0000) DEBU Started bootloader
09.03.17 23:18:16 (+0000) DEBU Checking FOTA
09.03.17 23:18:16 (+0000) DEBU Checked FOTA Start block=0
09.03.17 23:18:16 (+0000) DEBU Initialising FOTA
09.03.17 23:18:18 (+0000) DEBU Initialised FOTA
ENM logs
09.03.17 23:18:08 (+0000) INFO Starting update Attempt=1 Name=Middle
09.03.17 23:18:10 (+0000) ERRO Update failed Error="ATT request failed: input channel closed: io: read/write
on closed pipe" Name=Middle
09.03.17 23:18:12 (+0000) INFO Starting update Attempt=2 Name=Middle
09.03.17 23:18:48 (+0000) INFO Finished update Name=Middle
Very occasionally the ENM throws an error during the
Starting boot-loader
part of the DFU process. The DFU updates is successful on retry.ERROR Update failed Error="ATT request failed: input channel closed: io: read/write on closed pipe" Name=frosty-moon