Hello,
I am trying to transmit a "Hello\n" message from FRDM-KW41Z MCU to NXP IOT Toolbox (wireless uart).
But i am not able to receive any message.
I am using demo example - "BLE-wireless uart" ,
wireless uart example program is working fine but i want to transmit data from MCU to NXP IOT Toolbox(wireless uart ) application. Without typing any message into the terminal or Serial terminal i should be able to recieve message on NXP iot toolbox application.
This is what i have made changes to function.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void BleApp_FlushUartStream(void *pParam)
{
char *pMsg = "hello\n";
uint16_t bytesRead = 0;
if (mPeerInformation.appState != mAppRunning_c)
{
return;
}
/* Allocate buffer for GATT Write */
*pMsg = MEM_BufferAlloc(mAppUartBufferSize);
if (*pMsg == NULL)
{
return;
}
/* Collect the data from the serial manager buffer */
if ( Serial_Read( gAppSerMgrIf, *pMsg, mAppUartBufferSize, &bytesRead) == gSerial_Success_c )
{
if (bytesRead != 0)
{
/* Send data over the air */
BleApp_SendUartStream(mPeerInformation.deviceId, *pMsg, bytesRead);
}
}
/* Free Buffer */
MEM_BufferFree(*pMsg);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
please suggest if any changes to be made to any other functions of the program.