This repository has been archived by the owner on Jan 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Mismatched hash? #44
Comments
Hi, Using an RPi3 as well and get this same error. I've also tried creating my own custom DFU controller in Node. Also see the same error.
I created the DFU package using nrfutil pkg generate. Any ideas? |
+1 - having the same issue here on a Raspberry Pi |
christopherhex
added a commit
to christopherhex/pc-nrf-dfu-js
that referenced
this issue
Jul 15, 2020
Hey @kevinresol, Thanks for the reference. Using The following small node-program works for me on my OS X machine: const noble = require('@abandonware/noble');
// Update process title manually to fix a stupid bug in @abandonware/noble
// It causes writing to a characteristic to not fail
const process = require('process');
process.title = 'browser'
const {
DfuUpdates,
DfuTransportNoble,
DfuOperation
} = require('pc-nrf-dfu-js');
// YOU HAVE TO UPDATE THE firmwarePath to your local environment
const doUpdate = async (
peripheral,
firmwarePath = './ble_soc_update.zip'
) => {
console.log('DO TEST UPDATE');
const updates = await DfuUpdates.fromZipFilePath(firmwarePath);
console.log('SETUP TRANSPORT');
const nobleTransport = new DfuTransportNoble(peripheral, 0);
// BUGFIX set transport MTU to 20, otherwise it will fail
nobleTransport.mtu = 20;
console.log('PREPARE DFU OPERATION');
const dfu = new DfuOperation(updates, nobleTransport, false);
console.log('START DFU OPERATION');
await dfu.start(true);
console.log('FINALIZED DFU OPERATION');
};
noble.on('stateChange', async (state) => {
if (state === 'poweredOn') {
await noble.startScanningAsync(['fe59'], false);
}
});
noble.on('discover', async (peripheral) => {
await noble.stopScanningAsync();
console.log('FOUND PERIPHERAL');
await doUpdate(peripheral);
await peripheral.disconnectAsync();
process.exit(0);
}); |
bencefr
added a commit
that referenced
this issue
Jul 20, 2020
…ismatch Set mtu to 20 to fix hash mismatch issue #44
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Got this error while trying to perform a DFU over BLE (noble) on a raspberry pi 3. The peripheral should be running v15.
Here is the partial log just before the error:
I wonder where is the "initial hash" get calculated and sent?
The text was updated successfully, but these errors were encountered: