This manual provides an introduction to the NXP JN517x-DK005 Development Kit,
based around the JN517x family of wireless microcontrollers. The manual also
describes how to run the pre-loaded ZigBee Smart Home Demonstration using
components from the kit. In addition, information is provided on the wireless network
protocols supported by the development kit and the NXP resources available to
develop custom JN517x applications using these protocols.
Organisation
This manual consists of three chapters and five appendices, as follows:
JN517x-DK005 Development Kit
User Guide
Chapter 1 introduces the JN517x-DK005 Development Kit and outlines the key
concepts for an understanding of wireless networks.
Chapter 2 describes how to use the development kit to set up and run the
pre-loaded ZigBee Smart Home Demonstration.
Chapter 3 provides guidance on where to go next in order to develop custom
JN517x applications that can be run on the components of the kit.
The Appendices provide:
Details of the individual kit components
Guidance on setting up a packet sniffer using one of the supplied dongles
Guidance on re-programming the firmware of certain kit components
Instructions for installing the FTDI device driver for USB connections
Regulatory information for the kit
Files, folders, functions and parameter types are represented in bold type.
Function parameters are represented in italics type.
Code fragments are represented in the Courier New typeface.
This is a Tip. It indicates useful or practical information.
This is a Note. It highlights important additional
information.
This is a Caution. It warns of situations that may result
in equipment malfunction or damage.
Acronyms and Abbreviations
ADCAnalogue to Digital Converter
API Application Programming Interface
DCDirect Current
DHCPDynamic Host Configuration Protocol
DIODigital Input/Output
FTDIFuture Technology Devices International
GPIOGeneral Purpose Input/Output
HAHome Automation
IEEEInstitute of Electrical and Electronics Engineers
IoTInternet of Things
IPInternet Protocol
JTAGJoint Test Action Group
LANLocal Area Network
LEDLight Emitting Diode
LPRFLower Power Radio Frequency
NFCNear Field Communication
PSUPower Supply Unit
PWMPulse Width Modulation
RFRadio Frequency
RTOSReal Time Operating System
SBCSingle Board Computer
SDKSoftware Developer’s Kit
SMASubMiniature version A
SSIDService Set Identifier
UARTUniversal Asynchronous Receiver/Transmitter
USBUniversal Serial Bus
WANWide Area Network
WPANWireless Personal Area Network
User Guide
ZCLZigBee Cluster Library
ZLLZigBee Light Link
Related Documents
JN-UG-3109 JN517x LPCXpresso Installation and User Guide
JN-UG-3099 JN51xx Production Flash Programmer User Guide
JN-UG-3112 NFC Commissioning User Guide
JN-AN-1216 ZigBee 3.0 IoT Control Bridge Application Note
JN-AN-1217 ZigBee 3.0 Base Device Template Application Note
JN-AN-1218 ZigBee 3.0 Light Bulbs Application Note
JN-AN-1219 ZigBee 3.0 Controller and Switch Application Note
JN-AN-1220 ZigBee 3.0 Sensors Application Note
JN-RD-6036 Carrier Boards and Expansion Boards Reference Design
Support Resources
To access online support resources such as SDKs, Application Notes and User
Guides, visit the Wireless Connectivity area of the NXP web site:
www.nxp.com/products/wireless-connectivity
All NXP resources referred to in this manual can be found at the above address,
unless otherwise stated.
Welcome to the JN517x-DK005 Development Kit, which is based around the NXP
JN517x family of wireless microcontrollers. A ZigBee Smart Home Demonstration is
pre-loaded into certain kit components, allowing a small wireless network with IP
connectivity to be quickly assembled and used. The development kit can also be used
in conjunction with NXP’s range of Software Developer’s Kits (SDKs) to develop new
wireless network applications for the JN517x devices. Support resources are also
provided to allow the integration of a network into the ‘Internet of Things’ (IoT).
The wireless network protocols supported by the development kit are as follows:
Note: The pre-loaded ZigBee Smart Home
Demonstration is based on ZigBee 3.0 with ZLO
devices.
User Guide
This chapter introduces you to the development kit and wireless networks by
describing:
Contents of the kit - see Section 1.1
Wireless network fundamentals - see Section 1.2
IP connectivity - see Section 1.3
Network commissioning - see Section 1.4
Pre-loaded ZigBee Smart Home Demonstration - see Section 1.5
Note 1: Details of the individual hardware components
of the kit are provided in
Note 2: If you wish to run the pre-loaded ZigBee Smart
Home Demonstration, go to
procedure for running this demonstration is also
provided on the JN517x-DK005 Getting Started sheet (JN-UG-3120), which is supplied in the kit box.
The JN517x-DK005 Development Kit contains the hardware components req uired to
assemble a wireless network which may be connected to an IP-based network (such
as the Internet). The principal network components included in the kit are:
Carrier Boards which host a JN5179 module and which can be fitted with the
supplied Expansion Boards (see below) to achieve the desired functionality they are fitted with NFC tags that can be read using the supplied NFC reader
Expansion Boards which can be mounted on the Carrier Boards in order to
provide them with the required functionality: Lighting/Sensor or Generic
Modules including the JN5179 standard-power modules pre-fitted to the
Carrier Boards and JN5179 high-power modules (for use in territories where
the local RF regulations allow)
Dongles including JN5179 USB Dongles (featuring the JN5179 wireless
microcontroller) and a Wi-Fi adaptor for the Raspberry Pi board (see below)
Raspberry Pi 2 Computer which, together with a JN5179 USB Dongle, forms
an IoT Gateway that allows the wireless network to be connected to an IPbased network, including the Internet.
NFC Controller Board which connects to the Raspberry Pi board and can be
used to read the NFC tags on the Carrier Boards to implement NFC
commissioning
The contents of the kit are shown in the photograph below.
The full contents of the kit are listed below (numbers refer to Figure 1 above).
1.Raspberry Pi 2 single-board computer (Model B) and microSD card
(Note a)
2.Wi-Pi Raspberry Pi 802.11n wireless adaptor (for Wi-Fi connectivity)
3.2 JN5179 USB Dongles with integrated antenna
(Note b)
4.2 Carrier Boards with integrated NFC tags:
4a. One pre-fitted with a Generic Expansion Board and a
JN5179 standard-power module with integrated antenna
4b. One pre-fitted with a Lighting/Sensor Expansion Board and a
JN5179 standard-power module with integrated antenna
5.2 JN5179 high-power modules
(Note c)
(Note b)
(Note b)
6.2 antennas with fly-leads for JN5179 modules with uFL connectors
7.PN7120 NFC Controller Board with Raspberry Pi Interface Board
8.5V DC power supply unit (universal type) with USB ports for Raspberry Pi
9.‘USB to Micro USB’ cable (for powering Raspberry Pi from 5V PSU)
10. 2 'USB to USB' extension cables (for use with Wi-Pi adaptor and USB dongle)
11. 2 'USB A to Mini B' cables
12. RJ45 Ethernet cable
13. microSD card adaptor
14. Pack of 10 AAA batteries
Notes:
a) The Raspberry Pi 2 board’s microSD card is programmed with NXP firmware (an adaptor is
provided to allow re-programming of the microSD card from a PC).
b) The pre-fitted JN5179 modules and the JN5179 USB Dongle with a green sticker are pre-
programmed with the relevant binaries for the ZigBee Smart Home Demonstration. The
JN5179 USB Dongle with a red sticker is pre-programmed as a packet sniffer.
c) The JN5179 high-power modules provide an RF output of +20dBm (compared with the
+10dBm of a standard-power module) and can only be used in territories where the RF
regulations allow them.
For more details on the hardware components of the kit, refer to Appendix A.
Additional Nodes (Available Separately)
JN517x-XK030 Generic Node Expansion Kit: Carrier Board with a Generic
Expansion Board and JN5179 module with integrated antenna
JN517x-XK040 Lighting/Sensor Node Expansion Kit: Carrier Board with a
Lighting/Sensor Expansion Board and JN5179 module with integrated antenna
JN5179 USB Dongle (OM15021): Pre-programmed as a packet sniffer
This section covers the basic concepts that are relevant to the wireless network
protocols supported by the JN517x-DK005 Development Kit, notably IEEE 802.15.4
and ZigBee PRO (which is itself built on IEEE 802.15.4) used in the ZigBee 3.0
standard. For a more complete introduction to wireless networks, refer to the manual
for the relevant protocol (see
The topics covered are:
Radio frequency - see Section 1.2.1
Network identification - see Section 1.2.2
Node types - see Section 1.2.3
Network formation and topology - see Section 1.2.4
Wireless network protocol stacks - Section 1.2.5
1.2.1Radio Frequency
The JN5179-based devices of the development kit communicate in the 2400-MHz
radio frequency (RF) band. This is one of the standard RF bands used by the IEEE
802.15.4 wireless network protocol (on which all the supported protocols are based),
and is available for unlicensed use in most geographical areas (check your local radio
communication regulations).
Section 3.3).
The 2400-MHz band spans radio frequencies 2400 to 2483.5 MHz and is divided into
16 channels, numbered 11 to 26 (the numbers up to 10 are used for other RF bands)
Figure 2 below.
- see
Figure 2: 2400-MHz RF Band
The channel of operation for a network can be specified by the application or,
alternatively, the network can search for the best channel (the one with least detected
activity) at system start-up.
A wireless network must have a unique identifier which allows it to be distinguished
from other networks in the same operating neighbourhood. IEEE 802.15.4-based
protocols use a 16-bit value called the PAN ID. This identifier can be pre-defined in the
user application or chosen by the PAN Co-ordinator which creates the network (see
Section 1.2.3), but it must not clash with the PAN ID of a neighbouring network.
A wireless network protocol may also use its own network identifier (in addition to the
PAN ID) - for example, in the ZigBee PRO protocol, a 64-bit Extended PAN ID (EPID)
is also used.
1.2.3Node Types
In addition to running an application (e.g. temperature measurement), each node of a
wireless network has a networking role. Most IEEE 802.15.4-based networks can
contain three types of node differentiated by their networking roles, as follows:
Node TypeDescription
User Guide
Co-ordinatorA wireless network has one and only one Co-ordinator, or PAN Co-ordinator. This
node has a role in starting and forming the network, and can also have a routing role
(passes messages from one node to another). Messages can also originate and
terminate here.
RouterThis node passes messages from one node to another. Messages can also originate
and/or terminate at a Router. This node type is also sometimes referred to as a Local
Co-ordinator.
End DeviceThis node is simply a place where messages can originate and/or terminate (the
node does not have a routing role). In order to conserve power, an End Device can
sleep when it is not required to be active.
1.The first node to be started is the Co-ordinator, which performs network
initialisation including the selection of the radio channel in which the network
will operate (see
1.2.2).
2.Once the initialisation is complete, the Co-ordinator allows other nodes to join
it as its ‘children’ - the Co-ordinator is referred to as a ‘parent’. These child
nodes can be Routers and/or End Devices.
3.Each Router may itself become a parent by allowing child nodes to join it
(which may themselves be Routers and/or End Devices). In this way, the
network grows.
A number of network shapes or topologies are possible, which are dependent on the
wireless network protocol used. These are the Star, Tree and Mesh topologies,
described in the sub-sections below.
1.2.4.1Star Networks
Section 1.2.1) and the PAN ID of the network (see Section
A Star network contains only one routing node, which is the Co-ordinator. Thus, all
messages between the network nodes are routed via the central Co-ordinator.
Indicates route taken by
message, although a
number of alternative
routes are available
1.2.4.2Tree Networks
A Tree network may contain the full range of node types - Co-ordinator, Routers and
End Devices - with the Co-ordinator at the top of the (inverted) tree. Any node can only
communicate directly with its parent and children (if any). Thus, a message for a
remote node must be passed up the tree until it can passed down to its destination.
User Guide
Figure 4: Tree Network
1.2.4.3Mesh Networks
A Mesh network may contain the full range of node types - Co-ordinator, Routers and
End Devices. Any routing node (Router or Co-ordinator) can communicate directly
with any other routing node within radio range. However, an End Device can only
communicate directly with its parent. When sending a message between two nodes
that cannot communicate directly, the message is routed via intermediate routing
nodes (for which there may be more than one possible route).
The software which runs on a wireless network node deals with both applicationspecific tasks (e.g. temperature measurement) and networking tasks (e.g. assembling
a message to send to another node). The software on a node is organised as a
number of layers, forming a stack, with the user application at the top. The basic layers
of a wireless network protocol stack are typically as illustrated in
Figure 6 below.
Figure 6: Basic Layers of Stack
The stack layers are outlined below, from top to bottom:
Application layer: Contains the user applications which run on the network
node and provides an interface to the lower layers
Network layer: Provides the networking functionality and an interface to the
IEEE 802.15.4 layers (see below) - for example, this layer could be provided by
the ZigBee PRO protocol, but is not required for a pure IEEE 802.15.4 network
Data Link layer: Provided by the MAC (Media Access Control) layer of the
IEEE 802.15.4 standard, and responsible for message assembly/disassembly
and addressing (e.g. specifying the destination of outgoing messages)
Physical layer: Provided by the PHY (Physical) layer of the IEEE 802.15.4
standard and concerned with interfacing to the physical transmission medium
(radio, in this case)
A number of C APIs (Application Programming Interfaces) are provided to allow a user
application to easily interact with the layers of the stack. The required APIs depend on
the protocol used (e.g. IEEE 802.15.4, ZigBee PRO) and are supplied in the relevant
NXP Software Developer’s Kit (SDK) - see
Section 3.1.
The software components that implement the Data Link and Physical layers of the
stack are pre-programmed in on-chip ROM. The user application is developed and
built on a PC. The resulting application binary file also incorporates the Network layer
of the stack and is loaded into the Flash memory of the node.
In order to use the ZigBee Smart Home Demonstration that is pre-loaded in the
JN517x-DK005 Development Kit boards, no knowledge of the protocol software is
required. However, you should familiarise yourself with the software for your chosen
protocol before starting your own application development - refer to
details of the user documentation for the different protocols.
The ‘Internet of Things’ (IoT) refers to the concept of electrical devices being
connected via the Internet, irrespective of their basic functionality. This allows the
devices to be remotely controlled and monitored from other devices on the Internet for example, from a PC, tablet or smart phone.
The IoT idea includes the possibility of connecting a WPAN, such as a ZigBee
network, to the Internet. In this case, the WPAN may have a single connection to the
Internet shared by all the nodes of the network, but the nodes will be individually
accessible from the Internet. The Internet connection for a WPAN is provided by a
device called an IoT Gateway. A basic system is shown in
Figure 7 below.
User Guide
Figure 7: WPAN Connected to IoT
1.3.1IoT Gateway
The IoT Gateway allows commands and data to be passed between the Interne t and
WPAN domains, in both directions. The device runs a protocol stack for each of its two
sides, which are as follows:
IP Host: This side runs an IP stack to send/receive data packets to/from the
Internet - this is normally an IPv6 stack.
Control Bridge: This side runs a wireless network protocol stack to send/
receive data packets to/from the WPAN - this may be an IEEE 802.15.4-based
stack, such as the ZigBee PRO stack. This part of th e Gateway u sually act s as
a WPAN node, such as a Co-ordinator or Router.
The two stacks are connected within the IoT Gateway. The basic architecture of an
IoT Gateway is illustrated in
In the JN517x-DK005 Development Kit, an IoT Gateway can be formed from the
Raspberry Pi board together with a JN5179 USB Dongle:
The Raspberry Pi provides the IP Host, interfacing to the IP domain
The JN5179 USB Dongle provides the Control Bridge, interfacing to the WPAN,
and also acts as the WPAN Co-ordinator
This IoT Gateway implementation is illustrated in Figure 9 below.
Figure 9: IoT Gateway Implementation
The Raspberry Pi microSD card is pre-programmed with NXP firmware which allows
the IP Host to operate in conjunction with a ZigBee Control Bridge. The JN5179 USB
Dongle with a green sticker is pre-programmed with firmware for a ZigBee Control
Bridge and Co-ordinator.
The JN5179 USB Dongle can be plugged into any USB port of the Raspberry Pi. In
the case where the IP connection will be provided via Wi-Fi, the supplied Wi-Pi adaptor
must be plugged into another USB port of the Raspberry Pi (the Wi-Pi adaptor creates
its own Wi-Fi network). If both the dongle and adaptor are required, the dongle must
be connected to a port via a USB cable to ensure isolation of the two devices.
The IP connection can be to an existing wired LAN or via a new Wi-Fi LAN:
To connect to an existing wired LAN, the supplied Ethernet cable must be used
to connect the Raspberry Pi to a router in the LAN. The LAN must include a
DHCP server to allocate an IP address to the Raspberry Pi. The DHCP leases
in the router will need to be examined in order to determine the IP address
allocated to the Raspberry Pi.
To use a Wi-Fi connection, the Wi-Pi adaptor must be plugged into the
Raspberry Pi. The Wi-Pi adaptor will create its own Wi-Fi network (rather than
join an existing Wi-Fi network). A PC can then interact with the Raspberry Pi by
joining this Wi-Fi network (which has the SSID Iot_GW_NXP). In this case, the
Raspberry Pi is allocated the fixed IP address 192.168.2.1.
The pre-programmed ZigBee Smart Home Demonstration uses a Wi-Fi connection.
1.4Network Commissioning
A WPAN is started by the Co-ordinator and other nodes can then join the network, as
indicated in
Network joining and subsequent network operation may employ security keys
to implement encrypted communications between nodes, to make the network
secure from malicious tampering. NFC commissioning is becoming an
important technique in establishing this security and is supported by the
JN517x-DK005 Development Kit. NFC commissioning is outlined in
1.4.1.
Once a node has joined a network, it may need to be linked to one or more
other nodes from a functional point-of-view. For example, when a new light is
added to a lighting network, it may be required that a particular light switch
(already in the network) is used to control the new light. There are different
ways of establishing this link and these are described in
Section 1.2.4. Network commissioning may also include the following:
The commissioning of network nodes can be performed via Near-Field
Communications (NFC). This involves the exchange of a unique security key, through
the close proximity required by NFC, to ensure that all communications to/from the
joining node are encrypted during the commissioning process. Node commissioning
is therefore secure and cannot be conducted remotely by third parties to introduce
nodes for malicious purposes.
In its basic form, the NFC commissioning of a node to a WPAN requires the following
security keys:
Unique Link Key: An NFC tag on the node must be pre-programmed with a
link key that is unique to the node and that will be used in the commissioning
process.
Network Key: The network Co-ordinator contains a network key that is used to
encrypt all radio communications between the nodes during normal operation
of the network.
As part of the commissioning process, the network key must be communicated from
the Co-ordinator to the joining node in a secure manner, so that the node can later use
the key to encrypt and decrypt network-level communications. The commissioning
process works as follows:
1.The NFC tag of the joining node is brought close to the NFC Controller
(mounted on the Raspberry Pi board, which is itself connected to the JN5179
USB Dongle that acts as the network Co-ordinator). This action is known as
an ‘NFC tap’.
2.During this NFC tap, the NFC Controller reads the unique link key from the
NFC tag of the joining node and this key is internally passed to the
Co-ordinator.
3.During this same NFC tap, the Co-ordinator uses the unique link key to
encrypt the network key and sends it by NFC to the joining node.
4.The joining node receives the encrypted network key and decrypt s it using the
unique link key.
The joining node now has the network key which allows it to subsequently participate
in secure network-level communications. Therefore, the network credentials are never
sent over the air, providing a safer method of commissioning.
The JN517x-DK005 Development Kit is equipped with the necessary components for
NFC commissioning:
The supplied Carrier Boards (see Appendix A.1) feature ‘NFC connected tags’.
A Carrier Board is the basis of a WPAN node and the NFC tag is used to join
the node to the network.
The supplied NFC Controller (see Appendix A.7) attaches to the Raspberry Pi
board. The NFC Controller is able to read data from the NFC tag of a Carrier
Board (node) as part of the secure commissioning process.
For more information on NFC commissioning, refer to the NFC Commissioning User Guide (JN-UG-3112).
The available methods for establishing a functional link between a controlling node or
source node and a target node are as follows:
Direct Addressing: The source node can simply send commands to the
address of the target node. This may be the permanent 64-bit IEEE/MAC
address of the node or a 16-bit network (or short) address allocated to the node
when it joined the network.
Binding: In a ZigBee PRO network, ‘binding’ can be used to set up this link. An
application on the source node can be bound to an application on the target
node such that commands issued by the source application are always sent to
the target node without needing to specify an address. The source node can be
bound to multiple target nodes.
Grouping: In a ZigBee PRO network, ‘grouping’ can alternatively be used to
set up this link, particularly when controlling multiple target nodes
simultaneously (e.g. several lights in unison). The target nodes are collected
into a group with an associated 16-bit group address. A target node ‘knows’
which groups it belongs to - this information is held in a table on the node.
When the source node sends a command to a group address, the command is
broadcast to all nodes in the network. A receiving node is able to identify
whether it is a member of the relevant group and only the nodes in the group
react to the command.