I was able to look at the inputBuffer and found that I could get a connection to the CryptoChip with a Heltec ESP32 but not a Heltec Cubcell. I tried using a 64 byte public key and a 32 byte random number.
I am unsure why the data get scrambled. The CRC always seems to fail on the CubeCell even though I am getting some data across the i2c connection. I updated the gist.
My latest tests are below:
Try:
boolean ATECCX08A::updateRandom32Bytes(boolean debug)
(on cubecell)
Beginning of update random 32 bytes
inputBuffer: 23,21,3E,38,1B,B7,7B,B3,C,10,DE,E3,E5,2,5C,32,80,6F,61,C1,D0,74,8,F4,D1,83,18,CA,EA,57,0,F5,26,64,FF,
countGlobal: 0x23
count heard from IC (inpuBuffer[0]): 0x23
CRC[0] Calc: 0x13
CRC[1] Calc: 0xE7
Message CRC Error
End of update random 32 bytes
(on heltec esp32)
Beginning of update random 32 bytes
inputBuffer: 23,98,C4,29,3B,71,71,1,19,FB,95,3E,13,84,97,C1,6A,3B,AA,1B,F8,D3,24,11,D6,63,F7,51,14,D9,FB,6A,9,2C,CB,
countGlobal: 0x23
count heard from IC (inpuBuffer[0]): 0x23
CRC[0] Calc: 0x2C
CRC[1] Calc: 0xCB
random32Bytes: 98,C4,29,3B,71,71,1,19,FB,95,3E,13,84,97,C1,6A,3B,AA,1B,F8,D3,24,11,D6,63,F7,51,14,D9,FB,6A,9,
End of update random 32 bytes
(running the heltec esp32)
Serial Number: 01238B933F8B73D0EE
Rev Number: 00005000
Config Zone: Locked
Data/OTP Zone: Locked
Data Slot 0: Locked
Print this before recieving the response data
inputBuffer: 43,F9,C3,6F,89,64,62,33,78,BD,C0,68,D4,BC,E0,7E,D1,7C,8F,A4,86,F9,AC,C,26,13,CA,3C,8C,30,6D,7B,B6,1C,D3,67,17,B8,AC,5E,4F,EA,8A,D2,3D,C8,D0,78,3C,23,18,EE,4A,D7,A8,D,B6,E0,2,6A,D0,B0,72,A2,4F,D8,64,
Print this if I get past response Data
print this for checking the CRC count
countGlobal: 0x43
count heard from IC (inpuBuffer[0]): 0x43
CRC[0] Calc: 0xD8
CRC[1] Calc: 0x64
This device’s Public Key:
uint8_t publicKey[64] = {
0xF9, 0xC3, 0x6F, 0x89, 0x64, 0x62, 0x33, 0x78, 0xBD, 0xC0, 0x68, 0xD4, 0xBC, 0xE0, 0x7E, 0xD1,
0x7C, 0x8F, 0xA4, 0x86, 0xF9, 0xAC, 0x0C, 0x26, 0x13, 0xCA, 0x3C, 0x8C, 0x30, 0x6D, 0x7B, 0xB6,
0x1C, 0xD3, 0x67, 0x17, 0xB8, 0xAC, 0x5E, 0x4F, 0xEA, 0x8A, 0xD2, 0x3D, 0xC8, 0xD0, 0x78, 0x3C,
0x23, 0x18, 0xEE, 0x4A, 0xD7, 0xA8, 0x0D, 0xB6, 0xE0, 0x02, 0x6A, 0xD0, 0xB0, 0x72, 0xA2, 0x4F
};
(CubeCell)
Serial Number: 01238B933F8B73D0EE
Rev Number: 00005000
Config Zone: Locked
Data/OTP Zone: Locked
Data Slot 0: Locked
Print this before recieving the response data
inputBuffer: 43,F9,C3,6F,89,64,62,33,78,BD,C0,68,D4,BC,E0,7E,D1,7C,8F,A4,86,F9,AC,C,26,13,CA,3C,8C,30,6D,7B,1C,D3,67,17,B8,AC,5E,4F,EA,8A,D2,3D,C8,D0,78,3C,23,18,EE,4A,D7,A8,D,B6,E0,2,6A,D0,B0,72,A2,4F,64,FF,FF,
Print this if I get past response Data
print this for checking the CRC count
countGlobal: 0x43
count heard from IC (inpuBuffer[0]): 0x43
CRC[0] Calc: 0x6E
CRC[1] Calc: 0xCC
Message CRC Error
Failure to generate This device’s Public Key