cryptoauthtools icon indicating copy to clipboard operation
cryptoauthtools copied to clipboard

Do not set atcai2c.bus = 1 when bus is specified

Open matsujirushi opened this issue 3 years ago • 0 comments

I want to use these scripts for Seeed reTerminal. ATECC608A is connected a Compute Module 4 via I2C bus 3.

Specifying a bus with the -p option does not work.

$ python3 ~/cryptoauthtools/python/examples/info.py -i i2c -p bus=3
Traceback (most recent call last):
  File "/home/pi/cryptoauthtools/python/examples/info.py", line 93, in <module>
    info(args.iface, args.device, **parse_interface_params(args.params))
  File "/home/pi/cryptoauthtools/python/examples/info.py", line 45, in info
    assert atcab_init(cfg) == ATCA_SUCCESS
AssertionError

This is a pull request that disables this logic when you specify bus with the -p option.

https://github.com/MicrochipTech/cryptoauthtools/blob/e44a4997dd669524a70c52ae663835978c8b1641/python/examples/info.py#L42

matsujirushi avatar Nov 08 '22 03:11 matsujirushi