msaunby / ble-sensor-pi

Simple example for SensorTag with RaspberryPi a Bluetooth Low Engery (BLE GATT) device
152 stars 66 forks source link

Enabling humidity sensor doesn't work #3

Open benadler opened 10 years ago

benadler commented 10 years ago

Helllo Mike, this is a cheap shot to make you look at http://e2e.ti.com/support/low_power_rf/f/538/p/311948/1097759.aspx

I cannot get the humidity sensor to work with my SensorTag, using either gatttool or sensortag.py. Could you please verify that it works on your SensorTag using both sensortag.py and show me a log of how you do it manually using gatttool?

If you could get it to work, I'd assume that mine is broken and just order a new one.

Thanks for your help! ben

mvartani76 commented 10 years ago

Hey Ben,

Thanks for the email. I took a look at the TI post and was able to read 4 bytes from the humidity sensor as shown below...

pi@raspberrypi3 ~ $ sudo gatttool -b 34:B1:F7:D1:40:56 --interactive [34:B1:F7:D1:40:56][LE]> connect Attempting to connect to 34:B1:F7:D1:40:56 Connection successful [34:B1:F7:D1:40:56][LE]> char-write-cmd 0x3c 01 [34:B1:F7:D1:40:56][LE]> char-read-hnd 0x38 Characteristic value/descriptor: 28 64 ce 4c [34:B1:F7:D1:40:56][LE]>

If there is anything that you want me to try on my sensor tag to help you debug your issue, I would be glad to help.

Thanks, Mike