RF-star RF-DG-40A Bluetooth Low Energy 5.0 nRF52840 USB Dongle User Guide

June 6, 2024
RF-star

RF-DG-40A Bluetooth Low Energy 5.0 nRF52840 USB Dongle

RF-DG-40A Bluetooth Low Energy 5.0 nRF52840 USB Dongle User Guide
Version 1.1
Shenzhen RF-star Technology Co., Ltd. Nov. 25th, 2020

www.szrfstar.com

Table of Contents

RF-DG-40A
V1.1 – Nov. 2020

Table of Contents……………………………………………………………………………………………………………………………………………. 1 1 Device Overview …………………………………………………………………………………………………………………………………………. 2
1.1 Description………………………………………………………………………………………………………………………………………… 2 1.2 Key Features ……………………………………………………………………………………………………………………………………. 2 1.3 Application ………………………………………………………………………………………………………………………………………… 2 2 Minimum Requirements …………………………………………………………………………………………………………………………….. 3 3 Kit Content……………………………………………………………………………………………………………………………………………………. 4 3.1 Hardware Content …………………………………………………………………………………………………………………………… 4 3.2 Download Content…………………………………………………………………………………………………………………………… 4 4 Getting Started…………………………………………………………………………………………………………………………………………….. 5 A How to Build a Connection ……………………………………………………………………………………………………………….. 5 How to Read and Write …………………………………………………………………………………………………………………………. 9 5 ZigBee Sniffer Packet Capture………………………………………………………………………………………………………………..11 5.1 Software Preparation……………………………………………………………………………………………………………………..11 5.2 Environment Setup…………………………………………………………………………………………………………………………12
5.2.1 Configure Wireshark Environment …………………………………………………………………………………..12 5.2.2 Burn Firmware to nRF52840 Dongle ………………………………………………………………………………14 5.2.3 Restart the Computer (It Must Be Done)………………………………………………………………………..15 6 Programming………………………………………………………………………………………………………………………………………………16 7 Hardware Description ……………………………………………………………………………………………………………………………….17 7.1 Hardware Drawings ……………………………………………………………………………………………………………………….17 7.2 Block Diagram…………………………………………………………………………………………………………………………………18 7.3 SWD Interface…………………………………………………………………………………………………………………………………19 7.4 Buttons and LEDs…………………………………………………………………………………………………………………………..19 7.5 USB…………………………………………………………………………………………………………………………………………………..20 7.6 External Connections …………………………………………………………………………………………………………………….20 8 Revision History …………………………………………………………………………………………………………………………………………22 9 Contact Us…………………………………………………………………………………………………………………………………………………..23

Shenzhen RF-star Technology Co., Ltd.

Page 1 of 23

www.szrfstar.com

RF-DG-40A
V1.1 – Nov. 2020

1 Device Overview

1.1 Description

The nRF52840 Dongle is a small, low-cost USB dongle that supports Bluetooth® Low Energy 5, Bluetooth mesh, Thread, ZigBee, 802.15.4, ANT and 2.4 GHz proprietary protocols. The Dongle is the perfect target hardware for use with nRF Connect for Desktop as it is low-cost but still support all the short range wireless standards used with Nordic devices. The dongle has been designed to be used as a wireless HW device together with nRF Connect for Desktop as well as programming through nRFUtil. For other use cases please do note that there is no debug support on the Dongle, only support for programming the device and communicating through USB. It can also be used to develop code for the nRF52840 SoC mounted on the dongle. Programming is supported through a USB enabled bootloader. Connectors for external debuggers are available. It is supported by most of the nRF Connect for Desktop APPs and will automatically be programmed if needed. In addition custom applications can be compiled and downloaded to the Dongle. It has a user programmable RGB LED, a green LED, a user programmable button as well as 15 GPIO accessible from castellated solder points along the edge. Example applications are available in the nRF5 SDK under the board name PCA10059.

1.2 Key Features

Bluetooth 5 ready multiprotocol radio – 2 Mbps – Long Range – Advertising Extensions – Channel Selection Algorithm #2 (CSA #2)
IEEE 802.15.4 radio support – Thread – Zigbee
Arm® CortexTM-M4 with floating point support DSP instruction set

Arm CryptoCell CC310 cryptographic accelerator 15 GPIO available via edge castellation USB interface direct to nRF52840 SoC Integrated 2.4 GHz PCB antenna 1 user-programmable button 1 user-programmable RGB LED 1 user- programmable LED 1.7 V ~ 5.5 V operation from USB or external NFC available

1.3 Application

Advanced wearables – Advanced personal fitness devices – Connected health
IoT – Connected home sensors and controllers

