FRDM-KW40Z wirelessUartDemo example Rx, How to ...?

cancel
Showing results for 
Search instead for 
Did you mean: 

FRDM-KW40Z wirelessUartDemo example Rx, How to ...?

841 Views
chandramohanc
Contributor II

From the Freescale's wireless uart demo and Kinetis android app i could able to send and receive data without any issues

In the uartDemo example code i could see write API for sending data to Client app, but i don't see a read API for receiving data from client app. But how data is printed in the console connected to laptop ?

static void BleApp_SendUartStream(deviceId_t deviceId,
        uint8_t *pRecvStream, uint8_t streamSize)
{

.......

    GattClient_WriteCharacteristicValue(deviceId, &characteristic,
                                        streamSize, pRecvStream, TRUE,
                                        FALSE, FALSE, NULL);
}

It would be a great if someone share me document or information regarding UART demo app

Labels (2)
2 Replies

287 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Chandra, 

BLE Demo Application User's Guide (BLEDAUG.pdf) is located in 

C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\doc

You can also find the BLE Application Developer's Guide in the same location.

Now, about your specific question on where the App data is received and printed to the PC, please take a look into the Gatt Server Callback function:

static void BleApp_GattServerCallback (
 deviceId_t deviceId,
 gattServerEvent_t* pServerEvent)
{
 switch (pServerEvent->eventType)
 {
 case gEvtAttributeWrittenWithoutResponse_c:
 {
 if (pServerEvent->eventData.attributeWrittenEvent.handle == value_uart_stream)
 {
 Serial_SyncWrite(gAppSerMgrIf,
 pServerEvent->eventData.attributeWrittenEvent.aValue,
 pServerEvent->eventData.attributeWrittenEvent.cValueLength);
 }
 break;
 }
 default:
 break;
 }
}

287 Views
chandramohanc
Contributor II

Thanks a lot Juan !

0 Kudos