Closed chrisb2 closed 3 years ago
Hi Chris, the version of micropython on both boards is the same? I haven't an esp32, i can't test in hardware different of stm32, if you can please give me more software setup info.
P.S. try lowering the frequency of then i2c bus.
regards, D.
Yes same version of micropython, have already tried lowering frequency.
Micropython gives following system info on start:
MicroPython v1.12-357-g740946736 on 2020-11-13; ESP32 module with ESP32
This is not now the latest version, so I am going to update before investigating some more.
Chris
I update version of Micropython, so now on 1.13:
MicroPython v1.13 on 2020-11-15; ESP32 module with ESP32
I have managed to work around the error by hardcoding the device at line 36 of device.py:
self._device = "ATECC508A" # SUPPORTED_DEVICES[self.atcab_info()[1+2]]
I can then create an instance of ATECCX08A with no error. What is interesting is that if I then call _atcabinfo() I get no response_data bytes, so that is no doubt what is causing the error:
>>> device.atcab_info()
<ATCAPacket txsize=7 opcode=0x30 param1=0x00 param2=0x0000 request_data= response_data= device=ATECC508A>
But the question is why is there no response data?
Chris
I am building Micropython for ESP32 as per the instructions https://github.com/micropython/micropython/tree/master/ports/esp32, having first copied the files in modules/cryptoauthlib to the modules/cryptoauthlib in the esp32 directory. This builds successfully and I can see it compiling the cryptoauthlib files. I then deployed this and attempt to test that the device is working. I confirmed that its visible on I2C bus with
which gave 96, which is correct. I then tried to initialize the device with:
but this fails with:
I actually have your library working correctly on another esp32 and device, but unfortunately I did not keep a copy of this binary. I have the swapped the devices between the esp32's and they both work correctly with my first esp32. I have tried this new binary on two different esp32's and it gives the same error on both.
Any suggests on how to fix this? Thx
Chris