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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

2,408件の閲覧回数
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,854件の閲覧回数
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,854件の閲覧回数
chandramohanc
Contributor II

Thanks a lot Juan !

0 件の賞賛
返信