How to perform an OTA update on the nRF5340 using a PC

Hi,

Currently, I know that OTA updates for the nRF5340 can be performed using Device Manager and the nRF Connect mobile application. However, if using a PC, is it possible to achieve the same functionality via the command line?

Thanks!!

Mike

  • Hi Mike,

    please try using the lower case address instead of using the the device name as filter and see if you get the same result.

    https://github.com/apache/mynewt-mcumgr-cli/issues/7#issuecomment-494863151

  • Hi Vidar,

    The version of mcumgr I am currently using (mcumgr 0.0.0-dev) does not seem to support the peer_id option. At the moment, I only have the options shown below available

    $ mcumgr -h
    mcumgr helps you manage remote devices
    
    Usage:
      mcumgr [flags]
      mcumgr [command]
    
    Available Commands:
      config      Read or write a config value on a device
      conn        Manage mcumgr connection profiles
      crash       Send a crash command to a device
      datetime    Manage datetime on a device
      echo        Send data to a device and display the echoed back data
      fs          Access files on a device
      help        Help about any command
      image       Manage images on a device
      interactive Run mcumgr interactive mode (used for COAP only)
      log         Manage logs on a device
      mpstat      Read mempool statistics from a device
      res         Access a CoAP resource on a device
      reset       Perform a soft reset of a device
      run         Run test procedures on a device
      shell       Execute shell commands remotely
      stat        Read statistics from a device
      taskstat    Read task statistics from a device
      version     Display the mcumgr version number
    
    Flags:
      -c, --conn string         connection profile to use
          --connextra string    Additional key-value pair to append to the connstring
          --connstring string   Connection key-value pairs to use instead of using the profile's connstring
          --conntype string     Connection type to use instead of using the profile's type
      -i, --hci int             HCI index for the controller on Linux machine
      -h, --help                help for mcumgr
      -l, --loglevel string     log level to use (default "info")
          --name string         name of target BLE device; overrides profile setting
          --ompres string       Use this CoAP resource instead of /omgr (default "/omgr")
      -t, --timeout float       timeout in seconds (partial seconds allowed) (default 10)
      -r, --tries int           total number of tries in case of timeout (default 1)
          --write-rsp           Send BLE acked write requests instead of unacked write commands
    
    Use "mcumgr [command] --help" for more information about a command.
    .

    Alternatively, could you share the mcumgr version that you have successfully used?

  • Hi Mike,

    The supported --constring arguments have always been the same as far as I can tell. Please post the command you used along with the error you got.

  • Hi Vidar,

    I am able to successfully perform DFU using mcumgr on a Linux PC.
    Thank you for your valuable suggestions

    Best regards,
    Mike

Related