Search found 12 matches

by avip
04:23, 04 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

Finally all is working with this change: internal.notificationCallback = function(data) { // Read input value. var buf = new Uint8Array(data); var encodedString = String.fromCharCode.apply(null, buf), decodedString = decodeURIComponent(escape(encodedString)); var value = encodedString; $('#ArduinoSt...
by avip
21:26, 03 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

I found how to receive a single char: inside arduinoble.js need to change the original structure to: internal.notificationCallback = function(data) { // Read input value. var value = new Uint8Array(data); var buf = new Uint8Array(data); var value = buf[0]; $('#ArduinoStatus').html('Analog value of p...
by avip
19:49, 03 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

I am trying now another evothings example: arduino-scriptable-ble (or as it s seen "Arduino Input BLE") I was able to connect to HM10 with the usual UUID modifications and also to operate the write commands. I am focusing on the following code: internal.enableNotifications = function(win, ...
by avip
20:06, 02 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

It doesn't seem to work.
Looks like there is no connection to HM10 with this example
The other example "Easy BLE" is able to connect and write to BLE.
Is it possible to modify it for getting HM10 notifications?
by avip
05:36, 02 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

on the other end, the easy ble maybe better example.
With few modifications it can connect and communicate
by avip
04:53, 02 Jun 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Re: Receive data from BLE (HM10 module/Arduino)

Thanks, Don. Probably something else is missing in the arduino ble example for HM10 since it cannot even connect. I assume that there is a need to change something in the area of lines 69... startScan: function() { console.log('Scanning...'); evothings.ble.startScan( function(deviceInfo) { if (app.k...
by avip
14:04, 30 May 2015
Forum: Questions and answers
Topic: Receive data from BLE (HM10 module/Arduino)
Replies: 12
Views: 32225

Receive data from BLE (HM10 module/Arduino)

I am trying to read a string that the BLE module is sending as a result of read command. The examples I found are related to notifications and they are not applicable to HM10. How can I receive a String after such read command? Is there any JavaScript function that is "waiting" for such an...
by avip
11:32, 30 May 2015
Forum: General discussion
Topic: Receive data from BLE into evothings ?
Replies: 1
Views: 8701

Receive data from BLE into evothings ?

How can I read data from BLE module (that is sending a string) and store it a javascript within evotthing?
Then to display it...?
by avip
16:56, 29 May 2015
Forum: Questions and answers
Topic: Send BLE command of String
Replies: 1
Views: 4488

Re: Send BLE command of String

Found it:
uint=new Uint8Array(str.length);
for(var i=0,j=str.length;i<j;++i){
uint[i]=str.charCodeAt(i);
}
by avip
16:44, 29 May 2015
Forum: Questions and answers
Topic: Send BLE command of String
Replies: 1
Views: 4488

Send BLE command of String

The current method in the examples shows:
app.device && app.device.writeDataArray(new Uint8Array([111,110,49]));

How can I send a String instead of an array of bytes?

Go to advanced search