WHOA I totally got it working :D
Here are the steps I took. Overview
1) updated from the bluez that is in ubuntu 14.04 package manager,
Code: Select all
nrw@nrw-PC:~$ dpkg --status bluez | grep '^Version:'
Version: 4.101-0ubuntu13
to version 5.20
2) Using that, figured out the correct characteristic I should be writing to
I'm not sure how interlinked 1 and 2 are, presumably I didn't need to update bluez, I was just writing to the wrong characteristic ID yesterday.
phewwwww large order of nrf8001 breakouts not going to waste. hopefully.
In detail, with major help from
http://www.jaredwolff.com/blog/get-star ... ow-energy/,
Code: Select all
sudo apt-get remove bluez
sudo apt-get remove bluez-cups
sudo apt-get remove bluez-hcidump
~$ wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.20.tar.xz
(I checked online to see what the latest version was at
http://www.kernel.org/pub/linux/bluetooth/)
Code: Select all
~$ tar xvf bluez-5.18.tar.xz
~/bluez-5.20$ ./configure --enable-library --disable-systemd
$ make -j8 && sudo make install
$ sudo cp attrib/gatttool /usr/local/bin/
Code: Select all
nrw@nrw-PC:~$ sudo hcitool lescan
LE Scan ...
E9:D9:7A:EB:BC:35
E9:D9:7A:EB:BC:35 (unknown)
IN another terminal (not sure if the sec-level=high is needed)
Code: Select all
nrw@nrw-PC:~$ sudo gatttool -b E9:D9:7A:EB:BC:35 -I -t random --sec-level=high
[E9:D9:7A:EB:BC:35][LE]> connect
Attempting to connect to E9:D9:7A:EB:BC:35
Connection successful
[E9:D9:7A:EB:BC:35][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
handle: 0x0008, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0009, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000b, uuid: 6e400002-b5a3-f393-e0a9-e50e24dcca9e
handle: 0x000c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000d, uuid: 6e400003-b5a3-f393-e0a9-e50e24dcca9e
handle: 0x000e, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x000f, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0010, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0011, uuid: 00002a27-0000-1000-8000-00805f9b34fb
Looks like we want 0x00b, the TX service according to
https://learn.adafruit.com/getting-star ... pp-support
Code: Select all
[E9:D9:7A:EB:BC:35][LE]> char-write-cmd 0x00b 0x0072
On the Serial Monitor:
Code: Select all
Received 3 bytes: r [ 0x0 0x0 0x72 ]
Writing out to BTLE: 0x0 0x0 0x72
Will write a blog post soon... Hurray!! Now to automate this with python.