Last active
March 27, 2019 12:30
-
-
Save StevenRudenko/b6c032c3c1fdfb5c641ff95883e6cd02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/intel-iot-devkit/tinyb | |
https://mcuoneclipse.com/2016/12/19/tutorial-ble-pairing-the-raspberry-pi-3-model-b-with-hexiwear/ | |
# Update BlueZ | |
sudo apt-get update | |
sudo apt-get install git build-essential autoconf cmake libtool libglib2.0 libdbus-1-dev libudev-dev libical-dev libreadline-dev | |
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.39.tar.xz | |
tar xvf bluez-5.39.tar.xz | |
cd bluez-5.39/ | |
aclocal | |
autoheader | |
automake --force-missing --add-missing | |
autoconf | |
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd | |
./configure --prefix=/usr \ | |
--mandir=/usr/share/man \ | |
--sysconfdir=/etc \ | |
--localstatedir=/var \ | |
--enable-experimental \ | |
--enable-maintainer-mode | |
make | |
sudo make install | |
sudo cp attrib/gatttool /usr/local/bin | |
sudo sed -i '/^ExecStart.*bluetoothd\s*$/ s/$/ --experimental/' /lib/systemd/system/bluetooth.service | |
sudo ln -s /lib/firmware /etc/firmware | |
sudo systemctl enable bluetooth | |
sudo systemctl daemon-reload | |
sudo apt-mark hold bluez | |
sudo nano /lib/systemd/system/bluetooth.service | |
ExecStart=/usr/local/libexec/bluetooth/bluetoothd --experimental | |
sudo systemctl daemon-reload | |
sudo systemctl restart bluetooth | |
bluetoothctl | |
power on | |
agent on | |
scan on | |
scan off | |
info 00:34:40:0A:00:4E | |
pair 00:34:40:0A:00:4E | |
devices | |
list-attributes 00:34:40:0A:00:4E | |
read | |
atribute-info | |
select-attribute /org/bluez/hci0/dev_00_32_40_08_00_12/service002e/char002f | |
write 0x3 0x4 0x10 0x20 0x30 0x40 | |
disconnect 00:32:40:08:00:12 | |
quit | |
sudo apt-get install cmake build-essentials check-install libglib2.0-dev doxygen | |
git clone https://github.com/intel-iot-devkit/tinyb.git | |
mkdir build | |
cd build | |
cmake -DBUILDJAVA=ON .. | |
make | |
sudo checkinstall install | |
// to remove dpkg -r build | |
java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar -jar your.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot! This script helped me to solve my problem!
However, I think you have a miss-typo in line 59... Where you have
sudo apt-get install cmake build-essentials check-install libglib2.0-dev doxygen
should be:
sudo apt-get install cmake build-essential checkinstall libglib2.0-dev doxygen