This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UNABLE TO GENERATE PRIVATE KEY

Hi,

I am following a tutorial in order to learn the procedure for DFU OTA . I installed the nrfutil but still unable to generate the private key.

I have tried several commands like :

nrfutil.exe keys generate private.key

nrfutil.exe keys generate priv.pem

but it did not work

I think i am using the latest version . 5.0.0

I am getting such errors : TypeError: write() argument must be str, not bytes
NameError: name 'raw_input' is not defined

Please suggest.
Could I be in wrong directory while writing these commands ?
C:\Users\ArshdeepMalik>nrfutil.exe keys generate private.key

Thanks much!

Parents
  • Hi.

    Please answer these questions:

    1. Which version of Python do you use? (You can check by typing python --version in cmd)

    2. Do you have the correct path in Environment Varables? (Check the path by typing where python in cmd)

    3. Can you check which version of nrfutil you have? (Check by typing nrfutil version in cmd)

    4. Have you also added the folder Python27\Scripts to the path in Environment Varables? 

    Best regards,

    Andreas

  • Hi Andreas,

    Which version of Python do you use? 3.7.2

    Do you have the correct path in Environment Varables?  Yes,

    Can you check which version of nrfutil you have? 5.0.0

     Have you also added the folder Python27\Scripts to the path in Environment Varables ? I did not have it before, but added after your comments but still getting error .

    NameError: name 'raw_input' is not defined

    Please suggest!!

    Thanks,

  • Hi Andreas,

    Yes i figured that by reading through the app notes that I will not have to upload the bootloader again. But my big question is how to switch to DFU mode without a button ??Our custom board does not have a dedicated button for this task . 

    So we will like our board to always start in a  DFU mode, look for new firmware package for initial 30sec and switch back to normal application after that.  This will happen every time we power up the board. 

    To achieve this, I was reading a lot about DFU_BUTTONLESS example but could not figure out the right procedure to do so.  

    Will I have to change the structure of my application or will this logic be implemented inside the bootloader? 

    Can you please provide some guiding steps to do so and if possible a pseudo code .

    Thanks,

    Arshdeep

  • Hi.

    I see that you created a new ticket for this question, so it will be answered there by one of my colleagues.

    Best regards,

    Andreas

  • Hi Andreas,

    I have been told that i will be answered on Thursday/Friday. We are in a rush now. Will you able to provide some insights on this ?

    Thanks, 

  • Hi.

    If you want to enter DFU mode there are other ways to do that without the use of a button. For example:

    All these are described in the DFU mode section in DocLib.

    If you want to start in DFU mode just enter DFU mode on start up and set for example NRF_BL_DFU_INACTIVITY_TIMEOUT_MS to 30 seconds.

    You can follow the implementation guide of the Buttonless Secure DFU service, this will show you how to enter DFU mode from the Application.

    Best regards,

    Andreas

  • Hi Andreas,

    Thanks for providing the step. I verify your step and notice I wasn't able to program the device.

    1) Connect to DFUTARG.

    2) Select file type -> Distribution packet (Zip)

    3) Select app_dfu_package.zip

    4) The app show Disconnecting without the dfu programming progress bar.

Reply
  • Hi Andreas,

    Thanks for providing the step. I verify your step and notice I wasn't able to program the device.

    1) Connect to DFUTARG.

    2) Select file type -> Distribution packet (Zip)

    3) Select app_dfu_package.zip

    4) The app show Disconnecting without the dfu programming progress bar.

Children
Related