I want to modify the SDK examples:temperature sensor and collector so that collector can write Characteristic Value,The sensor can print out the values written by the collector through UART.
As shown in the picture, press the button of the sensor first, and the sensor sends the Notification. The collector triggers **GattNotificationCallback**, prints out the value "value_temperature", and then uses the API: GattClient_WriteCharacteristicValue Changes the value of value_temperature.The sensor triggers **GattServerCallback** to print the value of value_temperature.But collector can print value_temperature, sensor UART does not print, looking forward to your suggestions and guidance!
我希望修改例程: temperature sensor 和 collector,可以使 collector 可以写
Characteristic Value,sensor 可以将 collector 写入的值通过 UART 出来,
如图片展示 先按下 sensor 的按键,sensor 发送 **Notification**,collector 触发**GattNotificationCallback**,打印出 “value_temperature”的值,之后使用GattClient_WriteCharacteristicValue 修改 “value_temperature”的值,sensor 端触发 **GattServerCallback** 打印出“value_temperature”的值。但是 collector可以打印出value_temperature, sensor 的UART没有打印,期待你的建议和指导
解決済! 解決策の投稿を見る。
Hello,
With Wireless UART, even if the device is in central mode, the BleApp_ReceivedUartStream is called when receiving something from the peripheral.
Regards,
Ricardo
Hello,
Hope you are doing well. Is there any special consideration why the collector would need to write a characteristic to the sensor?
If you want to receive on a serial terminal something "received" from Bluetooth, maybe you can take the Wireless UART example as a base for your application.
This example already enables UART and bidirectional BLE communication.
Best Regards,
Ricardo
thanks for your reply
I think "temperature sensor and collector" is more appropriate,Of course I also can take the Wireless UART example as a base for your application.But I have a question about the Wireless UART example,From my understanding of W_UART, BLE printing data to serial terminal requires the use of BleApp_ReceivedUartStream, which is only used in BleApp_GattServerCallback.Can Central also use BleApp_GattServerCallback?If not, how does Central transfer data to UART.
我认为使用“ temperature sensor and collector ”更合适,当然我也可以用 Wireless UART example 作为应用程序的基础。但是对于Wireless UART example 我有疑问,向 UART输出数据需要使用到 BleApp_ReceivedUartStream 但它只在 BleApp_GattServerCallback 中被应用,BLE做为 Central 也能使用BleApp_GattServerCallback ?如果不能,Central是如何向UART传输数据的
Hello,
With Wireless UART, even if the device is in central mode, the BleApp_ReceivedUartStream is called when receiving something from the peripheral.
Regards,
Ricardo