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

pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port

Hi, 

I was trying to run dfu mesh example according to this. I attempted quite few times but every time having an error at step 11.

infocenter.nordicsemi.com/index.jsp

Here is my environment details:

OS: windows 10

nrfutil version: 3.5.1

mesh SDK: Mesh_v2.1.1_src

Board : nrf52832 

SDK version: 15

SoftDeive s132_6.0.0

step 1: Creating my own private key 

 nrfutil.exe keys generate private.pem

Step2: Generated respective public key in hex format

nrfutil.exe keys display --key pk format code .\private.pem --out_file dfu_public_key.c

step 3: Added this key in the end of  "bootloader_config_default.json" file.

Step 4: Creating own signed image  package for dfu

nrfutil.exe pkg generate --hw-version 52 --application-version 4 --sd-req 0x00A8 --application C:\nordic_semi\nrf5_SDK_for_Mesh_v2.
1.1\bin\blinky\blinky_nrf52832_xxAA_s132_6.0.0.hex --key-file .\private.pem secure_dfu_mesh.zip

Step 5:  Generating device page with provided script as follow

python .\device_page_generator.py  -d nrf52832_xxAA -sd "s132_6.0.0"

Step 6:  flashing soft device:

nrfjprog --program C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --chiperase

step 7: Flash the serial bootloader on all devices:

nrfjprog --program C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex

step 8: flashing application:

nrfjprog --program C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s13
2_6.0.0.hex

Step 9: Flashing device page:

nrfjprog --program C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex

Step 10: Resetting 

nrfjprog --reset

Step 11: Problematic one(Transfer the DFU archive over serial with nrfutil) 

 nrfutil.exe dfu serial -pkg .\secure_dfu_mesh.zip -p COM15 -b 1200

 I have problem only on step 11 

Parents
  • Hi.

    Could you check our which version of nrfutil you are using? 

    Just run "nrfutil.exe version" in cmd.

    The dfu quick start guide requires the version 0.3.0.0, which is found in this GitHub link.

    - Andreas

  • version is 3.5.1, so i am thinking that i used wrong version. Now my question is how can i use the version you mentioned.
    Thanks for your reply

  • Hi.

    Could you post the error you get when you run the following commands:

    nrfjprog --program bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --verify
    nrfjprog --program bin\bootloader\armcc\mesh_bootloader_serial_armcc_nrf52832_xxAA.hex --verify
    nrfjprog --program examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s132_6.0.0.hex --verify
    nrfjprog --program tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex --verify
    nrfjprog --reset
    nrfutilmesh dfu serial -pkg dfu_test.zip -p COM6 -b 115200 -fc --mesh

    Make sure you are in the nrf5_SDK_for_Mesh_v2.1.1 folder when you do this.

    - Andreas

  • 1) I got identical error messages for all verification commands and that is:

    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    ERROR: The area to write is not erased.
    2) No error for  nrfjprog --reset 

    3) the most problematic steps for me:

    Error: no such option: --mesh

    if i remove --mesh switch then i get following errors:

    Upgrading target on COM6 with DFU package C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\dfu_test\dfu_test.zip. Flow control is enabled.
    [------------------------------------] 0%

    Failed to upgrade target. Error is: Serial port could not be opened on COM6. Reason: could not open port u'COM6': WindowsError(2, 'The system cannot find the file specified.')

    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

  • with correct port number i get following errors:

    Upgrading target on COM3 with DFU package C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\dfu_test\dfu_test.zip. Flow control is enabled.
    [------------------------------------] 0%Timed out waiting for acknowledgement from device.


    Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.

    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

Reply
  • with correct port number i get following errors:

    Upgrading target on COM3 with DFU package C:\nordic_semi\nrf5_SDK_for_Mesh_v2.1.1\dfu_test\dfu_test.zip. Flow control is enabled.
    [------------------------------------] 0%Timed out waiting for acknowledgement from device.


    Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.

    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

Children
  • i was reading this and found following lines:

    • Versions 1.5.0 and later generate modern firmware packages compatible with nRF SDK 12.0 and newer

    So i was wondering why you recommended me 0.3.0 ? As i am using sdk 15 should not i use  later version than your recommendation ? 

  • Hi,

    Could you write these two commands, and print the output:

    nrfutilmesh version

    nrfutilmesh dfu serial --help

     

    - Andreas

  • 1) nrfutilmesh version:

    nrfutil version 0.3.0

    2) nrfutilmesh dfu serial --help:

    Usage: nrfutilmesh dfu serial [OPTIONS]

    Program a device with bootloader that support serial DFU

    Options:
    -pkg, --package PATH DFU package filename [required]
    -p, --port TEXT Serial port COM Port to which the device is
    connected [required]
    -b, --baudrate INTEGER Desired baud rate 38400/96000/115200/230400/250000/4
    60800/921600/1000000 (default: 38400). Note:
    Physical serial ports (e.g. COM1) typically do not
    support baud rates > 115200
    -fc, --flowcontrol Enable flow control, default: disabled
    --help Show this message and exit.

     

  • Hi.

     

    It seems to be something missing from nrfutilmesh, you should also have the options -i, --interval, m, and --mesh.

    Could you download the nrfutilmesh zip folder again, use this link

    Unzip the zip folder, and run the command pip.exe install -r requirements.txt inside the folder.

    Does it state that all requirements are already satisfied?

    - Andreas

  • Thank you for your support. While installing nrfutilmesh following step was not sucessfull:

    To generate a self-contained Windows exe version of the utility (Windows only):

    python setup.py py2exe

    It was giving following error: 

    running py2exe
    error: bundle-files 1 not yet supported on win64


    However it was creating nrfutil.exe file.

    And yes, pip.exe install -r requirements.txt states that all requirements already satisfied. 

    Seems we are getting close to resolve the issue, i would really appreciate your effort until we solve it. Please help me to solve the issue.

    Thanks 

Related