Modem Certificate Management from zephyr Shell(CLI)

Hi,
I want to update the AWS certificate for Device from CLI at time of Production.
They files including Amazon root Certificate ,Client Cert and Private key are in PEM format. I am using at Wrapper for using AT commands in Zephyr Shell. I am unable to paste the whole certificate in shell due to multiline format of file.
so I removed carriage return and new line character from certs files and make it only single line text in file.
now if I  want use the files as a cert files its not working ,I am not able provision the device.
I am using following AT commands from Zephyr shell at AT%CMNG.

Is there any way that I  give path of text file in this command.
or any other alternative for Device Provisioning other then LTE link monitor terminal.

Thanks 

Parents Reply Children
  • Hi Hakon,


    I used this api.

    At our production time .we are flashing the serial number in intel hex format like serial.hex file.
    before that we are flashing through SES download file option.

    I create a script  in the following order
    Flash serial number 

    program_options = HighLevel.ProgramOptions(
    erase_action=HighLevel.EraseAction.ERASE_NONE,
    reset=HighLevel.ResetAction.RESET_NONE,
    verify=HighLevel.VerifyAction.VERIFY_NONE
    )
    nrfjprog_probe.program(fw_hex, program_options=program_options)

    Then Flash at_Client app

    with following program option
    program_options = HighLevel.ProgramOptions(
    erase_action=HighLevel.EraseAction.ERASE_ALL,
    reset=HighLevel.ResetAction.SYSTEM_RESET,
    verify=HighLevel.VerifyAction.VERIFY_READ
    )
    and then certification that flash successfully
    in the last stage i am going to flash the application firmware.
    program_options = HighLevel.ProgramOptions(
    erase_action=HighLevel.EraseAction.ERASE_ALL,##not sured about this option
    reset= HighLevel.ResetAction.SYSTEM_RESET,
    verify=HighLevel.VerifyAction.VERIFY_READ
    )


    after completing above step I want to flash firmware again its erase serial number from nvs storage.

    if we  flash the application through SES or VS code its work properly.

    Please guide about this issue.
    Thanks

    
    


  • Hi,

     

    ERASE_ALL means that you're clearing the flash entirely. You can read more about the highlevel API here:

    https://github.com/NordicSemiconductor/pynrfjprog/blob/8bdced58d100191b6acd70904a2dd08b4257bc78/pynrfjprog/docs/highlevelnrfjprogdll.h#L930-L967

     

    Waqar Ahmed said:
    At our production time .we are flashing the serial number in intel hex format like serial.hex file.
    before that we are flashing through SES download file option.

    you can use nrfjprog directly for this purpose:

    nrfjprog --program my_file.hex --sectorerase --verify

     

    Kind regards,

    Håkon

Related