Difference between revisions of "Installing BtleJuice"

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Summary ==  
== Summary ==  


Description what this documentation is about
This documentation describes how to install BtleJuice on raspberrypi 3b+


== Requirements ==
== Requirements ==


* Operating system: Ubuntu 18.04 bionic amd64
* Raspbian Buster with desktop based on Debian Buster(version: february 2020, release date: 2020-02-13, kernel version: 4.19)
* Packages: git emacs


In order to complete these steps, you must have followed [[Some Other Documentation]] before.
== Install nodejs ==


== Description ==
=== Step 1 Remove nodejs ===
sudo apt-get purge nodejs && sudo apt-get autoremove && sudo apt-get autoclean
 
=== Step 2 run the following script ===
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash
 
=== Step 3 install npm 6.17.1 ===
 
nvm install 6.17.1
 
nvm use 6.17.1
 
nvm alias default 6.17.1
 
node -v
 
npm install -g npm
 
npm -v
 
=== Step 3 increases the amount of inotify watches.===
 
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
 
== Install BtleJuice and dependencies==


=== Step 1 Install the dependencies of BtleJuice using the package manager. ===
=== Step 1 Install the dependencies of BtleJuice using the package manager. ===
Line 17: Line 40:
=== Step 2 Install Btlejuice ===
=== Step 2 Install Btlejuice ===
  npm install -g btlejuice
  npm install -g btlejuice
==RP1: Setting up BtleJuice proxy ==
===Step 1: Attach the bluetooth adapter ===
service bluetooth start
===Step 2: ensure that the adapter is up and running ===
hciconfig
hciconfig hcix up
X is bluetooth adapter number obtained in the previous step.
=== Step 3 Find out the IP address  ===
ifconfig
=== Step 4 Launch  Btlejuice ===
btlejuice-proxy
== RP2: Setting up BtleJuice core ==
repeat "install nodejs" and "Install BtleJuice and dependencies" on a second raspberry pi
=== Open a terminal on the host and run ===
hciconfig
=== Step 2: Stop bluetooth service ===
sudo service bluetooth stop
=== Step 3: Plug-in the bluetooth adapter ===
=== Step 4: Ensure that the Bluetooth adapter is up ===
hciconfig
sudo hciconfig hciX up
X is bluetooth adapter number obtained in the previous step.
=== Step 5: Connect BtleJuice core with BtleJuice proxy ===
sudo btlejuice -u <VM IP address> -w
u: means IP address
w: start the web interface
== open web page==
navigate to
http://localhost:8080/


== Used Hardware ==
== Used Hardware ==
 
* 2x raspberry pi 3 b+
* 2x Asus USB-BT400 Nano Bluetooth Stick


== References ==
== References ==


* https://wikipedia.org
* blog.attify.com
* yoember.com


[[Category:Documentation]]
[[Category:Documentation]]

Latest revision as of 22:18, 14 February 2020

Summary

This documentation describes how to install BtleJuice on raspberrypi 3b+

Requirements

  • Raspbian Buster with desktop based on Debian Buster(version: february 2020, release date: 2020-02-13, kernel version: 4.19)

Install nodejs

Step 1 Remove nodejs

sudo apt-get purge nodejs && sudo apt-get autoremove && sudo apt-get autoclean

Step 2 run the following script

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash

Step 3 install npm 6.17.1

nvm install 6.17.1
nvm use 6.17.1
nvm alias default 6.17.1
node -v
npm install -g npm
npm -v

Step 3 increases the amount of inotify watches.

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Install BtleJuice and dependencies

Step 1 Install the dependencies of BtleJuice using the package manager.

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

Step 2 Install Btlejuice

npm install -g btlejuice

RP1: Setting up BtleJuice proxy

Step 1: Attach the bluetooth adapter

service bluetooth start

Step 2: ensure that the adapter is up and running

hciconfig
hciconfig hcix up

X is bluetooth adapter number obtained in the previous step.

Step 3 Find out the IP address

ifconfig

Step 4 Launch Btlejuice

btlejuice-proxy

RP2: Setting up BtleJuice core

repeat "install nodejs" and "Install BtleJuice and dependencies" on a second raspberry pi

Open a terminal on the host and run

hciconfig

Step 2: Stop bluetooth service

sudo service bluetooth stop

Step 3: Plug-in the bluetooth adapter

Step 4: Ensure that the Bluetooth adapter is up

hciconfig
sudo hciconfig hciX up

X is bluetooth adapter number obtained in the previous step.

Step 5: Connect BtleJuice core with BtleJuice proxy

sudo btlejuice -u <VM IP address> -w

u: means IP address w: start the web interface

open web page

navigate to

http://localhost:8080/

Used Hardware

  • 2x raspberry pi 3 b+
  • 2x Asus USB-BT400 Nano Bluetooth Stick

References

  • blog.attify.com
  • yoember.com