– Industrial IoT sensors and controllers Interactive entertainment devices
– Advanced remote controls – Gaming controllers
– Virtual/Augmented Reality applications

Shenzhen RF-star Technology Co., Ltd.

Page 2 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

2 Minimum Requirements

Before you start, check that you have the required hardware and software.
Hardware requirements PC with a standard type-A USB port RF-DG-40A Software requirements nRF Connect for Desktop
Download address: https://www.nordicsemi.com/Software-and-tools/Development- Tools/nRF-Connect-for-desktop/Download#infotabs Operating system: macOS, Linux, or Windows 7 or later

Shenzhen RF-star Technology Co., Ltd.

Page 3 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

3 Kit Content

The nRF52840 Dongle consists of hardware (RF-DG-40A), access to application firmware examples, documentation, hardware schematics, and layout files.

3.1 Hardware Content The nRF52840 Dongle hardware consists of the board (RF- DG-40A).

Figure 1. RF-DG-40A (Front)

Figure 2. RF-DG-40A (Back)
3.2 Download Content
The nRF52840 Dongle downloadable content consists of a software tool, application firmware examples, and hardware files. Software nRF Connect for Desktop

Shenzhen RF-star Technology Co., Ltd.

Page 4 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

4 Getting Started

Complete a few steps to set up the hardware and install the required software. Before you start, check Minimum requirements on page 3.

A How to Build a Connection
Connect the Dongle RF-DG-40A to a computer and get started with nRF Connect for Desktop. 1. Download and install nRF Connect for Desktop.
This includes the driver for the nRF52840 USB Device Firmware Upgrade (DFU) feature. For documentation on the tool, see nRF Connect. 2. Insert the nRF52840 Dongle in a USB port on your computer. The status light (LD2) starts pulsing red, indicating that the Dongle is powered up and is in bootloader mode. After a few seconds, the computer will recognize the Dongle as a USB composite device. The driver needed for the nRF52840 USB DFU feature is also installed. 3. Open nRF Connect for Desktop, choose Bluetooth Low Energy. If there is no Open choice, you need to install, see as follows:

4. After installation, click Open and the following interface will appear. At this time, you need to select the corresponding Dongle device to use normally.

Shenzhen RF-star Technology Co., Ltd.

Page 5 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

5. Click Select device to pop up the device name, and then click Select the corresponding device (the device name actually corresponds to the MAC address of the device).

6. After selecting the device successfully, the following interface will appear. You can click Generic Access to view the information about the device as the host. Then click Start scan to start scanning the broadcast device.

Shenzhen RF-star Technology Co., Ltd.

Page 6 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

7. After clicking Start scan, the scanned devices will be listed in the window on the right.

Shenzhen RF-star Technology Co., Ltd.

Page 7 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

8. If there are too many devices to find a specific device, you can click the small triangle of Option and enter the device name or MAC address in the filter box to filter the redundant devices. Check “Sort by signal strength” to select whether the signals are arranged in descending order from strong to weak.

9. Click Connect to specify the slave, and the interface is as follows:

10. Multi connection operation: just click Connect in the scan window on the right (without disconnecting the currently connected device), you can connect multiple slaves.

Shenzhen RF-star Technology Co., Ltd.

Page 8 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

How to Read and Write
1. Device read operation. For example, to read the 8902 channel of the 8900 service, you only need to click the arrow to complete the reading, provided that the characteristic value of the service has a read attribute.

Shenzhen RF-star Technology Co., Ltd.

Page 9 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

2. Device write operation. For example, to write 17 bytes of 0xff to 8901 channel of 8900 service, just fill in the data in the box in the figure and click the button indicated by the arrow, provided that the characteristic value of the service has write attribute.

3. Receive a notify message. For example, to receive the notify notification of 8900 service from 8901 channel, you need to click the button indicated by the arrow to receive the message of the channel, provided that the characteristic value of the service has the notify attribute.

Shenzhen RF-star Technology Co., Ltd.

Page 10 of 23

www.szrfstar.com
5 ZigBee Sniffer Packet Capture 5.1 Software Preparation
Official ZigBee Sniffer firmware Download address: https://github.com/NordicSemiconductor/nRF-Sniffer-for-802.15.4
Wireshark 2.4.5 and above version Download address: https://www.wireshark.org/#download
Pay attention to the following points when installing Wireshark 1. Click “Wireshark Desktop Icon”.

RF-DG-40A
V1.0 – Apr., 2020

2. Click “USBPcap” and install.

3. Python 2.7 and above development environment. Python 3.7 version is used here. Shenzhen RF-star Technology Co., Ltd.

Page 11 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

