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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,410 次查看
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

标签 (2)
标记 (2)
2 回复数

1,856 次查看
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;
 }
}

1,856 次查看
chandramohanc
Contributor II

Thanks a lot Juan !

0 项奖励
回复