-
Notifications
You must be signed in to change notification settings - Fork 228
Description
Hi,
I have tried out a sample code to test ATECC608A.
from cryptoauthlib import *
def info(iface='i2c', device='ecc', **kwargs):
ATCA_SUCCESS = 0x00
load_cryptoauthlib()
cfg = cfg_ateccx08a_kithid_default()
cfg.iface_type = ATCAIfaceType.ATCA_I2C_IFACE
cfg.devtype=ATCADeviceType.ATECC608A
cfg.cfg.atcahid.dev_interface=ATCAKitType.ATCA_KIT_I2C_IFACE
cfg.cfg.atcahid.dev_identity=0xC0
print('0x{:08X}'.format(cfg.cfg.atcahid.dev_identity))
atcab_init(cfg)
info = bytearray(4)
assert atcab_info(info) == ATCA_SUCCESS
print('\nDevice Part:')
print(' ' + get_device_name(info))
serial_number = bytearray(9)
print('0x{:08X}'.format(atcab_read_serial_number(serial_number)))
atcab_release()
The output of the following program is:
Can you tell me what am i doing wrong?