Skip to content

python info.py with hid not working #128

@agilesai1294

Description

@agilesai1294

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:
image

Can you tell me what am i doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions