Community news, upcoming events and general discussions
Threads: 28 Posts: 75
Get technical support from the community
Threads: 831 Posts: 4515
Threads: 15 Posts: 54
Tell us how to make XDK better!
Threads: 34 Posts: 112
Share and discuss community member projects
Threads: 32 Posts: 155
I am playing with the SendAccelDataOverBle example in the Workbench.
After building the project and flashing it to the XDK, I connected the device to my phone using the APP "LightBlue".
But nothing happened when the connection was built.
Please help me!
Hello Zhefei, first of all, could you elaborate what you mean by But nothing happened when the connection was built.? Obviously, your Smartphone connected to the XDK, if the log and the screen may be believed. Additionally, if the XDK has built a connection, the message Device connected : should appear in the console of your XDK-Workbench. Finally, to start the transfer of Accelerometer data, the message start has to be sent to the XDK via Bluetooth via the Write-Characteristic (the UUID starts with 0x0C68D100). I have tried out the Lightblue App, and found that the message must actually be sent as hexadecimal values, so you probably have to send the message 7374617274, which is start with the letters converted to hex values. If you want the transfer to end, you have to send end, which is 656e64 as hex values. Then, as Felipe mentioned, you have to select the other characteristic and subscribe to notifications. The XDK will then send accelerometer values, which are represented as hex values as well. In fact, if it is only for the sake of testing / trying out, I would recommend to use the app BLE Scanner, because that App actually presents the data as human-readable string. Please tell me if this was helpful, and do not hesitate to ask further questions. Kind regards, Franjo