ATECC608B cryptochip with Espressif ESP32

Hello,

I have a working Arduino (ESP8266) integration with the Microchip ATECC608B crypto chip. However, due to obvious limitations (mainly GPIO number) we are updating to a ESP32.

I have followed this very helpful post here: ATECC608 With Adafruit Huzzah ESP8266 - PlatformIO IDE - PlatformIO Community as well as the godsend of a repo created by Maximilian Gerhardt (maxgerhardt) which is forked and visible in my repo below.

Of course, now that I have switched over to the ESP32 and made a few necessary tweaks it no longer works.

What I have tried:

  1. Forked a working Platformio repo which successfully compiles the cryptoauthlib library (v3.7.0) and integrates with an ESP8266.
  2. Updated build to support ESP32 as opposed to ESP8266 (e.g. platformio.ini file, etc.)
  3. Changed the cfg.devtype to ATECC608B as opposed to ATECC608A.
  4. Changed the hal_esp32_i2C.cpp file to use my PCB SDA and SCL pin numbers.

Of course, nothing works. To be more specific, nothing happens. No errors or anything prints out in the terminal. When I run the original repo for my old ESP8266 everything functions properly. Thought about downloading the newest cryptosuthlib library by Microchip but I don’t really think that’s necessary especially since their library is an absolute nightmare to compile for PlatformIO :stuck_out_tongue:

Here is my repo: peacefulZen/ATECC608b_ESP32 (github.com)

Hoping that someone can help and let me know what I am doing wrong here.

Hiya folks, I resolved this one myself and updated the repo here: peacefulZen/ATECC608b_ESP32 (github.com)

Leaving this out there for other folks. This is an evil chip for Arduino folks; it just took way too long to put this together. Hopefully this helps the next unfortunate soul who takes on this task.

1 Like