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

NRF-{BT,802154}-SNIFFER NRFUTIL nRF52840 DONGLE HEX TO DFU ZIP --SD-REQ

Hello world :-)

I would like to use Bluetooth Low Energy Sniffer [1] and 802.15.4 Sniffer [2] on nRF52840 DONGLE using my FreeBSD workstation.  I did manage to build the`nrfutil` (no nRF Connect and other closed source utilities). DFU mode reuires ZIP package not HEX files that are provided with these project releases.

I have noticed that using `--debug-mode` allows me to skip the cryptography part which is not important here.

I have noticed that `--hw-version` should be `52` for the nRF52 family.

I am not sure what parameter should I use with `--sd-req`. Using `0` generates the DFU ZIP package and it gets flashed, but I can only work with 802.154 Sniffer (it shows as umodem device and I can talk to it over minicom serial terminal) while BLE Sniffer does not work (it shows as umodem device but I cannot talk to it over minicom serial terminal).

What is the in depth purpose of this `--sd-req` switch? Does it filter all available options for the hardware that DFU ZIP will be flashed in order to avoid flashing into incompatible hardware? Does it perform some soft of selection and/or glue of the provided HEX with selected SoftDevice and it really matters to provide valid numbers for 802.15.4 and different nubers for BLE?

My observstions:

* NRF-BT-SNIFFER Firmware 3.0.0 and 3.1.0 works with nRF52840DK + Wireshark, using DEBUG VCP not the nRF USB port.

* NRF-BT-SNIFFER Firmware 3.0.0 works with nRF52DK_nRF52832 + Wireshark.

* NRF-BT-SNIFFER Firmware 3.1.0 does NOT seem to work with nRF52DK_nRF52832, as above it sends something over DEBUG VCP as this device does not have its own USB port.. and although I can see and read from the umodem /dev/cuaU0 port the script does not recognise it and so it is not visible in Wireshark.

* NRF-BT-SNIFFER adds support for nRF52840 DONGLE in 3.1.0 Firmware version. After conversion from HEX to DFU ZIP this firmware flashes into DONGLE, it shows up as umodem, but it remains silent and no Wireshark/script finds it.

My questions:

* Are problems with NRF-BT-SNIFFER that common?

* Why there is no dedicated repository for NRF-BT-SNIFFER on GitHub while NRF-SNIFFER-802154 has its own repo?

* Why those Sniffers are not Open-Souce?

* Is this DONGLE problem related with NRFUTIL DFU ZIP conversion using invalid SD-REQ parameter or the Firmware itself?

Host OS: `FreeBSD 0xCFMX4 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64`

Any hints welcome :-)

Tomek

[1] www.nordicsemi.com/.../nRF-Sniffer-for-Bluetooth-LE

