Page 1 of 1

Adapting BLE Arduino App

Posted: 10:51, 12 Jun 2015
by p4ng
Hello, first of all, I want to congratulate you for the project.

I am trying to modify the Arduino Led on/off BLE example to connect to my BLE device and send commands to it.
I was be able to connect to my device by changing the name in the file index.html in the app.connect function.

Now I want to send command to my BLE device.

From what I see from the code, the function app.ledon and app.ledoff send a byte, respectively 1 and 0.

I tried to do so, but what I see from my BLE device is a spurious byte sent (probably a 0) when connecting to the device while none byte is sent when pressing the buttons led on or led off.

Anyone can help me?

Re: Adapting BLE Arduino App

Posted: 23:03, 08 Jul 2015
by ardiri
are you sure you are using the right UUIDs?

what about the console log - what do you see within the evothings workbench? you may be receiving errors and that would definitely mean no data gets sent over to the device once it is connected. you can see the console log under the tools option in the workbench.

Re: Adapting BLE Arduino App

Posted: 10:52, 13 Jul 2015
by p4ng
Hi ardiri, thanks for the answer. One problem was that I was not using the right UUIDs. I noticed this problem by myself and now I am able to send the commands to my BLE device.

Unfortunately the spurious byte sent (specifically 2) at the time of the connection to the BLE device still remains.

Here is the Evothings Console log:

LOG: found device: xxx
LOG: connected!
LOG: setNotification


When I send a command to my BLE device, the Console Log reports:
LOG: writeCharacteristic success

and this is actually received by my devce.

At the moment I fixed this problem (spurious by sent on connection) by rejecting the byte 2 on my BLE device.
If you could help telling my how to remove this spurious byte, my project will be more clean.
Thanks for your help.