Download address: https://www.python.org/downloads/release/python-374/ Click “next” at each step when installing python
5.2 Environment Setup 5.2.1 Configure Wireshark Environment
1. Open Wireshark -> help -> about Wireshark -> folder -> double-click to open extcap path, as shown in the figure below:

2. Unzip the nRF-Sniffer-for-802.15.4-master.zip file and copy the “nrf802154_sniffer.py” and “nrf802154_sniffer.bat” files in the nrf802154_sniffer folder to the Wireshark extcap path just opened. As shown in the figure below:

No matter how complicated the environment is, the operation can work as long as there are two files. 3. Open wireshark to set the parameters, click Ctrl + Shift + P to enter Wireshark preferences. Search Protocols ->

Shenzhen RF-star Technology Co., Ltd.

Page 12 of 23

www.szrfstar.com
IEEE 802.15.4, click Decryption Keys, edit the decryption key to the following settings: “Decryption key”: 00112233445566778899 aabbccddeeff “Decryption key index”: 0 “Key hash”: Thread hash

RF-DG-40A
V1.0 – Apr., 2020

4. Search Protocols -> Thread “Thread sequence counter”: 00000000 Click “Use PAN ID as first two octets of master key” Click “Automatically acquire Thread sequence counter”, as shown in the figure below:

5. Search Protocols -> 6LoWPAN Click “Derive ID according to RFC 4944”
Shenzhen RF-star Technology Co., Ltd.

Page 13 of 23

www.szrfstar.com
“Context 0”: fdde:ad00:beef:0::/64 “Context 1”: 64:FF9B::/96 ­ for working with Nordic Thread Border Router “Context 2”: Native IPv6 global prefix that is being propagated in the Thread Network.

RF-DG-40A
V1.0 – Apr., 2020

6. Search Protocols -> CoAP “CoAP UDP port to”: 61631

5.2.2 Burn Firmware to nRF52840 Dongle
1. Insert the nRF52840 Dongle into the USB port. 2. Press the reset button to enter DFU mode. LD2 LED starts to flash blue. 3. Enable nRF Connect for Desktop, and enable the Programmer. 4. Select Nordic Semiconductor DFU Bootloader from the device list. 5. Click to add the hexadecimal file, and then select “nrf802154_sniffer_dongle.hex” in the nrf802154_sniffer folder
under the nRF-Sniffer-for-802.15.4-master folder. 6. Make sure that the beginning of the firmware map address is 0x00001000. If the wrong hexadecimal file is selected,
the MBR part may be overwritten. 7. Click to write to the updated firmware. 8. Remove the dongle from the USB port and plug it in again. Do not press the “reset” button.

Shenzhen RF-star Technology Co., Ltd.

Page 14 of 23

www.szrfstar.com
5.2.3 Restart the Computer (It Must Be Done).
1. Restart the computer. 2. Plug the nRF52840 Dongle with the firmware into the computer. 3. Then open wireshark, it will identify a nRF sniffer for 802.15.4 device.

RF-DG-40A
V1.0 – Apr., 2020

4. Set the corresponding ZigBee channel. 5. Click start to grab the ZigBee communication package under the current channel.

Shenzhen RF-star Technology Co., Ltd.

Page 15 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

6 Programming

The nRF52840 Dongle can be programmed through the built-in USB bootloader.
Before you start, check Getting started on page 3. To program the Dongle, it must be in bootloader mode. The Dongle can be made to enter bootloader mode in one of the two ways: Trigger the nRF52840 USB DFU endpoint. The firmware to support this is embedded in all nRF Connect for Desktop apps for the nRF52840 Dongle. If you add the DFU Trigger Library (USB) to your custom device firmware, you will be able to trigger the DFU from nRF Connect for Desktop without using any buttons. For documentation, see DFU Trigger Library (USB), which is part of the nRF5 SDK v15.2.0. For Dongles with applications missing the USB DFU endpoint: Press the RESET button.

When the nRF52840 Dongle has entered the bootloader mode, LD2 pulses red. The Dongle is now ready for programming. All the nRF Connect for Desktop apps require specific firmware to be present on the nRF52840 Dongle to function correctly. The apps will update the firmware if needed. If you want to upload a custom firmware to the Dongle, you can do this by using the dedicated Programmer programming app, or nrfutil.

Shenzhen RF-star Technology Co., Ltd.

Page 16 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

7 Hardware Description

The nRF52840 Dongle can be used as a development platform for the nRF52840 SoC. It features user configurable LEDs and a button as well as multiple GPIOs available along the board edges. In addition to radio communication, the nRF52840 SoC can communicate with a computer through USB.