[2] github.com/.../nRF-Sniffer-for-802.15.4

  • Hello,

     

    What is the in depth purpose of this `--sd-req` switch?

     It is used to make sure that the correct softdevice (BLE stack) is programmed when you do an OTA (Over The Air) DFU. Imagine if you have an end product, and you roll out an update to your customers, but some customers didn't update the BLE stack (perhaps they skipped the previous update). When you update the application which was intended for a newer softdevice, the application and softdevice doesn't work together anymore. Then you may have bricked the device, because the application wouldn't be able to start advertising anymore, so you can't connect to it, and you can't update it again. It is just a failsafe. Setting --sd-req to 0x00 means that the bootloader will ignore the softdevice requirement, and accept any DFU image. As long as you have some way to program it again if something goes wrong that is fine. 

    Have you tried to flash the dongle with the sniffer_nrf52840dongle_nrf52840_7cc811f.hex using nRF Connect for Desktop?

    If not can you please try to do so? The reason I ask you to test this is to find out whether this is an issue with your DFU setup or the wireshark/sniffer for iOS itself.

    I have no issues with neither the nRF52840 dongle nor the nRF52832 DK in sniffer v3.1.0. The nRF52832 doesn't have an peripheral USB, but the .hex file doesn't use USB. It uses UART. It is the Segger programmer on the DK that translates from UART to USB.

    Best regards,

    Edvin

  • Hello and thank you for all hints :-)

    I have installed nrfConnect + Programmer on Windoze (yuck). Long story short DAPLink/JLink can flash boards with HIC installed, NRFUTIL can flash DFU devices without HIC where only DFU is available.

    Detailed notes below:

    * nRF52DK_nRF52832 works only with BLE Sniffer 3.0.0 not with 3.1.0. Newer one seems broken as described previously something shows up on the VCP but Wireshark does cannot reliably open and listen to radio traffic. It works fine with 3.0.0.

    * nRF52840 DONGLE does not work. Flashed with nrfConnect gives the same results as the open-source utility NRFUTIL. Device is programmed, it shows up, led is blinking, but serial port is silent, also Wireshark does not find a device. Please note that the same configuration works fine with nRF52DK+3.0.0. Looks like a bug in sniffer firmware for DONGLE?

    * nRF52840DK works fine with 3.0.0 and 3.1.0 device is visible in Wireshark and all packets are captured from radio over HIC/VCP.

    My requests:

    * please provide DFU ZIP files next to HEX files for DFU capable devices so they can be flashed easily with shell open-source utilities on open-source platforms where user can compile and run those applications. This includes firmware for nRF52840_DOGNLE both for BLE Sniffer as well as 802.15.4 Sniffer.

    * please provide firmware files in Download section of the 802.15.4 Sniffer website [1]. As for now there is only something named nrfgostudio for windows available.

    * please update file names in Release section of the 802.15.4 GitHub repository [2] so they reflect reality - provided are only binary files of the firmware not the source code.

    * please provide a GitHub repository for the BLE Sniffer.

    * please provide source code for both Sniffers BLE and 802.15.4.

    * source codes for Sniffers are probably written in Zephyr - they would serve as a extremely valuable example and starting point for advanced applications for both nRF chips and Zephyr running on them.

    Thank you :-)

    Tomek

    [1] www.nordicsemi.com/.../Download

    [2] github.com/.../releases

  • Different approach - does BLE and 802.15.4 sniffer firmware contain SoftDevice linked into the provided HEX file?

    If SD is included into HEX, the `--sd-req` does not matter here and the sniffer should work outside of the box.

    If SD is not included into HEX, then documentation should be updated and additional HEX with SoftDevice provided..?

    I guess that correct SD is included into provided HEX firmware images?

    Why some boards work with different firmware versions while others do not?

  • Hi

    Edvin is out of office for the time being, so I have been assigned this case while he is away. I have not yet tested v3.1.0 of the BLE sniffer as I'm working from home today and don't have the necessary equipment, but I'll do so on Monday to see if I can reproduce this issue on the nRF52832 DK and/or the nRF52840 Dongle.

    The Programming the nRF Sniffer firmware page was updated for v3.1.0 of the BLE sniffer, so please make sure you've followed all the steps necessary to run the device on the nRF52840 Dongle. 

    The reason we don't have a public repository for our nRF Sniffer firmware is because our sniffer firmware is not open source, so a GitHub repository or source code for the nRF BLE Sniffer is not likely to be released I'm afraid.

    As for your requests, I will forward them internally, but I can't guarantee that these updates will come right away:

    Please check out the nRF Sniffer for 802.15.4 user guide here to see how to set up the 802.15.4 sniffer if that is interesting to you. 

    The necessary SoftDevice should indeed be included in the provided .hex files.

    As Edvin said, he got the v3.1.0 version of the BLE sniffer to work on both an nRF52832 DK and an nRF52840 Dongle, and I myself have not had any issues with any DKs and v3.0.0. Both version 3.0.0 and 3.1.0 should work for all the supported boards, except 3.0.0 with the nRF52840 Dongle, as support was not included for this specific board in v3.0.0, so I'm guessing the root cause for these problem is somewhere else.

    Best regards,

    Simon

  • Thank you especially for tips on configuring Wireshark for 802.15.4 sniffing, I did not see that before, I did not get there yet :-)

    The problem is I cannot even connect to the DONGLE from Wireshark as it is not on the device list neither BLE nor 802.15.4. A proof that BLE and 802.15.4 Sniffer works with DONGLE would be really helpful for me to know if my configuration fails. When you guys have a free moment such verification would be great to have, thank you in advance :-)

    The programming of the Dongle seems to work the same way both using nRFConnect and NRFUTIL. This is a good conclusion of our discussion.

    I consider this solution to be experimental not really production ready. Can you recommend a good

    out-of-the-box solution for BLE and 802.15.4 sniffing preferably low-cost and open-source?

    Best regards :-)

    Tomek

Related