1
Plug It In2
Get Software3
Build, Run4
Create5
LearnSign in to save your progress. Don't have an account? Create one.
Let's take your USB-KW41Z for a test drive!
Note: K32W061/41 is preferred for any new Zigbee®, Thread and Bluetooth® LE 5.0 design. No new software releases planned
Something went wrong! Please try again.
Your USB-KW41Z Power green LED should stay ON when you connect the board.
Something went wrong! Please try again.
In this step, we are going to guide you through the process to get the required software to enable the USB-KW41Z dongle as a Bluetooth Low Energy or IEEE 802.15.4 sniffer. You can also use the USB-KW41Z as a development platform. Select the option you want to accomplish with your USB-KW41Z.
MCUXpresso SDK for the USB-KW41Z includes all the wireless connectivity stacks required to develop your solution using Thread, IEEE 802.15.4, Generic FSK, and Bluetooth Low Energy.
Click below to download a pre-configured SDK release for the USB-KW41Z that includes all the wireless connectivity stacks for the KW41Z.
You can also use the online SDK Builder to create a custom SDK package for the USB-KW41Z using the SDK builder.
Wireshark is an Open-source network protocol analyzer. It can show you what is being sent over the air, and is a very useful tool for debugging communication between devices.
The Kinetis Protocol Analyzer Adapter is a software program that provides a bridge between the USB-KW41Z board and Wireshark. It needs to be installed so that the USB-KW41Z will appear to Wireshark as a network interface that can be sniffed. Click the button below to download and install this software on your computer.
USB-KW41Z comes pre-programmed with sniffer firmware by default. However, if you erased the pre-programmed software in the USB-KW41Z, you can follow the steps provided in the guide below to reprogram the USB-KW41Z with the sniffer application again.
MCUXpresso SDK for the USB-KW41Z includes all the wireless connectivity stacks required to develop your solution using Thread, IEEE 802.15.4, Generic FSK, and Bluetooth Low Energy.
Click below to download a pre-configured SDK release for the USB-KW41Z that includes all the wireless connectivity stacks for the KW41Z.
You can also use the online SDK Builder to create a custom SDK package for the USB-KW41Z using the SDK builder.
NXP offers a complimentary toolchain called MCUXpresso IDE.
Want to use a different toolchain?
No problem! MCUXpresso SDK connectivity stack software also supports IAR.
The OpenSDA debugger firmware needs to be updated in order to program the KW41Z on the USB-KW41Z board. First, download the Segger J-Link OpenSDA app for the USB-KW41Z. Then hold down SW2 on the board and plug it into your computer. It will enumerate as a DAPLINKBOOT drive, and then drag-and-drop the 43_OpenSDA_USB-KW41Z.bin file onto that drive to update the OpenSDA app. The USB-KW41Z will now enumerate as a J-Link device with a virtual COM serial port.
Download CMSIS-DAP drivers
NOTE: If you are NOT planning on changing the default debug application from the Segger JLink to the CMSIS-DAP debugger, then you may skip this step.
Many of the example applications output data over the MCU UART. So you'll want to make sure that the driver for the board's virtual COM port is installed. Before you run the driver installer, you MUST have the board plugged in to your PC with the CMSIS-DAP debugger loaded onto the OpenSDA circuit of your USB-KW41Z.
The MCUXpresso Config Tool is an integrated suite of configuration tools that guides users in creating new MCUXpresso SDK projects, and also provides pin and clock tools to generate initialization C code for custom board support.
Configure your preferred terminal to 115200 baud rate, 8 data bits, no parity and 1 stop bit. To determine the port number of the USB-KW41Z's virtual COM port, open the device manager and look under the "Ports" group.
Not sure how to use a terminal application? Try one of these tutorials:
These steps show how to program USB-KW41Z with the sniffer application. In order to enable USB-KW41Z as a sniffer, you need to program both devices (K22F and KW40).
The next tools are needed to be able to program USB-KW41Z:
It is assumed that user already know how to flash USB-KW41Z. This means that user already went through the "Update Software of the USB-KW41Z QSG" document shown in the USB-KW41Z "Getting Started" page when using this board as a development platform.
Sniffer binaries files are located in the next path:
After the binaries are located. Please copy and paste these binary files in the JLink installation path (i.e. "C:\Program Files (x86)\SEGGER\JLink_V600").
NOTE: JLink_V502 folder name might change in the future, it is due to the JLink software version installed, so JLink_V600 or later is required to support KW41Z device
Make sure that Jlink debugger is connected to the corresponding JTAG MK22F connector (J6) in the USB-KW41Z.
Go the JLink installation path, and then open the application "JLink". Next window will be displayed.
Call the next instructions in next order:
In order to program the KW41Z, please, make sure that Jlink debugger is connected to the corresponding SWD MKW41Z connector (J1) in the USB-KW41Z.
Call the next instructions in next order:
A success or "O.K" message should be displayed in the window once the binary file is downloaded.
Unplug and plug again the USB-KW41Z to your PC. Now, sniffer application has been programmed to your USB-KW41Z.
These steps show how to program USB-KW41Z with the sniffer application. In order to enable USB-KW41Z as a sniffer, you need to program both devices (K22F and KW41).
The next tools are needed to be able to program USB-KW41Z:
Sniffer binaries files are located in the next path:
Reprogram the USB-KW41Z like an OpenSDA. First, go to www.nxp.com/opensda, then select the USB-KW41Z board, finally follow steps 2 and 3.
Open a windows explorer to find out that the USB-KW41Z it’s enumerated like a Mass Storage Device MSD name USB-KW41ZJ
Drag and Drop the sniffer_usbkw41z_kw41z.bin file to the MSD to program the KW41 with sniffing software.
Know it’s time to program the MK22F microcontroller with the sniffer software, the MCU may be re-programmed using the bootloader feature used in step 1. To start your board into bootloader mode:
Unplug and plug again the USB-KW41Z to your PC. Now, the sniffer application has been programmed to your USB-KW41Z
Tera Term is a very popular open source terminal emulation application. This program can be used to display information sent from your NXP development platform's virtual serial port.
PuTTY is a popular terminal emulation application. This program can be used to display information sent from your NXP development platform's virtual serial port.
Something went wrong! Please try again.
Each of the Our Wireless Connectivity Stack comes with a list of demo applications and driver examples ready to be compiled and run.
The KW41Z Wireless Connectivity Software package comes with a long list of demo applications for the
SMAC protocol. To see what's available, browse to the 'examples' folder (
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
IEEE 802.15.4
The KW41Z Wireless Connectivity Software package comes with a long list of demo applications for the
IEEE 802.15.4 protocol. To see what's available, browse to the 'examples' folder
(
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
Generic FSK
The KW41Z Wireless Connectivity Software package comes with a long list of demo applications for the
Bluetooth Low Energy protocol. To see what's available, browse to the 'examples'
folder (
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
Hybrid (BLE + Thread)
The KW41Z Wireless Connectivity Software package comes with a long list of hybrid demo applications
(Thread + BLE). To see what's available, browse to the 'examples' folder (
In order to use the Bluetooth Low Energy and Hybrid examples, the Kinetis BLE Toolbox needs to be installed on a smartphone. This application provides several examples that can be used in conjunction with the connectivity stack to connect your phone to the development board over BLE.
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
These steps show how to:
The example used below is for the SMAC Connectivity Test demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the Connectivity Test IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your USB-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). Open a Terminal Emulator program and open a session to your USB-KW41Z COM port.
Configure the terminal with these settings:
Click the Go button to resume operation.
The following output will be displayed in the serial terminal.
If you don’t see this output, verify your terminal settings and connections.
Refer to
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the USB-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the SMAC example.
Find the Quickstart Panel in the lower left hand corner
Then click on Import SDK examples(s)…
Click on the usbkw41z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the SMAC category expand the connectivity_test project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure the USB-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘usbkw41z_wireless_examples_smac_connectivity_test_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the USB-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom to not display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Hit the terminate icon to stop the debugger.
Now disconnect the board, and connect the second USB-KW41Z board. Follow the same debugger steps to flash the connectivity software to that board so that both boards have the same firmware on them.
Now with both boards connected, open a Terminal Emulator program and
open a session to your USB-KW41Z COM port for each
board.
Configure the terminal with these settings:
Hit the reset button on both boards
The following output will be displayed in each of the two serial terminals.
If you don’t see this output, verify your terminal settings and connections.
Refer to
The following steps will guide you through creating a simple Thread network.. A hybrid BLE+Thread project will be loaded onto the 1st board so that the board can be controlled via a Bluetooth smartphone application, while a Thread-only project will be loaded onto the 2nd board and controlled via a serial terminal.
Navigate to the Hybrid BLE Thread Router workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect the first USB-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom to not display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started.
Right now we only want to load the firmware to the first board, so hit the terminate icon to stop the debugger.
The Hybrid board needs a Thread node to communicate with, so Thread firmware needs to be loaded onto the second board. The Router Eligible End Device project will be loaded onto board #2.
Unplug the first USB-KW41Z board and plug-in the second USB-KW41Z board to your PC
Navigate to the Router Eligible End Device project workspace (located
at
Build and flash the Router Eligible End Device demo using the same steps as before so that the 2nd USB-KW41Z has the thread_router firmware loaded onto it.
Stop the debugger.
Open a Terminal Emulator program and open a session to your USB-KW41Z COM port that has the thread_router_eligible project firmware on it (board #2)
Configure the terminal with these settings:
Hit the Reset button on board #2, which can be found near where the USB cable is plugged in. You should see the following on the terminal:
Plug-in board #1 that has the Hybrid BLE+Thread firmware loaded on it, so that both boards are now connected.
Open the Kinetis BLE Toolbox application on your mobile device and click on the Thread Shell function.
The Kinetis BLE Toolbox application should start scanning and find the USB-KW41Z board (NXP_THR). Select the NXP_THR device
The Kinetis BLE Toolbox should now be connected to the device. Using the keyboard on your mobile app that appears, you can type commands to the USB-KW41Z device. Type “help” to see the list of possible commands. Outputs from the USB-KW41Z board should appear in the app as well.
Start a new Thread network by typing “thr create” or by selecting that command in the Shortcuts menu
Inside the TeraTerm connectionto the second board (that is just running Thread), join this new network by typing “thr join”.
Take note of the ML64 address listed in the terminal for R2 by typing “ifconfig”
Inside the smartphone app terminal, type in the command to toggle the LED.
“coap CON POST
Refer to
The following steps will guide you through creating a simple Thread network.. A hybrid BLE+Thread project will be loaded onto the 1st board so that the board can be controlled via a Bluetooth smartphone application, while a Thread-only project will be loaded onto the 2nd board and controlled via a serial terminal.
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the USB-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the hybrid example. This project will be loaded to one board, while another project will be loaded on the 2nd board.
Find the Quickstart Panel in the lower left hand corner
Then click on Import SDK examples(s)…
Click on the usbkw41z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the hybrid category expand the ble_thread_router_wireless_uart project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure the USB-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘usbkw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the USB-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom to not display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Right now we only want to load the firmware to the first board, so hit the terminate icon to stop the debugger.
The Hybrid board needs a Thread node to communicate with, so Thread firmware needs to be loaded onto the second board. The Router Eligible End Device project will be loaded onto board #2.
Unplug the first USB-KW41Z board and plug-in the second USB-KW41Z board to your PC
Import the wireless_demos->thread->router_eligible_device->freertos demo using the same steps as you did for the hybrid demo.
Build and load the end device demo using the same steps as before so that the 2nd USB-KW41Z has the thread_router firmware on it.
Stop the debugger.
Open a Terminal Emulator program and open a session to your USB-KW41Z COM port that has the thread_router_eligible project firmware on it (board #2)
Configure the terminal with these settings:
Hit the Reset button on board #2, which can be found near where the USB cable is plugged in. You should see the following on the terminal:
Plug-in board #1 that has the Hybrid BLE+Thread firmware loaded on it, so that both boards are now connected.
Open the Kinetis BLE Toolbox application on your mobile device and click on the Thread Shell function.
The Kinetis BLE Toolbox application should start scanning and find the USB-KW41Z board (NXP_THR). Select the NXP_THR device
The Kinetis BLE Toolbox should now be connected to the device. Using the keyboard on your mobile app that appears, you may type commands to the USB-KW41Z device. Type “help” to see the list of possible commands. Outputs from the USB-KW41Z board should appear in the app as well.
Start a new Thread network by typing “thr create” or by selecting that command in the Shortcuts menu
Inside the TeraTerm connectionto the second board (that is just running Thread), join this new network by typing “thr join”.
Take note of the ML64 address listed in the terminal for R2 by typing “ifconfig”
Inside the smartphone app terminal, type in the command to toggle the
LED.
“coap CON POST
Refer to
Something went wrong! Please try again.
NXP provides a project cloner tool which allows you to copy an existing demo to use as a base for your
own development, keeping the original demo app resources for reference. The cloner tool is included in
your software package download. It can be found in
Option A: Use the MCUXpresso IDE to clone an example project.
Option B: Use the MCUXpresso Config Tool to clone an existing MCUXpresso SDK example for use with third party IDEs.
Something went wrong! Please try again.
Now, let’s use the Pins tool that is part of the MCUXpresso Config Tool to show how to add a new GPIO pin to your project to blink an LED.
Something went wrong! Please try again.
Next use the Clocks tool that is part of the MCUXpresso Config Tool to change the clock settings and change the rate that the LED blinks.
Something went wrong! Please try again.
With the application modified, you will see the USB-KW41Z’s blue LED slowly blinking. You can also view terminal output using the terminal program.
Now export the pin_mux.c and pin_mux.h files by clicking on the Sources tab on the right side to get to the Sources view, and selecting the export icon.
Select the directory to export the pin_mux.c and pin_mux.h files. In this example export to the “board” folder in the led_output project in the workspace that was created in the previous section.
(i.e. C:\nxp_workspace\usbkw41z_driver_examples_gpio_led_output\board). Select Finish.
Select the directory to export the pin_mux.c and pin_mux.h files. In this example export to the “board” folder in the led_output project in the workspace that was created in the previous section.
(i.e. C:\nxp_workspace\usbkw41z_driver_examples_gpio_led_output\board). Select Finish.
Something went wrong! Please try again.
Explore beyond the USB-KW41Z by integrating other NXP solutions and software to your project and interact with our worldwide design community
The NXP modular IoT Gateway reference design enables large node networks (LNNs) with pre-integrated, tested and RF certified support for a wide array of wireless communications protocols including: Thread, ZigBee and Wi-Fi. This range of capability allows developers to easily build gateways based on this solution, using their choice of wireless protocols for end-to-end wireless communications in LNN configurations with supporting cloud options such as Amazon Web Services (AWS).
Something went wrong! Please try again.
Thread is an IPv6-based mesh networking protocol developed by industry leading technology companies, like NXP®, for connecting products around the home and in buildings to each other, to the internet and to the cloud. Thread networks are simple to install, highly secure, scalable to hundreds of devices and developed to run on low-power IEEE 802.15.4 chipsets. Learn more at http://nxp.com/thread and http://threadgroup.org
Something went wrong! Please try again.
Explore the world with a full assortment of NXP sensor solutions. From accelerometers, pressure sensors, touch sensors, and many more, NXP has a sensor solution for your project. Find out more at http://nxp.com/sensors
Something went wrong! Please try again.
Near Field Communication is a simple, intuitive technology that lets you interact securely with the world around you with a simple touch. Learn more about NXP’s NFC solutions at http://nxp.com/nfc
Something went wrong! Please try again.
Connect with other engineers and get expert advice on designing with Kinetis MCUs and Wireless Connectivity software. Join the community discussion in one of our two dedicated communities: Kinetis MCU Community or Wireless Connectivity Community
The Connectivity Test Application is a SMAC based Demo Application which provides the user with means to test basic transmission-reception functionalities along with several advanced testing features based on the ASP and SMAC APIs.
The runtime configuration is performed using shortcut keys which are available in most of the application’s menus. The menus or tests will change their behavior based on what settings are applied
The Connectivity Test Application has four main features:
The Carrier Sense test performs ED continuously until the ED value is above the CCA threshold and then transmit a packet which contains pseudo-random data with the payload size configured using 'n' and 'm' shortcuts.
The Transmission Control test displays a selection menu for number of packets identical with the one in PER TX test and then it prompts the user to enter the inter-packet delay. After that, the application will start sending the selected number of packets with the selected inter-packet delay, using pseudo-random data for the payload with the size configured with 'n' and 'm' shortcuts.
For additional details on how to run the Connectivity Test Application, please refer to the SMAC’s Demonstration Applications User’s Guide.
These steps show how to open a demo workspace in IAR Embedded Workbench, how to build the platform library required by the demo, and how to build the demo application. The example used below is for the hello_world demo, but similar steps can be applied to any demo in the KSDK.
Open demo workspace (*.eww file) in:
After the workspace is open, two projects are shown: one for the KSDK platform library and one for the demo. Also, the platform library project is bold, indicating that it is the active project. The active project can be changed at any time by right clicking on the desired project and selecting "Set as Active" or via the build target drop-down at the top of the workspace browser.
There are two project configurations (build targets) supported for each KSDK project:
Click the "Make" button, highlighted in red below.
When the build is complete, the library (libksdk_platform.a) is generated in one of the following directories, according to the chosen build target:
The KSDK demo applications are built upon the software building blocks provided in the Kinetis SDK platform library, built in the previous section. If the platform library is not present, the linker displays an error indicating that it cannot find the library. An easy way to check whether the library is present is to expand the Output folder in the ksdk_platform_lib project. If the platform library binary is not built and present, follow the steps on page 1 to build it. Otherwise, continue with the following steps to build the desired demo application.
If not already done, open the desired demo application workspace (*.eww file). This example's workspace file is located in:
Select the desired build target from the drop-down. For this example, select the "hello_world – Debug" target.
To build the demo application, click the "Make" button, highlighted in red below.
The build will complete without errors.
The FRDM-K64F board comes loaded with the mbed/CMSIS-DAP debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit http://www.nxp.com/opensda for information on updating or restoring your board to the factory state.
Connect the development platform to your PC via USB cable between the "SDAUSB" USB port on the board and the PC USB connector.
Open the terminal application on the PC (such as PuTTY or TeraTerm) and connect to the debug COM port you determined earlier. Configure the terminal with these settings:
Click the "Download and Debug" button to download the application to the target.
The application is then downloaded to the target and automatically runs to the main() function.
Run the code by clicking the "Go" button to start the application.
The hello_world application is now running and a banner is displayed on the terminal. If this is not the case, check your terminal settings and connections.
These steps show how to:
Load and build the demo application in IAR Embedded Workbench.
Download and run the demo application.
The example used below is for the IEEE 802.15.4 "MyWirelessApplication" (mwa) demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the mwa_coordinator IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your USB-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). At this point, we need to program an end device. So terminate this debug session by clicking the terminate button shown in the figure below.
Unplug this board and connect a second USB-KW41Z board.
Navigate to the mwa_end_device IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your second USB-KW41Z board to your PC (if not done so already).
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). At this point, we need to run the coordinator and end device together. So terminate this debug session by clicking the terminate button shown in the figure below.
Unplug this board and connect both boards to your host PC.
Open a Terminal Emulator program and open a session to one of the USB-KW41Z COM ports.
Open a second Terminal Emulator program and open a session to the other USB-KW41Z COM port.
Configure the terminal with these settings:
Press the reset button on both boards.
The coordinator device should display the following screen:
The end device should display the following screen:
Press any switch on the coordinator board first. The screen should then display the following:
Then press any switch on the end device board. The end device should then connect and display the following screen.
You should now be able to type characters into either terminal and see the characters echoed in the opposite terminal.
Refer to
These steps show how to:
Load and build the demo application in IAR Embedded Workbench.
Download and run the demo application.
The example used below is for the Generic FSK Connectivity Test demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the Connectivity Test IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your USB-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). Open a
Terminal Emulator program and open a session to your USB-KW41Z COM
port.
Configure the terminal with these settings:
Click the Go button to resume operation.
The following output will be displayed in the serial terminal.
If you don't see this output, verify your terminal settings and connections.
Refer to
These steps show how to:
Configure Kinetis Protocol Analyzer Adapter and Wireshark Network Analyzer.
Sniff IEEE 802.15.4 wireless applications.
Open the "Kinetis Protocol Analyzer Adapter".
Make sure, you have USB-KW41Z connected to your PC when opening Kinetis Protocol Analyzer Adapter, it will start looking for Kinetis sniffer hardware. Once USB-KW41Z is detected, KW41Z device will be displayed.
Click on the Wireshark icon to open Wireshark Network Protocol Analyzer.
Wireshark Network Analyzer will be opened. On the "Capture" option of the main window, select the Local Area Connection that was created by the Kinetis Protocol Analyzer, in this example, Kinetis Protocol Analyzer created "Local Area Connection 2", then click "Start" button.
"Capture" window will be opened.
Select the desired IEEE 802.15.4 channel to scan in the Kinetis Protocol Analyzer Adapter window. In this guide, we are going to select channel 19 as an example.
USB-KW41Z will start to sniff and upcoming data will be displayed in the "Capture" window of the Wireshark Network Protocol Analyzer.
Refer to the "Kinetis Protocol Analyzer Adapter User's Guide" for more
information about how to enable other features of your USB-KW41Z sniffer.
Document can be found in the next path:
These steps show how to:
Configure Kinetis Protocol Analyzer Adapter and Wireshark Network Analyzer.
Sniff BLE wireless applications.
Open the "Kinetis Protocol Analyzer Adapter".
Make sure, you have USB-KW41Z connected to your PC when opening Kinetis Protocol Analyzer Adapter, it will start looking for Kinetis sniffer hardware. Once USB-KW41Z is detected, KW41Z device will be displayed.
Click on the Wireshark icon to open Wireshark Network Protocol Analyzer.
Wireshark Network Analyzer will be opened. On the "Capture" option of the main window, select the Local Area Connection that was created by the Kinetis Protocol Analyzer, in this example, Kinetis Protocol Analyzer created "Local Area Connection 2", then click "Start" button.
"Capture" window will be opened.
Select the desired advertising channel to scan in the Kinetis Protocol Analyzer Adapter window. In this guide, we are going to select All option to start sniffing on all advertising channels (37, 38 and 39). However, you could select different advertising channels of interest to sniff.
Address Filter is selected in this guide, hence, only data upcoming from the specified address will be displayed on the "Capture" window. If you are not interested on following any specific address, you can provide a Hopping interval to sniff any device in the advertising channels.
USB-KW41Z will start to sniff and upcoming data will be displayed in the "Capture" window of the Wireshark Network Protocol Analyzer.
Refer to the "Kinetis Protocol Analyzer Adapter User's Guide" for more
information about how to enable other features of your USB-KW41Z sniffer.
Document can be found in the next path:
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the USB-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the GenFSK example.
Find the Quickstart Panel in the lower left hand corner
Then click on Import SDK examples(s)…
Click on the usbkw41z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the genfsk category expand the connectivity_test project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure the USB-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘usbkw41z_wireless_examples_genfsk_connectivity_test_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the USB-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom to not display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Hit the terminate icon to stop the debugger.
Now disconnect the board, and connect the second USB-KW41Z board. Follow the same debugger steps to flash the connectivity software to that board so that both boards have the same firmware on them.
Now with both boards connected, open a Terminal Emulator program and open a
session to your USB-KW41Z COM port for each board.
Configure the terminal
with these settings:
Hit the reset button on both boards
The following output will be displayed in each of the two serial terminals.
Refer to
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the USB-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the 802.15.4 example.
Find the Quickstart Panel in the lower left hand corner
Then click on Import SDK examples(s)…
Click on the usbkw41z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the ieee_802_15_4 category expand the mwa_coordinator project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure the USB-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘usbkw41z_wireless_examples_ieee_802_15_4_maw_coordinator_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the USB-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom to not display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
6. At this point, we need to program an end device. So terminate this debug session by clicking the terminate button shown in the figure below. Then unplug this board, and plug up your second board.
Connect your second USB-KW41Z board to your PC (if not already done).
Import the wireless_demos->ieee_802_15_4->mwa_end_device_freertos demo using the same steps as you did for the coordinator demo.
Build and load the end device demo using the same steps as before so that the 2nd USB-KW41Z has this firmware on it.
Stop the debugger.
Open a Terminal Emulator program and open a session to one of the USB-KW41Z
COM ports.
Configure the terminal with these settings:
Open a second Terminal Emulator program and open a session to the other
USB-KW41Z COM port.
Configure the terminal with these settings:
Press the reset button on both boards.
The coordinator device should display the following screen:
The end device should display the following screen:
Press any switch on the coordinator board first. The screen should then display the following:
Then press any switch on the end device board. The end device should then connect and display the following screen.
You should now be able to type characters into either terminal and see the characters echoed in the opposite terminal.
Refer to
Click the small arrow next to the green bug icon.
Select Debug Configurations.
Select a project under the GDB Segger J-Link Debugging category, and then select the Debugger tab.
Then select “Variables…” next to the Executable box.
In the next dialog box, find the jlink_path variable, select it, and then select Edit Variables...
The Preferences dialog box will open. Select the jlink_path variable and then select Edit.
In the Edit Variable: jlink_path dialog box, ensure the path and description are as shown below.
Be sure to click “OK” when closing all dialog boxes.
Something went wrong! Please try again.