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

ios nrf loader timeout during upload

I have the nRF Loader app installed on an iPad Mini. I have the dfu_dual_bank_ble firmware from SDK V5.0.0 and SoftDevice V6.0.0.1-beta loaded on my nRF51822.

The app is able to see the device named "DfuTarg" and pair with it, the status becomes "ready", but when it tries to upload, it will hang for a minute and then report an unexpected timeout error.

The LED that indicates connection establishment is on when DfuTarg is selected, but it goes off when the timeout error arrives.

How do I make DFU work? What is causing the timeout?

Parents Reply Children
  • Is there an explicit un-bond function in iOS? I tried Google, no relevant results.

  • No, all bonding on iOS is completely transparent to an app, and you have no control over it. The only way to delete a bond on iOS is for the user to go into the Settings menu and manually "Forget this device".

  • I can only see the device in the iOS settings when the nRF Loader application is in the connected state. I can't do anything with it, tapping on the name does nothing, tap and hold does nothing, I can't swipe it away... How do I make the bond disappear?

  • If you only see the device when it is connected, this is not the bonding issue after all. Which iOS version are you using? Do you have the possibility to run the app in a development environment?

  • I added some UART debug statements to the nRF DFU code.

    It seems like the nRF51 chip itself is resetting periodically after the dfu timer times out.

    Once upload starts, it hits "receive fw" and runs "app_data_process" a few times, then it freezes for a few seconds before the entire microcontroller resets

    Also I am forced to use MicroLIB to compile, because without MicroLIB, it doesn't fit into the IRAM. I wonder if that makes a difference

    the iOS NSLog is shown below

    2013-12-08 15:36:47.286 nRF Loader[1103:60b] Set firmware with size 17260, notificationPacketInterval: 43 2013-12-08 15:36:47.398 nRF Loader[1103:60b] CoreBluetooth[WARNING] <CBCentralManager: 0x15d24510> is disabling duplicate filtering, but is using the default queue (main thread) for delegate events 2013-12-08 15:36:47.401 nRF Loader[1103:60b] Started scan. 2013-12-08 15:36:47.405 nRF Loader[1103:60b] Central manager did update state: 5 2013-12-08 15:36:48.519 nRF Loader[1103:60b] Stopped scan. 2013-12-08 15:36:48.634 nRF Loader[1103:60b] didConnectPeripheral DfuTarg 2013-12-08 15:36:48.637 nRF Loader[1103:60b] didConnect 2013-12-08 15:36:48.640 nRF Loader[1103:60b] State changed from 0 to 1. 2013-12-08 15:36:49.196 nRF Loader[1103:60b] didDiscoverServices succeeded. 2013-12-08 15:36:49.199 nRF Loader[1103:60b] Discover characteristics... 2013-12-08 15:36:49.376 nRF Loader[1103:60b] didDiscoverCharacteristics succeeded. 2013-12-08 15:36:49.379 nRF Loader[1103:60b] Found packet characteristic. 2013-12-08 15:36:49.380 nRF Loader[1103:60b] Found control point characteristic. 2013-12-08 15:36:49.382 nRF Loader[1103:60b] didFinishDiscovery 2013-12-08 15:36:49.384 nRF Loader[1103:60b] State changed from 1 to 2. 2013-12-08 15:36:55.144 nRF Loader[1103:60b] startTransfer 2013-12-08 15:36:55.146 nRF Loader[1103:60b] State changed from 2 to 3. 2013-12-08 15:36:55.148 nRF Loader[1103:60b] sendNotificationRequest 2013-12-08 15:36:55.196 nRF Loader[1103:60b] didWriteControlPoint, state 3 2013-12-08 15:36:55.199 nRF Loader[1103:60b] State changed from 3 to 4. 2013-12-08 15:36:55.202 nRF Loader[1103:60b] sendStartCommand 2013-12-08 15:36:55.256 nRF Loader[1103:60b] didWriteControlPoint, state 4 2013-12-08 15:36:55.316 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100101>. 2013-12-08 15:36:55.319 nRF Loader[1103:60b] didReceiveResponse, 1, in state 4 2013-12-08 15:36:55.321 nRF Loader[1103:60b] State changed from 4 to 5. 2013-12-08 15:36:55.322 nRF Loader[1103:60b] sendReceiveCommand 2013-12-08 15:36:55.376 nRF Loader[1103:60b] didWriteControlPoint, state 5 2013-12-08 15:36:55.379 nRF Loader[1103:60b] State changed from 5 to 6. 2013-12-08 15:36:55.380 nRF Loader[1103:60b] sendFirmwareData 2013-12-08 15:36:55.392 nRF Loader[1103:60b] didWriteDataPacket 2013-12-08 15:36:55.394 nRF Loader[1103:60b] State changed from 6 to 9. 2013-12-08 15:36:55.395 nRF Loader[1103:60b] Sent 860 bytes, total 860. 2013-12-08 15:36:55.438 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.440 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.442 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.443 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.466 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.469 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.471 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.473 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.498 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.499 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.501 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.503 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.526 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.529 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.531 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.533 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.556 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.559 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.586 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.589 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.591 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.592 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.616 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.619 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:36:55.621 nRF Loader[1103:60b] Did update value for characteristic <CBCharacteristic: 0x15e56cf0>. Value: <100306>. 2013-12-08 15:36:55.622 nRF Loader[1103:60b] didReceiveResponse, 6, in state 9 2013-12-08 15:37:56.349 nRF Loader[1103:60b] didDisconnectPeripheral DfuTarg: Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo=0x15d49480 {NSLocalizedDescription=The connection has timed out unexpectedly.} 2013-12-08 15:37:56.351 nRF Loader[1103:60b] didDisconnect 2013-12-08 15:37:56.481 nRF Loader[1103:60b] State changed from 9 to 0. 2013-12-08 15:37:56.554 nRF Loader[1103:60b] cancelTransfer 2013-12-08 15:37:56.556 nRF Loader[1103:60b] CoreBluetooth[WARNING] <CBCentralManager: 0x15d24510> is disabling duplicate filtering, but is using the default queue (main thread) for delegate events 2013-12-08 15:37:56.560 nRF Loader[1103:60b] Started scan.

Related