Skip to content

Commit

Permalink
Doc, notes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlou33 committed Sep 15, 2016
1 parent 3cd5842 commit ed28cbb
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 19 deletions.
10 changes: 0 additions & 10 deletions MAKE-SERVER/be-server.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/COMPILING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions doc/HOME.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
===================
Boîtes électriques
===================
===========================
Boîtes électriques - Server
===========================

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)

Expand Down
72 changes: 72 additions & 0 deletions doc/INSTALL BOITES PI.txt
Original file line number Diff line number Diff line change
@@ -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
100 changes: 100 additions & 0 deletions doc/PI.rst
Original file line number Diff line number Diff line change
@@ -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 -> <Yes> -> <Ok> -> <Finish>
Bugs::

Si Setting locale failed : `Solution <https://www.thomas-krenn.com/en/wiki/Perl_warning_Setting_locale_failed_in_Debian>`_
# 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
2 changes: 1 addition & 1 deletion doc/SETUP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 :

Expand Down

0 comments on commit ed28cbb

Please sign in to comment.