Ashok Ra

Rapid IoT Kit - Wireless Uart Demo

Discussion created by Ashok Ra on Dec 5, 2018
Latest reply on Sep 26, 2019 by Jean Pierre Lathuile

Hi Everyone,

Here we going to see the demo of "Wireless Uart" Demo on Rapid IoT kit. we know that Rapid IoT has build with two MCU , KW41z & K64F. For this demo you should have SDK for KW41z,I have used  SDK_2.2.0_FRDM-KW41Z.

Wireless Uart Demo

Tools Required:

MCUXpressoIDE -> Download it from here

SDK for Rapid-IoT-Kit -> Download it from here

SDK for KW41z -> Download it from here

Rapid IoT Kit

Android or IOS App - IoT Toolbox here

Steps to follow:

The first step to Import "wireless uart" project from KW41z SDK examples.

the next step, you have to disable the keyboard functionality (keyboard.h)

 * Name: gKeyBoardSupported_d
 * Description: Enables/disables the switches based keyboard
#ifndef gKeyBoardSupported_d
#define gKeyBoardSupported_d                0

Rapid IoT kit hardware does not have 4 LED's interface with KW41 so some changes are required as below

also remove usage of Led3 & Led4 usages from everywhere.

* Name: gLEDsOnTargetBoardDefault_c
* Description: Default value for LEDs count located on a
*              generic target board
#ifndef gLEDsOnTargetBoardDefault_c
#define gLEDsOnTargetBoardDefault_c     2

Next step we need to add below code, so that K41z will start the advertising automatically after power on.


        /* BLE Host Stack Init */
        if (Ble_Initialize(App_GenericCallback) != gBleSuccess_c)



Now we can compile the code and flash it in Rapid IoT Kit.


The next part is Import the "Hello World" example from Rapid IoT Kit SDK

next step change the baud-rate for FSCI Interface (UART 4)

/* FSCI Interface Configuration structure */
static const gFsciSerialConfig_t mFsciSerials[] =

        .baudrate = gUARTBaudRate115200_c,
        .interfaceType = gSerialMgrUart_c,
        .interfaceChannel = 4,
        .virtualInterface = 0


below changes for  FsciCommunication.c


void FSCI_receivePacket( void* param )
    uint16_t            readBytes;
    uint8_t             c;
    static uint8_t bytesReceived=0;
    if( gSerial_Success_c != Serial_GetByteFromRxBuffer( gFsciSerialInterfaces[(uint32_t)param], &c, &readBytes ) )
    while( readBytes && !wuartreceived)
        if(c == '\r'){
            bytesReceived = 0;
            wuartreceived = 1;
            lcdtext[bytesReceived++] =c;
        }  /* if (!startOfFrameSeen) */

        if ( gSerial_Success_c != Serial_GetByteFromRxBuffer( gFsciSerialInterfaces[(uint32_t)param], &c, &readBytes ) )

below changes in hello_world.c


    /* Main Application Loop (idle state) */
    while (1)




            GUI_DispString(" ");
            wuartreceived = 0;


You can also download this code from here

Compile the code then flash it into Rapid Kit, and  the demo is ready!


Happy Coding!


Working demo of video is here Rapid IoT Kit - Wireless Uart Demo

Checkout latest demo of thread use-case (IoT) here IoT Green Kit