Flash a nrf52840dk sniffer board

I programmed a nrf52840dk board (PCA10056 3.0.0 2022.7 1050288497) as a sniffer. It works well.

Now I want to flash it to zephyr samples/basic/blinky by "west flash".
west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner nrfjprog
-- runners.nrfjprog: reset after flashing requested
FATAL ERROR: Unable to find a board; is the board connected?

ls -hal /dev/serial/by-id

usb-ZEPHYR_nRF_Sniffer_for_Bluetooth_LE_49F8F9D7E8AE3B9E-if00 -> ../../ttyACM0

I tried to hold RESET button and cycled the power but it still ran into sniffer.

Thanks!

Parents
  • Hi Kenneth,

    Thank you very much for your time on this issue.

    The board is a nRF52840-DK board as I mentioned PCA10056). Thanks!

  • Hi,

    Sorry, for some reason I though you were using the nRF52840 USB dongle, since that is the one I use most as BLE sniffer.

    Can you show me how you have connected the nRF52840-DK, and also how you managed to program the sniffer firmware?

    If you run for instance "nrfjprog --version" in command line, what does it output? If you haven't already, make sure to follow: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-1-nrf-connect-sdk-introduction/ (in specific Exercise 1 that show what you should install)

    Kenneth

  • USB cable is connected to the "nRF USB" port next to the "IF BOOT/RESET" button.


    After plug in the board, dmesg shows:

    [ +6.918874] usb 3-2: new full-speed USB device number 6 using xhci_hcd
    [ +0.253505] usb 3-2: New USB device found, idVendor=1915, idProduct=522a, bcdDevice= 2.04
    [ +0.000009] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ +0.000001] usb 3-2: Product: nRF Sniffer for Bluetooth LE
    [ +0.000001] usb 3-2: Manufacturer: ZEPHYR
    [ +0.000001] usb 3-2: SerialNumber: 49F8F9D7E8AE3B9E
    [ +0.003185] cdc_acm 3-2:1.0: ttyACM0: USB ACM device

    ls -hal /dev/serial/by-id
    total 0
    drwxr-xr-x 2 root root 60 Nov 25 14:29 .
    drwxr-xr-x 4 root root 80 Nov 25 14:29 ..
    lrwxrwxrwx 1 root root 13 Nov 25 14:29 usb-ZEPHYR_nRF_Sniffer_for_Bluetooth_LE_49F8F9D7E8AE3B9E-if00 -> ../../ttyACM0

    nrfjprog --version
    nrfjprog version: 10.24.2 external
    JLinkARM.dll version: 7.94e

    source ~/zephyrproject/.venv/bin/activate
    cd ~/zephyrproject/zephyr
    west build -p -b nrf52840dk/nrf52840 samples/basic/blinky
    ...
    [3/135] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.0.0-rc3 (/home/yc/zephyrproject/zephyr), build: v4.0.0-rc3-227-g9ffc4b1df8a7
    [135/135] Linking C executable zephyr/zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 18732 B 1 MB 1.79%
    RAM: 5696 B 256 KB 2.17%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from /home/yc/zephyrproject/zephyr/build/zephyr/zephyr.elf for board: nrf52840dk

    west flash
    -- west flash: rebuilding
    ninja: no work to do.
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: reset after flashing requested
    FATAL ERROR: Unable to find a board; is the board connected?

    Then I tried to hold the IF BOOT/RESET button and unplug/plug the USB cable to reboot. The board has no change.

    I'm wondering how I can flash the board back to MCUBoot mode or other program so that I can use west flash.

    Thanks!

  • Just to make sure I don't understand, the nRF52840-DK have two USB ports, one used for programming and debugging (e.g. used by nrfjprog), and one USB port used for the application that might be running on the nRF52840.

    Kenneth

  • There are two USB ports.
    I connected the two ports. And the system only showed the port of the nRF USB. The port next to the Battery can't be discovered.

  • Sorry to ask, but is the Power switch put to ON? Which LEDs turn ON? And both USB cables do have data lines (and not only power for charging).

    Any unknown devices in Device Manager in Windows?

    Edit: If there are unknown devices in Windows, if you for instance download SEGGER USB Driver for J-Link from SEGGER J-Link v7.94i. Navigate to the download location of the J-Link executable and run the following commands from the Command Prompt (run "cmd" in windows):

    JLink_Windows_V794i_x86_64.exe -InstUSBDriver=1

    Does that make any difference?

    Kenneth

  • The Power switch is ON.

    LED1 blinks fast.

    Both USB cables have data lines.

    I work on Ubuntu 20.04.

    Is there a way to force the board to enter booting mode?

Reply Children
No Data
Related