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

PCA10059 programming problems.

Hi,

Just got four 52840 USB dongles, with the intent to evaluate the Nordic BT Mesh.  But I've been  unable to get even a simple Blinky example programmed on the dongle.  I've tried both Windows and Mac, I'm sure I'm doing something wrong, any pointers are appreciated.  I found this info the forum, but my errors are somewhat different:

https://devzone.nordicsemi.com/f/nordic-q-a/36844/nrf-connect-programming-pca10059-issue?ReplySortBy=Votes&ReplySortOrder=Descending

When using nRF Connect v2.4.0, I can see the device and connect to it.  But it will not let me write or erase the device, I get a box under the recover button that says "Only single writable region is supported", and both the "Write all to devkit" and "Recover" buttons are disabled.  See attached image

I also tried nrfutil on both Windows and Mac OS, and both report a similar problem while attempting to generate a zip file.   Tried with both python2 and python3:

nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0xa9

produces the following:

$ nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0xa9

|===============================================================|
|## ## ### ######## ## ## #### ## ## ###### |
|## ## ## ## ## ## ## ### ## ## ### ## ## ## |
|## ## ## ## ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####|
|## ## ## ######### ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ## ## ## ### ## ## ### ## ## |
| ### ### ## ## ## ## ## ## #### ## ## ###### |
|===============================================================|
|You are generating a package with the debug bit enabled in the |
|init packet. This is only compatible with a debug bootloader |
|and is not suitable for production. |
|===============================================================|


|===============================================================|
|## ## ### ######## ## ## #### ## ## ###### |
|## ## ## ## ## ## ## ### ## ## ### ## ## ## |
|## ## ## ## ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####|
|## ## ## ######### ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ## ## ## ### ## ## ### ## ## |
| ### ### ## ## ## ## ## ## #### ## ## ###### |
|===============================================================|
|You are not providing a signature key, which means the DFU |
|files will not be signed, and are vulnerable to tampering. |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments. |
|===============================================================|

Traceback (most recent call last):
File "C:\Users\egross\AppData\Local\Programs\Python\Python36-32\Scripts\nrfutil-script.py", line 11, in <module>
load_entry_point('nrfutil==3.5.1', 'console_scripts', 'nrfutil')()
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\nordicsemi\__main__.py", line 632, in generate
package.generate_package(zipfile_path)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\nordicsemi\dfu\package.py", line 344, in generate_package
for key, firmware_data in self.firmwares_data.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Any ideas or pointers are appreciated.   The various commands and GUI don't quite match the documentation, so I'm hoping its just something simple that I'm missing.

Ed