7.1 Hardware Drawings
The nRF52840 Dongle hardware drawings show both sides of the RF-DG-40A board.

Figure 3. RF-DG-40A Dongle (Front)

Figure 4. RF-DG-40A Dongle (Back)

Shenzhen RF-star Technology Co., Ltd.

Page 17 of 23

www.szrfstar.com The PCB footprint is as follow:

RF-DG-40A
V1.0 – Apr., 2020

Figure 5. RF-DG-40A PCB Footprint
7.2 Block Diagram
The block diagram illustrates the nRF52840 Dongle functional architecture. 32.0 MHz 32.768 kHz

USB

GPIOs

+5 V

Button

nRF52840

NFC

IPEX Connector

Low-pass Filter

Antenna Matching

PCB Antenna

Reset

Power Supply

Figure 6. Block Diagram of RF-DG-40A

Shenzhen RF-star Technology Co., Ltd.

Page 18 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

7.3 SWD Interface
On the back side of the nRF52840 Dongle, there are connection points for the SWD interface. The dongle is equipped with a footprint for two different connectors. On footprint P1, a standard 2×5-pin pin header with a 1.27 mm pitch can be soldered. On footprint J2, it is possible to connect a TC2050 cable from Tag-Connect.

Figure 7. SWD Interface Connectors For instance, a Nordic development kit can be used as a programmer for the Dongle.
7.4 Buttons and LEDs
The nRF528540 Dongle is equipped with a green LED (LD1), a multicolor RGB LED (LD2), a user configurable button (SW1), and a reset button (SW2). The LEDs and buttons are connected to dedicated I/Os on the nRF52840 SoC.

Figure 8. nRF52840 Dongle Buttons and LEDs

Shenzhen RF-star Technology Co., Ltd.

Page 19 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

Part

Description

GPIO

SW1

Button

P1.06

SW2

Reset

P0.18

LD1

Green

P0.06

LD2

Red

P0.08

LD2

Green

P1.09

LD2

Blue

P0.12

The buttons are active low, which means that the input will be connected to ground when the button is activated. The

SW1 button has no external pull-up resistor, but the reset button (SW2) has a 10 k pull-up resistor. To use SW1, P1.06

must be configured as an input with an internal pull-up resistor.

The LEDs are active low, which means that writing a logical zero ‘0’ to the output pin will illuminate the LED.

7.5 USB
The nRF52840 Dongle features a USB-A-type connector printed on the circuit board.

Figure 9. USB Port
7.6 External Connections
The nRF52840 Dongle has 15 GPIOs in addition to the ground, power, and SWD connections along the castellated edges. The castellated edge holes have a pitch of 0.1 inches (2.54 mm) and a row spacing of 0.6 inches (15.24 mm)2, making it suitable for stripboard connection. Test points for additional nine GPIOs are available on the back side of the circuit board, leaving a total of 24 GPIOs accessible. Note: There is no reverse voltage protection on the power connections.

Shenzhen RF-star Technology Co., Ltd.

Page 20 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

The SWD connections are located 0.2 inches (5.08 mm) away from the GPIOs with a row spacing of 0.4 inches (10.16 mm)

Shenzhen RF-star Technology Co., Ltd.

Page 21 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

8 Revision History

Date

Version No. Description

Author

2020.04.17

V0.1

The initial version is released.

Aroo Wang

2020.04.23

V1.0

Add SWD interface specification.

Aroo Wang

2020.09.17

V1.1

Add ZigBee Sniffer packet capture instructions. Update pin diagram.

Aroo Wang

2020.11.25

V1.1

Change the error description of the LED color when entering Aroo Wang
BootLoader

Note: 1. The document will be optimized and updated from time to time. Before using this document, please make sure it is
the latest version. 2. To obtain the latest document, please download it from the official website: www.szrfstar.com.

Shenzhen RF-star Technology Co., Ltd.

Page 22 of 23

www.szrfstar.com

RF-DG-40A
V1.0 – Apr., 2020

9 Contact Us

SHENZHEN RF-STAR TECHNOLOGY CO., LTD. Shenzhen HQ: Add.: Room 601, Block C, Skyworth Building, High-tech Park, Nanshan District, Shenzhen, Guangdong, China Tel.: 86-755-3695 3756 Chengdu Branch: Add.: No. B3-03, Building No.1, Incubation Park, High-Tech District, Chengdu, Sichuan, China, 610000 Tel.: 86-28-6577 5970

Email: sunny@szrfstar.com, sales@szrfstar.com Web.: www.szrfstar.com

Shenzhen RF-star Technology Co., Ltd.

Page 23 of 23

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals