You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new H/W v4.0 HSM smart cards are not properly setting up with the current firmware. The problem with communication starts right away after execution of the PPS procedure, where the higher bit rate is configured with the smart card, after which the USART peripheral working in the SMARTCARD mode is reconfigured with higher bitrate as well. After this point smart card is requested for its serial number, which ends up malformed. Similarly further USB CCID requests, which are passed to the smart card, are either ending up in a Default Handler due to the Frame Exception being raised, or just in an infinite loop, where the MCU awaits for the flag change from the USART peripheral, which at some point should signalize data reception.
Interestingly, when the PTS_config() body execution is skipped (= insert return as a first line), everything works fine at the default speed of 9600bps, however this speed is clearly not enough to have a proper user experience. The aim is to have at least the speed of the previous smart card generation, which is ~ 115kbps.
Even if the configuration of the minimal speed is attempted, which should end up in the same value as the default one - 9600bps, the proper communication is not achieved.
The v3.0 cards work properly with the current implementation. The only changes are:
The new H/W v4.0 HSM smart cards are not properly setting up with the current firmware. The problem with communication starts right away after execution of the PPS procedure, where the higher bit rate is configured with the smart card, after which the USART peripheral working in the SMARTCARD mode is reconfigured with higher bitrate as well. After this point smart card is requested for its serial number, which ends up malformed. Similarly further USB CCID requests, which are passed to the smart card, are either ending up in a Default Handler due to the Frame Exception being raised, or just in an infinite loop, where the MCU awaits for the flag change from the USART peripheral, which at some point should signalize data reception.
Interestingly, when the
PTS_config()
body execution is skipped (= insertreturn
as a first line), everything works fine at the default speed of9600bps
, however this speed is clearly not enough to have a proper user experience. The aim is to have at least the speed of the previous smart card generation, which is~ 115kbps
.Even if the configuration of the minimal speed is attempted, which should end up in the same value as the default one -
9600bps
, the proper communication is not achieved.The v3.0 cards work properly with the current implementation. The only changes are:
Done so far:
Some of the mentioned are stored in the commits history of the wip scratch branch (does not work, and its not coherent):
Things to check yet:
225kbps
setting)Initial configuration -
SC_Init()
:nitrokey-pro-firmware/src/ccid/smartcard/smartcard.c
Lines 1058 to 1193 in 47dd7f1
Mentioned
PTS_config()
:nitrokey-pro-firmware/src/ccid/smartcard/smartcard.c
Lines 507 to 670 in 47dd7f1
Hardware schematics:
The text was updated successfully, but these errors were encountered: