Setup

Flash Raspberry Pi OS Lite (Bullseye!) to the SD card and create/edit the following files. To flash the SD card use balenaEtcher or Raspberry Imager.

Connect to the Raspberry Pi via SSH ssh [email protected].

Install dependencies

Update the libraries and install Nodejs.

  sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

wget https://unofficial-builds.nodejs.org/download/release/v14.18.1/node-v14.18.1-linux-armv6l.tar.gz
tar -xzf node-v14.18.1-linux-armv6l.tar.gz
cd node-v14.18.1-linux-armv6l
sudo cp -R * /usr/local
node -v
  

Setup project directory

Create project folders and install node dependencies (for BLE).

  mkdir ~/projects && cd ~/projects
mkdir ble && cd ble
npm install @abandonware/noble # required for BLE