Difference between revisions of "Install Pibox V3 on Ubuntu ( 64 bits )"

From Giss
(Created page with "INSTALL for PIBOX V3 on a Ubuntu Laptop/Desktop ( 18.04 or 20.04 ) Pibox V3 app was developped by http://p-node.org and in particular by jack@rybn.org and it is aimed at pro...")
 
Line 9: Line 9:
 
on Pi boxes, but this part will not be available on PCs.
 
on Pi boxes, but this part will not be available on PCs.
  
Here are the instructions to install it on a regular Ubuntu system.
+
Here are the instructions to install it on a regular Ubuntu system :
  
PREREQUISITES :
+
= PREREQUISITES =
  
 
* A ubuntu 18.04 or 20.04
 
* A ubuntu 18.04 or 20.04
Line 21: Line 21:
 
     npm v6.9.0  
 
     npm v6.9.0  
  
IMPORTANT !! :
+
= IMPORTANT !! =
  
 
You must install and run under the account
 
You must install and run under the account
Line 33: Line 33:
 
My user here is chevil, my usual account.
 
My user here is chevil, my usual account.
  
INSTALL :
+
= INSTALL =
  
 
Pibox V3 consists of 2 parts :
 
Pibox V3 consists of 2 parts :
  
 
* a back-end which is a python app
 
* a back-end which is a python app
 +
 
* a front-end which is an angular/node.js app
 
* a front-end which is an angular/node.js app
  
1/ get the sources :
+
== get the sources ==
  
 
> cd ~  
 
> cd ~  
 +
 
> mkdir pibox
 
> mkdir pibox
 +
 
> cd pibox  
 
> cd pibox  
 +
 
> git clone http://git.rybn.org/rybn/pibox_v3_back.git
 
> git clone http://git.rybn.org/rybn/pibox_v3_back.git
 +
 
> git clone http://git.rybn.org/rybn/pibox_v3_front.git
 
> git clone http://git.rybn.org/rybn/pibox_v3_front.git
 +
 
> cd pibox_v3_back
 
> cd pibox_v3_back
 +
 
> git checkout develop
 
> git checkout develop
  
2/ install dependencies :
+
== install dependencies :
  
 
> sudo apt-get update
 
> sudo apt-get update
 +
 
> sudo apt install python3-pip libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio gstreamer1.0-plugins-base-apps libglib2.0-dev libgirepository1.0-dev libcairo2-dev pulseaudio dnsmasq hostapd docker docker-compose
 
> sudo apt install python3-pip libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio gstreamer1.0-plugins-base-apps libglib2.0-dev libgirepository1.0-dev libcairo2-dev pulseaudio dnsmasq hostapd docker docker-compose
 +
 
> pip3 install --upgrade setuptools
 
> pip3 install --upgrade setuptools
 +
 
> pip3 install --upgrade pip  
 
> pip3 install --upgrade pip  
 +
 
> pip3 install -r requirements.txt
 
> pip3 install -r requirements.txt
  
3/ adjust pulse configuration :
+
== adjust pulse configuration ==
  
 
edit /etc/pulse/client.conf as root
 
edit /etc/pulse/client.conf as root
 
and set :
 
and set :
 +
  
 
enable-shm = yes
 
enable-shm = yes
 +
 
shm-size-bytes = 1000000
 
shm-size-bytes = 1000000
  
4/ add you user to pulse audio group :
+
 
 +
== add you user to pulse audio group ==
 +
 
  
 
> sudo usermod -a -G pulse chevil
 
> sudo usermod -a -G pulse chevil
 +
 
> sudo usermod -a -G pulse-access chevil
 
> sudo usermod -a -G pulse-access chevil
  
5/ modify paths in app/main.py
+
== modify paths in app/main.py ==
  
 
edit app/main.py  
 
edit app/main.py  
  
 
change :
 
change :
 +
 
/etc/wpa_supplicant/wpa_supplicant.conf
 
/etc/wpa_supplicant/wpa_supplicant.conf
replaced by :
+
 
 +
to :
 +
 
 
/etc/dbus-1/system.d/wpa_supplicant.conf
 
/etc/dbus-1/system.d/wpa_supplicant.conf
  
 
change :
 
change :
 +
 
/sys/class/ieee80211/phy1/device/net
 
/sys/class/ieee80211/phy1/device/net
replace by :
+
 
 +
to :
 +
 
 
/sys/class/ieee80211/phy0/device/net
 
