When running this example on an LED-connected GPIO, the delay
of 1 second is too large, and the selected values not very good
to notice the difference in brightness.
Use a ramp array of values with a more visual difference when
running on an LED and shorten the wait between changes.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
It was believed that the CAAM was able to create blobs from files of up to
1 MiB, because in some cases, encrypting and decrypting a large file would
result in a file identical to the original one. In reality, the CAAM's job
descriptors use 16 bits to store input/output sizes, so any size that takes up
more than 16 bits either causes the operation to fail or makes the CAAM
continue with the operation, but truncating the size to its 16 least
significant bits.
Encryption and decryption cycles that seem to work with large files are
actually encrypting and decrypting part of the original file and storing the
output in the memory address where the original file was stored, making it seem
like the process was successful when it really isn't. It's also possible that,
even if both operations work fine, the final decrypted file will differ from the
original one because it contains the decrypted truncated blob plus whatever
comes after it in memory.
Fix the size limit, dynamically alter it during runtime depending on the
operation and exit if the limit is surpassed to avoid including unrelated
memory contents in the output.
https://jira.digi.com/browse/DEL-7378
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
The newest version of cryptoauthlib provides a new test application to validate
and lock the cryptochip configuration.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit will remove the call to stop the CAN controller,
because freeing the CAN will stop the CAN interface already.
Calling stop twice will producing the following error message:
DIGIAPIX[824]: [ERROR] ldx_can_process_tx_socket: CAN network is down
DIGIAPIX[824]: [ERROR] ldx_can_stop: Unexpected state 0, in can0 interface
DIGIAPIX[824]: [ERROR] can0|ldx_can_thr: select error (-27|100)
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
- The <stropts.h> header is no longer available.
- The <sys/ioctl.h> is required.
Reported-by: Paolo Chiarlone <paolo.chiarlone@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-7207
From the user point of view the the main change is the addition of function
ldx_gpio_request_by_controller() which selects the gpio to use using following
arguments:
- controller: The controller name or alias of the GPIO to request.
- line: The line number of the GPIO to request.
- request_mode argument has been removed since that argument only has
sense for sysfs related functions as it controls the way the line is
exported and unexported.
The configuration file entries change to following format:
- USER_LED = mca-gpio,12
- USER_BUTTON = mca-gpio,10
Also improved argument parsing and help
https://jira.digi.com/browse/DEL-6425
Signed-off-by: Hector Bujanda hector.bujanda@digi.com
In previous implementation, if alias wanted to be used, it had to be passed twice.
https://jira.digi.com/browse/DEL-6425
Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
The newest version of cryptoauthlib is built as a shared library instead of a
static one.
https://jira.digi.com/browse/DEL-6835
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Use the same prompts that we use in the online documentation:
* For the target: "~#"
* For the host: "~$"
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
CAAM blobs can be used to secure data with the OTPMK. More information
is available in the online documentation.
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
This commit adds CANFD support to configure the data bitrate and
to enable the CANFD feature.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
https://jira.digi.com/browse/DEL-6588
General Makefile calls each API source without any specific target,
this commit fixes the CAN Makefile to build without errors.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>