diff --git a/MAKE-SERVER/be-server.pro b/MAKE-SERVER/be-server.pro index ed66b99..a3ae05c 100644 --- a/MAKE-SERVER/be-server.pro +++ b/MAKE-SERVER/be-server.pro @@ -51,13 +51,3 @@ PRE_TARGETDEPS += $$PWD/../deps/karchive-5.17.0/build/src/libKF5Archive.so.5 RESOURCES += OTHER_FILES += - - -#### Libraries #### - ## Oscpack ## -# unix:!macx: LIBS += -L$$PWD/../../../git/oscpack/build/ -loscpack - -# INCLUDEPATH += $$PWD/../../../git/oscpack/src -# DEPENDPATH += $$PWD/../../../git/oscpack/src - -#unix:!macx: PRE_TARGETDEPS += $$PWD/../../../git/oscpack/build/liboscpack.a diff --git a/doc/INTERACTION.rst b/doc/API.rst similarity index 100% rename from doc/INTERACTION.rst rename to doc/API.rst diff --git a/doc/COMPILING.rst b/doc/COMPILING.rst index 020a6df..c6d20a2 100644 --- a/doc/COMPILING.rst +++ b/doc/COMPILING.rst @@ -47,7 +47,7 @@ First, clone the repository on the Raspberry Pi, either directly from Github or $ git clone https://github.com/hixe33/boiteselec-server -Then, we need to generate the Makefile before finally compiling the sources:: +Then, we need to generate the Makefile from the QMake file before finally compiling the sources:: $ mkdir boiteselec-server/build $ qmake -config release -o boiteselec-server/build/Makefile boiteselec-server/src/be-server.pro diff --git a/doc/HOME.rst b/doc/HOME.rst index be33025..dd74ba8 100644 --- a/doc/HOME.rst +++ b/doc/HOME.rst @@ -1,6 +1,6 @@ -=================== -Boîtes électriques -=================== +=========================== +Boîtes électriques - Server +=========================== Table of content ================ @@ -8,13 +8,13 @@ Table of content *HOME* Presentation of the application. -*COMPILING* - How to build the program from the source. - *SETUP* How to install and setup the server. -*INTERACTION* +*COMPILING* + How to build the program from the source. + +*API* How client and server interact with each other. (Description of the protocol) diff --git a/doc/INSTALL BOITES PI.txt b/doc/INSTALL BOITES PI.txt new file mode 100755 index 0000000..55f9d9c --- /dev/null +++ b/doc/INSTALL BOITES PI.txt @@ -0,0 +1,72 @@ +#pour ajouter une liste de packets +sudo nano /etc/apt/sources.list et remplacer jessie par testing +puis sudo apt-get update && sudo apt-get dist-upgrade + +#pour trouver une librairie +sudo apt-cache search nom_du_package + +#changer timezone +dpkg-reconfigure tzdata + +#mise à jour +sudo apt-get update && sudo apt-get upgrade +#sudo rpi-update + +#preparer le pi +sudo apt-get install libqt5core5a +sudo apt-get install qt5-qmake +sudo apt-get install qtbase5-dev +sudo apt-get install libqt5webkit5-dev +sudo apt-get install build-essential + +sudo apt-get install cmake +http://osdevlab.blogspot.fr/2015/12/how-to-install-latest-cmake-for.html +wget https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz +tar -xvzf cmake-3.4.1.tar.gz +cd cmake-3.4.1/ +cmake-3.4.1 $ sudo ./bootstrap +cmake-3.4.1 $ sudo make +cmake-3.4.1 $ sudo make install + + +sudo apt-get install extra-cmake-modules +git clone git://anongit.kde.org/extra-cmake-modules +cd extra-cmake-modules +(mkdir build; cd build; cmake ..; make; make install) + + + + +sudo apt-get install libbz2-1.0 libbz2-dev +sudo apt-get install liblzma5 liblzma-dev + +KArchive +sudo apt-get install libkf5archive5 libkf5archive-dev +ou +wget http://download.kde.org/stable/frameworks/5.17/karchive-5.17.0.tar.xz +tar -xf karchive-5.17.0.tar.xz +cd karchive-5.17.0.tar.xz +mkdir build +cd build +sudo cmake .. +sudo make +sudo make install + + + + + +sudo apt-get install librtaudio-dev +sudo apt-get install libqt5serialport5 libqt5serialport5-dev +sudo apt-get install liboscpack1 liboscpack-dev liboscpack-dbg +sudo apt-get install ffmpeg +sudo apt-get install libsndfile1 libsndfile1-dev + + +#pour karchive +sudo nano .bashrc et rajouter a la fin : export QT-SELECT=5 + +compiler +cd travail +qmake -config release -o Makefile ../src/InterfaceQt.pro +make diff --git a/doc/PI.rst b/doc/PI.rst new file mode 100644 index 0000000..1a777b4 --- /dev/null +++ b/doc/PI.rst @@ -0,0 +1,100 @@ +Configuration Pi +================ + +Distrib : Raspbian Jessie Lite +Install (pour install auto : ajouter silentinstall au début de boot/commandline.txt, puis connexion SSH). + +NOT SO SURE +--------------------------------------------------------------------------------------- +On passe sur ``testing`` pour avoir tous les packages : ``/etc/apt/sources.list``:: + + deb http://mirrordirector.raspbian.org/raspbian/ **jessie** main contrib non-free rpi + +Devient:: + + deb http://mirrordirector.raspbian.org/raspbian/ **testing** main contrib non-free rpi + + + $ sudo apt-get update && sudo apt-get dist-upgrade +---------------------------------------------------------------------------------------- + +Git:: + $ sudo apt-get install git + $ git clone https://github.com/hixe33/boiteselec-server + + +Building:: + + $ sudo apt-get install build-essential qt5-qmake qt5-default libqt5serialport5-dev libsndfile1-dev liboscpack-dev librtaudio-dev + +WiringPi:: + +KF5Archive:: + +Activate SPI:: + + # raspi-config + + -> 9 Advanced Options -> A5 SPI -> -> -> + +Bugs:: + + Si Setting locale failed : `Solution `_ + # dpkg-reconfigure locales + +SETUP WIFI BRIDGE:: + +Dans /etc/network/interfaces:: + + #config pont + iface eth0 inet dhcp + + allow-hotplug wlan0 + iface wlan0 inet static + address 192.170.0.1 + netmask 255.255.255.0 + network 192.170.0.0 + broadcast 192.170.0.255 + + iface default inet dhcp + +Puis les utilitaires:: + + $ sudo apt-get install hostapd dnsmasq (iptables ?) + +Dans /etc/hostapd/hostapd.conf:: + + interface=wlan0 + driver=nl80211 + ssid=BoitesElectriquesPi + hw_mode=g + channel=6 + ieee80211n=1 + wmm_enabled=1 + ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40] + macaddr_acl=0 + auth_algs=1 + beacon_int=100 + dtim_period=2 + max_num_sta=255 + rts_threshold=2347 + fragm_threshold=2346 + +Dans /etc/dnsmasq.conf:: + + interface=wlan0 + listen-address=192.170.0.1 + bind-interfaces + server=8.8.8.8 + domain-needed + bogus-priv + dhcp-range=192.170.0.50,192.170.0.150,12h + +Dans /etc/default/hostapd (pour hostapd au démarrage): + + DAEMON_CONF="/etc/hostapd/hostapd.conf" + +On teste:: + + sudo service dnsmasq start + sudo service hostapd start diff --git a/doc/SETUP.rst b/doc/SETUP.rst index 71ffe36..525c5fe 100644 --- a/doc/SETUP.rst +++ b/doc/SETUP.rst @@ -135,7 +135,7 @@ The following options are available : Run --- -To start the server, just run ``./be-server``, or ``sudo /etc/init.d/be-server start`` if the server has been daemonized_. +To start the server, just run ``./be-server``, or ``sudo systemctl start be-server.service`` if the server has been daemonized_. The following options are available :