Check if the keyboard is in factory reset mode and if so, display a relevant instruction.
This commit is contained in:
@@ -5,6 +5,10 @@ export const getHardwareConfigFromDeviceResponse = (json: string): HardwareConfi
|
|||||||
const hardwareConfig = new HardwareConfiguration();
|
const hardwareConfig = new HardwareConfiguration();
|
||||||
hardwareConfig.fromBinary(UhkBuffer.fromArray(data));
|
hardwareConfig.fromBinary(UhkBuffer.fromArray(data));
|
||||||
|
|
||||||
|
if (hardwareConfig.signature === 'FTY') {
|
||||||
|
throw Error('The device is in factory reset mode. Power-cycle the device to use it with Agent!');
|
||||||
|
}
|
||||||
|
|
||||||
if (hardwareConfig.signature !== 'UHK') {
|
if (hardwareConfig.signature !== 'UHK') {
|
||||||
throw Error('Invalid hardware configuration');
|
throw Error('Invalid hardware configuration');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user