This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Bluetooth HRM
#1
Hi!!

I am trying to read a value from a custom made BLE device, the device was created using the heart rate protocol,
I used the example of LM as Bluetooth 4.0 gateway http://openrb.com/lm-as-bluetooth-4-0-gateway/
but I cant make it work...


Also found some information about gatttool, but with no success...

and using..
Code:
require('ble')
ble.up()
sock = ble.sock()
res,err=ble.settimeout(sock, 45)
res, err  = ble.connect(sock, "XX:XX:XX:...",true)
log(res,err)
ble.close(sock)


I get "connect failed" error

the device is working, and it connects NRF Connect on my phone...

If anyone have any idea how to make it work?

Thank you!
Reply
#2
Try calling connect without third argument or set it to false.
Reply
#3
(06.02.2018, 15:35)admin Wrote: Try calling connect without third argument or set it to false.

Same thing.. connection failed..

I am trying with a BLE simulator app on my phone to emulate a HRM... and nothing...


------------------------------EDIT------------------------------------------------------------------------------------------------------------------------------
With the res, err  = ble.connect(sock, "XX:XX:XX:...",false)
it connected... but i dont know how to grab the value from the HRM..


------------------------------EDIT2------------------------------------------------------------------------------------------------------------------------------


I was reading the wrong address.....

Now it works... Thanks for the help!!  Big Grin Big Grin
Reply


Forum Jump: