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

Replace S132 with S112

My application is a BLE peripheral and will only allow a single connection to a BLE central. Hardware will be nRF52832. My test application was based on a Nordic example that uses S132. It looks like I could save some flash if I use S112 instead of S132. Would this work and is this a good choice.

  • Hi.

    This depends on what SDK you use and which IC revision your board is.

    We have a compability matrix for SDK and SoftDevice here, and the different IC revisions are listed here.

    If you only have one peripheral, it should be a good choice.

    Best regards.

    Andreas

  • Thanks. The compatibility matrix checks out. Is there a guide that shows the steps needed to change the SoftDevice?

  • Hi.

    If you want to move from S132 v6.1.0 to S112 v6.1.0, then you will not need any migration guide as the peripheral API in both will be the same. In S112 there is no central support, so all its relavant API is stripped away in S112 to save space.

    Best regards.

    Andreas

  • I burned flash with S112 but now my application does not run.  There must be more steps required to change from one version of SoftDevice to another.  Is this documented anywhere?

    My environment:  nRF52 DK, SDK 15.2, SD 6.1.0, SES v3.52

    My bootloader was built from examples/dfu//secure_bootloader

    My application was built from examples/ble_peripheral/ble_app_buttonless_dfu

    When I use S132 the DFU application runs normally and I can load a ZIP package.  When I replace S132 with S112 the board does not run the application. Instead it just runs the bootloader and LED-1 and LED-2 are on solid. 

    I went into the SES project files and found a couple places where S132 was used. I replaced those with S112.  I did this in the bootloader project and the application project.  However there was no change in behavior.

  • Hi.

    Have you used the right settings when you created your .zip packet?

    If you look at the command nrfutil pgk generate --help, you see the following options:

    λ nrfutil pkg generate --help
    Usage: nrfutil pkg generate [OPTIONS] ZIPFILE
    
      Generate a zip package for distribution to apps that support Nordic DFU
      OTA. The application, bootloader, and SoftDevice files are converted to
      .bin if supplied as .hex files. For more information on the generated
      package, see: http://developer.nordicsemi.com/nRF5_SDK/doc/
    
      The following combinations are supported by this command:
    
      * BL only: Supported.
    
      * SD only: Supported (SD of same Major Version).
    
      * APP only: Supported.
    
      * BL + SD: Supported.
    
      * BL + APP: Not supported (use two packages instead).
    
      * BL + SD + APP: Supported.
    
      * SD + APP: Supported (SD of same Major Version).
    
    Options:
      --debug-mode                    Debug mode switch, enables version check
                                      skipping.
      --application TEXT              The application firmware file.
      --application-version INTEGER   The application version.
      --application-version-string TEXT
                                      The application version string, e.g
                                      "2.7.31".
      --bootloader TEXT               The bootloader firmware file.
      --bootloader-version INTEGER    The bootloader version.
      --hw-version INTEGER            The hardware version.  [required]
      --sd-req TEXT                   The SoftDevice requirements. A comma-
                                      separated list of SoftDevice firmware IDs (1
                                      or more) of which one must be present on the
                                      target device. Each item on the list must be
                                      a two- or four-digit hex number prefixed
                                      with "0x" (e.g. "0x12", "0x1234").
                                      A non-
                                      exhaustive list of well-known values to use
                                      with this option follows:
                                      |s112_nrf52_6.0.0|0xA7|
                                      |s112_nrf52_6.1.0|0xB0|
                                      |s130_nrf51_1.0.0|0x67|
                                      |s130_nrf51_2.0.0|0x80|
                                      |s132_nrf52_2.0.0|0x81|
                                      |s130_nrf51_2.0.1|0x87|
                                      |s132_nrf52_2.0.1|0x88|
                                      |s132_nrf52_3.0.0|0x8C|
                                      |s132_nrf52_3.1.0|0x91|
                                      |s132_nrf52_4.0.0|0x95|
                                      |s132_nrf52_4.0.2|0x98|
                                      |s132_nrf52_4.0.3|0x99|
                                      |s132_nrf52_4.0.4|0x9E|
                                      |s132_nrf52_4.0.5|0x9F|
                                      |s132_nrf52_5.0.0|0x9D|
                                      |s132_nrf52_5.1.0|0xA5|
                                      |s132_nrf52_6.0.0|0xA8|
                                      |s132_nrf52_6.1.0|0xAF|
                                      |s140_nrf52_6.0.0|0xA9|
                                      |s140_nrf52_6.1.0|0xAE|  [required]
      --sd-id TEXT                    The new SoftDevice ID to be used as --sd-req
                                      for the Application update in case the ZIP
                                      contains a SoftDevice and an Application.
      --softdevice TEXT               The SoftDevice firmware file.
      --key-file PATH                 The private (signing) key in PEM fomat.
      --zigbee BOOLEAN                Create an image and distribution package for
                                      Zigbee DFU server.
      --zigbee-manufacturer-id INTEGER
                                      Manufacturer ID to be used in Zigbee OTA
                                      header.
      --zigbee-image-type INTEGER     Image type to be used in Zigbee OTA header.
      --zigbee-comment TEXT           Firmware comment to be used in Zigbee OTA
                                      header.
      --help                          Show this message and exit.
    

    Note: Make sure you have the latest nrfutil version by running the command pip install nrfutil.

    If you want to have your new firmware using SoftDevice S112 V6.1.0, then you have to use --sd-req 0xB0, when you generate the packet. Did you do this?

    Some more information about generating a packet is found in the infocenter here.

    Try this and see if it works by using --sd-req 0xB0 to generate the packet.

    Best regards.

    Andreas

Related