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

failed to upload ble_app_uart with dfu

Hi everybody.

I am making a firmware based on ble_app_uart example (PCA10028 NRF51422, Softdevice S110, NRF51 SDK9.0). In this firmware, I insert dfu part (follow by this instruction ) to support upload firmware via OTA(by nrfConnect android app). I upload successful at the first time (the MCU already has Softdevice and bootloader in memory). However, when I upload again it is failed and the android app show a message: upload failed dfu service disconnected.

Could you please tell me how to solve this problem?

Sorry because my English is not good. Thank you very much.

UPDATE: I put the log file for each test case:

  • Step 1: I upload Softdevice and bootloader to MCU, then I use nrfconnect to upload my ble app, the result is successfull and the log file is here

  • Step 2: After upload my ble app, I connect and re-upload my ble app (the ble app version is 0xFFFFFFFF) the result is failed and the log file is here

  • Step 3: I erase the memory of MCU then upload Softdevice and bootloader same as step 1. After that, I upload the sample dfu file (dfu_test_hrm_s110.zip). The result is successfull and here is log file.

  • Step 4: I connect and upload dfu_test_hrm_s110.zip second time, the result is successfull and this is log file.

  • FormerMember
    0 FormerMember

    Bạn có phải người Việt Nam không Minh , tôi cũng đang tìm hiểu về BLE , tôi dùng NRF52832 . Chúng ta có thể giao lưu giúp đỡ nhau :)

  • Chào các bạn, mình cũng là người Việt Nam đây. Rất hân hạnh được giúp các bạn :)

    @Minh: có chắc cái này "However, when I upload again it is failed and the android app show a message: upload failed dfu service disconnected. " match với cái log trên hình không ? Vì cái trên hình là log đã update thành công và trigger activate and reset.

    Minh có thể test bằng example experimental_ble_app_buttonless_dfu để xem có thể update được nhiều lần không. Ngoài ra thử thêm bằng nRFToolbox.

  • Dạ trường hợp trên là em thêm dfu service vào code của ble_app_uart(dựa vào code của ble_app_hrs) rồi sau đó test dfu bằng cách upload nhiều lần nhưng lỗi như trên lại xuất hiện. Khi em test với chương trình có chứa dfu mẫu(ble_app_hrs) thì việc update nhiều lần không vấn đề gì. Em thắc mắc ở chỗ đó vì khi dùng nrfconnect kết nối với code của em thì dfu_service có xuất cùng với nus_service.

  • Xin bạn up thêm 1 cái log nữa (tốt nhất là xuất ra file, chọn level DEBUG chứ ko chỉ INFO), như đã nói ở trên cái screenshot bên trên cho thấy quá trình DFU đã hoàn tất , đã activate và reset. Như vậy của bạn có chạy đến 100% trước khi bị lỗi không ?

    Nếu bạn có thể gửi về sniffer trace của quá trình (lần thứ nhất thành công, lần thứ 2 bị lỗi) thì sẽ dễ để khảo sát hơn.

  • Em xin lỗi vì mạch em để ở cty nên tuần trước em không trả lời ngay được, hôm nay em có làm lại theo kịch bản trước, dưới đây là các file log em có lưu lại ạ:

    B1: Ban đầu MCU chỉ có softdevice và bootloader, em upload app của em và thu dc file log này ạ

    B2. Sau khi hoàn thành B1, em kết nối với chương trình và upload lại lần 2, thu được file log này

    B3. xóa toàn bộ code trong memory, upload sofdevice và bootloader, quay lại bước 1 nhưng upload file dfu mẫu (dfu_test_hrm_s110.zip) và thu được file log này.

    B4. Kết nối và thực hiện upload file dfu_test_hrm_s110.zip lần 2 và thu dc file log này.

    Trong kịch bản trên thì thực hiện lần 2 với file dfu mẫu thành công nhưng với chương trình của em thì lỗi ạ.

Related