This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Customizing a bootloader

If all you need is changing  PHY, Tx power and Device Name in a standard nRF52840, do you need building a new bootloader from the scratch or the is a way to edit the standard firmware,  build a new edited file and finally re-program this file in a standard nRF52840? Thanks

Parents
  • Hi Vidar. Following the Getting started with Nordic's Secure DFU bootloader, a step by step guide, in the A1 step, Generate your own private key. Type this command line:  nrfutil.exe keys generate private.key, all I get is:

    C:\Users\jtorr>nrfutil.exe keys generate private.key
    File found at private.key. Do you want to overwrite the file?  [y/N]
    Traceback (most recent call last):
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Users\jtorr\AppData\Local\Programs\Python\Python37-32\Scripts\nrfutil.exe\__main__.py", line 9, in <module>
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 717, in main
        rv = self.invoke(ctx)
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 555, in invoke
        return callback(*args, **kwargs)
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\nordicsemi\__main__.py", line 364, in generate
        if not query_func("File found at %s. Do you want to overwrite the file?" % key_file):
      File "c:\users\jtorr\appdata\local\programs\python\python37-32\lib\site-packages\nordicsemi\dfu\util.py", line 69, in query_func
        choice = raw_input().lower()
    NameError: name 'raw_input' is not defined

    ..... but I don't see any private key string to continue, in order to obtain the public key.

    Any comments?

    Thanks in advance.

  • Hi Vidar.

    I need customizing the TXPOWER parameter through BLE in several nRF52840 modules I am testing, in such a way next time they boot up, they will do with their output power set to pos8dBm and not to pos6dBm as is the case now. Would you please help me with a step by step guide?

    I barely understand how to build and program a secure DFU using nRFtools, but I don't know how to build the source file to initiate the process.

    And also, where in within all the blocks the firmware is made up is this parameter defined? In the Bootloader block, in the SoftDevice, in the App_Data, in the Application itself or somewhere else that I am not yet aware? The modules I am testing are from uBlox. Will I need special source files other than if I set this parameter in the module of a nRF52840 DK board?

    Thanks so much

  • Hi,

    You need to edit the source code and re-build the project to change the output power. There are some application examples that have a command line interface, the Experimental: BLE Interactive Command Line Interface Example for instance, but I'm not aware of any that include a command for setting the output power.  

  • I understand Vidar. There are examples including CLI commands to change the Tx_Power, but not permanently though. As soon as nRF52840 DK gets switched-off, this parameter returns to 0 dBm. I wonder if once you've modified this parameter through CLI, there would be a way to automatically generate a source file reflecting this change you could later build and program in any factory set module?

  • Hi Vidar. Would you please tell me the command I should edit in the BLE Interactive CLI example to set advertising on at boot-up (the factory default is off)?

    Shure I can issue an advertise_on command through the PuTTY console, but the SoC resets to off as soon as the module is being switch-off. Thanks so much.

  • Hi, could you explain what you want to archive in more detail? Is for testing, or do you plan to use this example as a starting point for your own application? The BLE interactive  example is built around the command line interface so you can easily test different ble features, but not meant to be used in a final application. 

  • Hi Vidar. We are trying to make a prototype, able to advertise a customized local name, with a coded PHY modulation and maximum transmitted power in order to build the proof of concept (PoC) for a new product. If the result is positive, we will start a finance round to bring this product to the market and in this case, a team of developers would build a new firmware from the scratch. 

Reply
  • Hi Vidar. We are trying to make a prototype, able to advertise a customized local name, with a coded PHY modulation and maximum transmitted power in order to build the proof of concept (PoC) for a new product. If the result is positive, we will start a finance round to bring this product to the market and in this case, a team of developers would build a new firmware from the scratch. 

Children
Related