TrustM shield2go with Raspberry Pi gives me this error when I try to run "write_default_shared_secret.sh"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
abhijithnalige
Level 1
Level 1
5 questions asked 10 sign-ins First reply posted

sh write_default_shared_secret.sh
write_default_shared_secret.sh: 2: source: not found
rm: cannot remove '*.dat': No such file or directory
Generate default shared secret

Bypass Shielded Communication.
shm_open: Permission denied
Segmentation fault

0 Likes
1 Solution
ShivaSai_S
Moderator
Moderator
Moderator
25 replies posted 25 likes received First like given

Hi @abhijithnalige ,

Please ensure that I2C interface on RPi is enabled.
The command "sh write_default_shared_secret.sh" uses sh for executing the script. But we need to use the bash script for execution of the script. Therefore use the following command "./write_default_shared_secret.sh". Please refer the attached image.

ShivaSai_S_0-1708930400157.png


Best regards,
Shiva Sai

 

View solution in original post

0 Likes
4 Replies
Sharath_V
Moderator
Moderator
Moderator
First comment on blog 250 sign-ins 100 replies posted

Hi @abhijithnalige ,

The application engineer for the concerned issue should be back by next week, please wait for them to respond. Thanks for your patience.

0 Likes
ShivaSai_S
Moderator
Moderator
Moderator
25 replies posted 25 likes received First like given

Hi @abhijithnalige ,

Please ensure that I2C interface on RPi is enabled.
The command "sh write_default_shared_secret.sh" uses sh for executing the script. But we need to use the bash script for execution of the script. Therefore use the following command "./write_default_shared_secret.sh". Please refer the attached image.

ShivaSai_S_0-1708930400157.png


Best regards,
Shiva Sai

 

0 Likes

Hi, 

I was able to successfully run the script and was able to generate keypair "ONCE" using "

optiga_crypt_ecc_generate_keypair". However, if I use the same API to generate a key pair again, I get 0x202 (CMD_ERROR).
This is the format of API I use.
optiga_crypt_t *global_me_crypt;
    uint8_t pubkey[1728];
    uint16_t pubkey_len = (uint16_t)sizeof(pubkey);
optiga_crypt_ecc_generate_keypairglobal_me_crypt,
                                                        OPTIGA_ECC_CURVE_NIST_P_256 :
                                                    OPTIGA_KEY_USAGE_SIGN,
                                                    FALSE,
                                                    0xE0F1,
                                                    pubkey,
                                                    &pubkey_len );
0 Likes
ShivaSai_S
Moderator
Moderator
Moderator
25 replies posted 25 likes received First like given

Hi @abhijithnalige ,

As we can see on the community, you have already created a separate thread for this topic "optiga_crypt_ecc_generate_keypair", we will continue the discussion in that thread.

Best regards,
Shiva Sai

0 Likes