MicrochipTech / cryptoauthlib

Library for interacting with the Crypto Authentication secure elements
Other
379 stars 220 forks source link

cryptoauth_test command prints calib_read_zone - execution failed #207

Closed travishaagen closed 3 years ago

travishaagen commented 3 years ago

Hello :)

I'm using a 608 on a rpi3, with Alpine Linux.

I built using:

mkdir build
cd build
cmake -DATCA_ATECC608A_SUPPORT=ON -DATCA_ATSHA204A_SUPPORT=OFF -DATCA_ATECC508A_SUPPORT=OFF \
 -DATCA_HAL_I2C=ON -DATCA_OPENSSL=ON -DATCA_BUILD_SHARED_LIBS=ON -DATCA_PKCS11=ON \
 -DBUILD_TESTS=ON -DATCA_PRINTF=ON -DATCA_USE_ATCAB_FUNCTIONS=ON ../ && cmake --build .
sudo make install

When I try to run a command on $ ./cryptoauth_test, I am stuck on the following error:

ecc608 -i i2c 1 -a 0xC0
$ 
Device Selected.

info
$ 
/home/alpine/src/cryptoauthlib/lib/calib/calib_read.c:103:f0:calib_read_zone - execution failed
/home/alpine/src/cryptoauthlib/lib/calib/calib_read.c:697:f0:calib_read_zone - falied
atcab_init() failed with ret=0x000000F0

Output of i2cdetect:

$  sudo  i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --     
travishaagen commented 3 years ago

lol, started working when I used sudo

doh!!!!!