Hello,
i use a board with wireless uart demo with kw41z mcu.
It works fine with nxp iot toolbox app so i can reach BleApp_GattServerCallback() function and execute my code.
Ex:
- static void BleApp_GattServerCallback (
- deviceId_t deviceId,
- gattServerEvent_t* pServerEvent)
- {
- switch (pServerEvent->eventType)
- {
- case gEvtAttributeWrittenWithoutResponse_c:
- {
- if (pServerEvent->eventData.attributeWrittenEvent.handle == value_uart_stream)
- {
- //custom code (e.g. Led toggle function )
- BleApp_ReceivedUartStream(pServerEvent->eventData.attributeWrittenEvent.aValue,
- pServerEvent->eventData.attributeWrittenEvent.cValueLength);
- //custom code
- }
- break;
- }
- default:
- break;
- }
- }
into BleApp_ReceivedUartStream() function there is an echo service that send data OTA through BleApp_SendUartStream() function. The data sent with these function can be read by iot Toolbox app. It works fine.
Now i'm try tro create a UWP app in c# for work as iotToolBox.
I can find the ble device, connect to it and write the wireless_uart_characteristic.
I verify that my app can execute my custom code (eg. Led toggle) and i'm sure that it work correctly and i'm sure that device sent data by OTA.
unfortunately, i'm not able to read the data send by kw41z device.
With debugger i see that characteristic inside BleApp_SendUartStream() function has a uuid128 different from wireless uart characteristic uuid.
however i not found these uuid with my app and if i read the written characteristic, the value is the same that my app wrote.
i need help.
Best regards
Marco
Hello Estephania,
thank you for your reason.
If the Wirelessa UART application implemenths both gatt client and server therefore does my windows app need to implement gatt client and server?
Best regards
Hello,
Yes, as this it's a custom and proprietary profile, it's not defined by the Bluetooth LE specification, so there is the need for you to add it in your application as well.
Regards,
Estephania
Hello Estephania, thank you!
in first time i tried to create a service and characteristic at laptop side but an exception occurred: my ble card not work as peripheral role.
However i tried with a simple android studio app and it works.
thank you.
i use this for transmit a few message but now i need to create a stream of data from device to laptop. what do you suggest me?
thank you and best regards
Marco
Hello,
Do you mean to have the data directly in the computer? Sorry, it is not clear for me your problem
Hello Estephania, visual studio tell me that my ble dongle not work as peripheral role. However i tryied with android and it work with your suggestion. Thank you
marco
Hello,
You will need to modify the example you are using in order to make your dongle as a peripheral, still, i is good that it works correctly in android.
Regards,
Estephania
Hello Estephania,
I've met the question as Marco too. So about the "a custom and proprietary profile" , where can i find more detailed description to help me add it in my application.
Thanks a lot,
Rui
Hello,
You can check more about it in the documentation of the SDK and the examples there.
Regards,
Estephania
Hello,
The Wireless UART application implements both the GATT client and server for the custom Wireless UART profile and
services. The APP will need to implement service_wireless_uart otherwise the device will BleServDisc_FindService fails and disconnect.
Regards,
Estephania