Closed Dogora closed 9 years ago
Line 372 in nxcmd.c is this: ipcmsg.data[offset++] = ( ((pin[i] - '0') << 4) | (pin[i+1] - '0') );
It needs to be this: ipcmsg.data[offset++] = ( ((pin[i+1] - '0') << 4) | (pin[i] - '0') );
A four-digit PIN, entered as '1234' needs to be parsed into: data[3] = 0x21; data[4] = 0x43; data[5] = 0x00;
Or, a six-digit PIN, '123456' needs to be parsed to: data[3] = 0x21; data[4] = 0x43; data[5] = 0x65;
The NX-584 Comms Protocol document talks about which digit goes in which nibble. I have tried this fix and it works.
Good catch! Thanks for the fix, its now checked in: 6c173345e314f2e6e814c42ae508055499a34ca1
Line 372 in nxcmd.c is this: ipcmsg.data[offset++] = ( ((pin[i] - '0') << 4) | (pin[i+1] - '0') );
It needs to be this: ipcmsg.data[offset++] = ( ((pin[i+1] - '0') << 4) | (pin[i] - '0') );
A four-digit PIN, entered as '1234' needs to be parsed into: data[3] = 0x21; data[4] = 0x43; data[5] = 0x00;
Or, a six-digit PIN, '123456' needs to be parsed to: data[3] = 0x21; data[4] = 0x43; data[5] = 0x65;
The NX-584 Comms Protocol document talks about which digit goes in which nibble. I have tried this fix and it works.