/sys/class/ieee80211/phy0/device/net
  
5/ create sound directory :
+
* this could be wrong, this depends on how many network cards
 +
 
 +
you have in your system,
 +
 
 +
so check what is in /sys/class/ieee80211
 +
 
 +
== create sound directory ==
 +
 
  
 
> cd ~/pibox/pibox_v3_back
 
> cd ~/pibox/pibox_v3_back
 +
 
> mkdir sounds
 
> mkdir sounds
  
6/ install the front-end :
+
== setup the front-end ==
  
 
> cd ~/pibox/pibox_v3_front
 
> cd ~/pibox/pibox_v3_front
 +
 
> rm package-lock.json
 
> rm package-lock.json
 +
 
> npm i
 
> npm i
  
7/ restart your machine :
+
== restart your machine ==
  
 
> reboot
 
> reboot
  
8/ start the back-end :
+
== open a terminal again and start the back-end ==
  
 
> cd ~/pibox/pibox_v3_back
 
> cd ~/pibox/pibox_v3_back
 +
 
> python3 app/main.py
 
> python3 app/main.py
  
9/ start the front-end :
+
== start the front-end ==
  
 
> cd ~/pibox/pibox_v3_front
 
> cd ~/pibox/pibox_v3_front
 +
 
> npm run start
 
> npm run start
  
 
10/ play with your Pibox V3 :
 
10/ play with your Pibox V3 :
  
your pibox should be available at :
+
That's it !
 +
 
 +
Your Pibox V3 UI should be available at :
 
http://localhost:4200
 
http://localhost:4200

Revision as of 23:32, 23 December 2020

INSTALL for PIBOX V3 on a Ubuntu Laptop/Desktop ( 18.04 or 20.04 )

Pibox V3 app was developped by http://p-node.org and in particular by jack@rybn.org and it is aimed at providing a streaming station/solution on Raspberry PIs.

It can also act as a radio FM transmitter on Pi boxes, but this part will not be available on PCs.

Here are the instructions to install it on a regular Ubuntu system :

PREREQUISITES

  • A ubuntu 18.04 or 20.04
  • Tools : git, python3, node.js, npm
 ** we used :
    git 2.17.1 
    python 3.6.9 
    node.js v12.10.0 
    npm v6.9.0 

IMPORTANT !!

You must install and run under the account that started the gnome session to be able to connect to pulse audio.

So, use your normal account and not the pi account like indicated in some p-node manuals.

My user here is chevil, my usual account.

INSTALL

Pibox V3 consists of 2 parts :

* a back-end which is a python app

* a front-end which is an angular/node.js app

get the sources

> cd ~

> mkdir pibox

> cd pibox

> git clone http://git.rybn.org/rybn/pibox_v3_back.git

> git clone http://git.rybn.org/rybn/pibox_v3_front.git

> cd pibox_v3_back

> git checkout develop

== install dependencies :

> sudo apt-get update

> sudo apt install python3-pip libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio gstreamer1.0-plugins-base-apps libglib2.0-dev libgirepository1.0-dev libcairo2-dev pulseaudio dnsmasq hostapd docker docker-compose

> pip3 install --upgrade setuptools

> pip3 install --upgrade pip

> pip3 install -r requirements.txt

adjust pulse configuration

edit /etc/pulse/client.conf as root and set :


enable-shm = yes

shm-size-bytes = 1000000


add you user to pulse audio group

> sudo usermod -a -G pulse chevil

> sudo usermod -a -G pulse-access chevil

modify paths in app/main.py

edit app/main.py

change :

/etc/wpa_supplicant/wpa_supplicant.conf

to :

/etc/dbus-1/system.d/wpa_supplicant.conf

change :

/sys/class/ieee80211/phy1/device/net

to :

/sys/class/ieee80211/phy0/device/net

  • this could be wrong, this depends on how many network cards

you have in your system,

so check what is in /sys/class/ieee80211

create sound directory

> cd ~/pibox/pibox_v3_back

> mkdir sounds

setup the front-end

> cd ~/pibox/pibox_v3_front

> rm package-lock.json

> npm i

restart your machine

> reboot

open a terminal again and start the back-end

> cd ~/pibox/pibox_v3_back

> python3 app/main.py

start the front-end

> cd ~/pibox/pibox_v3_front

> npm run start

10/ play with your Pibox V3 :

That's it !

Your Pibox V3 UI should be available at : http://localhost:4200