This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy and blutoothctl - How to read data via Linux console?

Hello everybody!

How can i read the temperature, the battery-% or other data from the Thingy when using the Linux console and not the SDK? My steps so far

1. With

Fullscreen
1
sudo hcitool lescan
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
i was able to find the Thingy, a device with unknown name (but same MAC as the Thingy) and a third one which turns off with the Thingy.

2. start bluetoothctl and run

Fullscreen
1
info [MACofThingy]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
displays the name, an alias and trust/block/connect status

3. pairing with the Thingy did not work, but

Fullscreen
1
connect [MACofThingy]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(still in the bluetoothctl environment) did work and showed me nine UUIDs

4. diving into gatt submenu: one should be able to list the attributes and read/write them. But this does not work because no attributes are listed.

Another option i tried was the

Fullscreen
1
gatttool -b [MACofThingy] --char-read --uuid=2800
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
command with the Thingy still connected (green breathing light). The connection got refused (Error 111) for each UUID i tried.

Operating system is Ubuntu 16.04 on a Thinkpad with its Standard, BLE-capable, Wifi module.