Parents
  • I am seeing a similar issue.

    Please see:

    https://devzone.nordicsemi.com/f/nordic-q-a/36381/nrf52840-dongle-write-problem

    Not sure if it's the official response, but one user says:

    "for the time being loading projects to the dongle using a softdevice is not supported by the nRF Connect for Desktop app. "


    UPDATE 1:

    You can program the dongle via SWD if you have a DK. Just power it from the DK so VTG is detected correctly.


  • Hi,

    This is correct. The nRF Programmer app for nRF Connect for Desktop does not currently support programming the SoftDevice to the dongle, but this will most likely be supported in the next release. The only option at this point is to use nrfutil, which is part of nRF5x-Command-Line-Tools.

  • Thanks, yes, I did try python2, but I retried, apparently the python2 virtualenv had a link or cache to the python3 pip installed version, so I wasn't really switching to the python2 pip installed version.  Not sure why that way, but all is happy now. 

  • OK, made some progress, but still having a problem farther  downstream.

    I generated a package via:

     nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0xA9

    I've running it with the prepackaged blinky hex  with and without the S140 softdevice.  I  try to program the device with:

    nrfutil -vvvv dfu usb_serial -pkg blinky_package.zip -p COM18

    produces the following traceback:

    File "c:\users\egross\documents\projs\rackareanetwork\nordic\nrf5_sdk_15.0.0_a53641a\examples\ble_peripheral\ble_app_blinky\hex\p2\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 463, in __get_response
    raise NordicSemiException('Extended Error 0x{:02X}: {}'.format(resp[3], data))
    pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.

    I tried a couple of different id's, all with the same result.  Turning on verbose produces this before the exception:

    2018-07-31 12:38:30,382 Using board at serial port: COM18
    2018-07-31 12:38:30,390 Sending SoftDevice image...
    2018-07-31 12:38:33,392 Serial: Set Packet Receipt Notification 0
    2018-07-31 12:38:33,392 SLIP: --> [2, 0, 0]
    2018-07-31 12:38:33,392 SLIP: <-- [96, 2, 1]
    2018-07-31 12:38:33,394 SLIP: --> [7]
    2018-07-31 12:38:33,394 SLIP: <-- [96, 7, 1, 3, 8]
    2018-07-31 12:38:33,394 Sending init packet...
    2018-07-31 12:38:33,394 Serial: Selecting Object: type:1
    2018-07-31 12:38:33,394 SLIP: --> [6, 1]
    2018-07-31 12:38:33,394 SLIP: <-- [96, 6, 1, 0, 1, 0, 0, 68, 0, 0, 0, 100, 172, 200, 186]
    2018-07-31 12:38:33,394 Serial: Object selected: max_size:256 offset:68 crc:3133713508
    2018-07-31 12:38:33,394 SLIP: --> [1, 1, 70, 0, 0, 0]
    2018-07-31 12:38:33,395 SLIP: <-- [96, 1, 1]
    2018-07-31 12:38:33,395 Serial: Streaming Data: len:70 offset:0 crc:0x00000000
    2018-07-31 12:38:33,395 SLIP: --> [8, 10, 68, 8, 1, 18, 64, 8, 255, 255, 255, 255, 15, 16, 52, 26, 4, 169, 1, 172, 1, 32, 1, 40, 200, 135, 9, 48, 0, 56, 0, 66, 36, 8, 3, 18, 32, 28, 16, 188, 234, 95, 167, 109, 20, 224, 222, 187, 150, 49, 101, 85, 191, 115, 225, 7, 223, 17, 209, 9, 123, 162, 51, 103, 115, 251, 45, 241, 197, 72, 1]
    2018-07-31 12:38:33,395 SLIP: --> [3]
    2018-07-31 12:38:33,397 SLIP: <-- [96, 3, 1, 70, 0, 0, 0, 59, 175, 95, 99]
    2018-07-31 12:38:33,397 SLIP: --> [4]
    2018-07-31 12:38:33,398 SLIP: <-- [96, 4, 11, 7]

    Any suggestions are appreciated, hopefully a simple user error.

    Ed

  • Getting exact same problem as you are below: " Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice." when trying to program the nRF52840-Dongle using nrfutil.exe, tried all combinations and nothing seems to work. The weird part is using the nRFConnect App v2.4.0 to launch the Bluetooth Low Energy app, it was able to program the example onto the dongle. Then when I launch the Programmer app it shows the softdevice with App is present in memory. So obviously the nRFConnect Bluetooth Low Energy app can load to the dongle but we cant using the Programmer App!

  • It should work if you skip the SoftDevice ID check by using --sd-req 0x00 (0x00 meaning any SoftDevice version). For instance, the command to generate the zip package for the application from the initial question should be changed to:

    nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0x00

    Then a normal serial DFU upgrade should work out of the box with the following command (same as in the question):

    nrfutil -vvvv dfu usb_serial -pkg blinky_package.zip -p COM54

  • Thanks, --sd-req 0x00 made it work.  Note that some of your documentation says that 0xffee is the "any" softdevice version key, but this doesn't work.

    Also, the pre-built BLE Blinky hex file did not work on the pca10059.  I had to build the app.  Here's what I did to install the softdevice and my compiled app from the hex directory in ble_app_blinky.  I used 0xa9 for --sd-id, it didn't seem to like 0x00:

    nrfutil pkg generate --debug-mode --softdevice ../../../../components/softdevice/s140/hex/s140_nrf52_6.0.0_softdevice.hex --application ../pca10059/s140/ses/Output/Release/Exe/ble_app_blinky_pca10059_s140.hex app_and_sd_package.zip --hw-version 52 --sd-req 0x00 --sd-id 0xa9

     nrfutil -vvv dfu usb_serial -pkg app_and_sd_package.zip -p COM17

    I can confirm that nRF Connect does appear to show the valid firmware layout on the device, even though you can't program the device with nRF Connect.

    Ed

Reply
  • Thanks, --sd-req 0x00 made it work.  Note that some of your documentation says that 0xffee is the "any" softdevice version key, but this doesn't work.

    Also, the pre-built BLE Blinky hex file did not work on the pca10059.  I had to build the app.  Here's what I did to install the softdevice and my compiled app from the hex directory in ble_app_blinky.  I used 0xa9 for --sd-id, it didn't seem to like 0x00:

    nrfutil pkg generate --debug-mode --softdevice ../../../../components/softdevice/s140/hex/s140_nrf52_6.0.0_softdevice.hex --application ../pca10059/s140/ses/Output/Release/Exe/ble_app_blinky_pca10059_s140.hex app_and_sd_package.zip --hw-version 52 --sd-req 0x00 --sd-id 0xa9

     nrfutil -vvv dfu usb_serial -pkg app_and_sd_package.zip -p COM17

    I can confirm that nRF Connect does appear to show the valid firmware layout on the device, even though you can't program the device with nRF Connect.

    Ed

Children
Related