Connection timeout

nRF Util

tags
nRF Util

By default, the ble subcommands wait up to 10 seconds to connect to the target device over Bluetooth LE. To change this time, use the --connection-timeout <SECONDS> option with any ble subcommand. The value must be at least 1.

For example, to fail faster when the target device is out of range or not advertising, set a timeout of 3 seconds:

nrfutil mcu-manager ble --hci-serial-port COM35 image-list --address C1:39:8A:99:1F:67 --address-type random --connection-timeout 3

To allow more time on a slow or busy radio environment, increase the timeout, for example to 30 seconds:

nrfutil mcu-manager ble --hci-serial-port COM35 image-upload --firmware mcuboot_secondary_app_update.bin --device-name Nordic_LBS --connection-timeout 30

If the command cannot connect within the timeout, it fails with an error similar to the following one:

❌ Connection failed connection timed out
Error: connection timed out

The connection timeout is separate from the --scan-timeout option, which controls how long the command scans for a device when you use --device-name.