diff --git a/doc/HOME.rst b/doc/HOME.rst index c228ded..325eb5f 100644 --- a/doc/HOME.rst +++ b/doc/HOME.rst @@ -24,6 +24,9 @@ Table of content General informations ==================== +Licenses +~~~~~~~~ + This documentation is formatted using the `reStructuredText `_ syntax, and is distributed under the Creative Commons BY-SA 4.0 license. The `Open Sound Control (OSC) packet manipulation library `_ is written and distributed under the `MIT license `_, with the following addition : @@ -33,3 +36,12 @@ The `Open Sound Control (OSC) packet manipulation library `_ is distributed under the `GNU GPL v3 `_. The application itself is distributed under the `Zlib License `_. + +Notation +~~~~~~~~ + +In that document, you will often see commands that you can enter in an terminal, beginning either with a ``$`` or a ``#``, that you MUST NOT type. + +If the command starts with a ``$``, you just have to be a regular user to perform it (by default, ``pi``). + +If it's a ``#``, you NEED ``root`` privileges (sometimes, the ``sudo`` command is enough, but not always). \ No newline at end of file diff --git a/doc/PI.rst b/doc/PI.rst index a06b791..0088818 100644 --- a/doc/PI.rst +++ b/doc/PI.rst @@ -1,23 +1,50 @@ Configuration Pi ================ -Distrib : Raspbian Jessie Lite -Install (pour install auto : ajouter silentinstall au début de boot/commandline.txt, puis connexion SSH). +Raspbian installation +--------------------- + +The installation will be done on a Raspberry Pi, powered by the `*Raspbian Jessie Lite* `_ image. + +You can follow the installation instructions for more information about how to write the image on an `SD Card `. + +If you have a screen and a USB keyboard +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have a screen with a HDMI port, connect it to your Raspberry Pi and do the same with a USB keyboard. Then power your Raspberry Pi on and follow the onscreen instructions to perform the installation. + +If you don't +~~~~~~~~~~~~ + +If you don't have both a screen and a keyboard, you can still access it through SSH. + +To do that, once the image has been written on the card, mount its ``boot`` partition, open the ``commandline.txt`` file and add ``silentinstall`` at the beginning of the first line. + +Then, connect the Pi to your network (or directly to your computer, creating a local network !) with an Ethernet cable and power it on. You can scan your network with the ``nmap`` command to find your Pi IP address and connect you to it through SSH (default password : ``raspberry``):: + + $ ssh pi@ + +Server's requirements +--------------------- + +SPI +~~~ + +For the Boîtes Électriques Server's executable to be able to run correctly, you need to activate the SPI interface on the Pi. To do that, just type:: -Activate SPI:: - # raspi-config - -> 9 Advanced Options -> A5 SPI -> -> -> - -Bugs:: +Then go to: ``9 Advanced Options`` -> ``A5 SPI`` -> ```` -> ```` -> ```` - Si Setting locale failed : `Solution `_ - # dpkg-reconfigure locales +Warning : this must be done before executing the server (``be-server``), else it won't run. -SETUP WIFI BRIDGE:: +Wifi bridge setup +----------------- + +Network and tools +~~~~~~~~~~~~~~~~~ -Dans /etc/network/interfaces:: +First, edit the ``/etc/network/interfaces`` file, and replace it with this:: #config pont iface eth0 inet dhcp @@ -31,11 +58,14 @@ Dans /etc/network/interfaces:: iface default inet dhcp -Puis les utilitaires:: +Then, we need Hostapd and DNSMasq to setup the bridge and attribute IPs automatically:: - $ sudo apt-get install hostapd dnsmasq (iptables ?) + $ sudo apt-get install hostapd dnsmasq -Dans /etc/hostapd/hostapd.conf:: +Hostapd configuration +~~~~~~~~~~~~~~~~~~~~~ + +Edit the ``/etc/hostapd/hostapd.conf`` file and replace it with this:: interface=wlan0 driver=nl80211 @@ -53,7 +83,26 @@ Dans /etc/hostapd/hostapd.conf:: rts_threshold=2347 fragm_threshold=2346 -Dans /etc/dnsmasq.conf:: +Then ``/etc/default/hostapd``to make it run on startup:: + + DAEMON_CONF="/etc/hostapd/hostapd.conf" + +Test it:: + + # systemctl start hostapd + +You can check the service status with the following command:: + + # systemctl status hostapd + +And enable it with ``systemctl``:: + + # systemctl enable hostapd + +DNSMasq +~~~~~~~ + +Edit the ``/etc/dnsmasq.conf`` file and replace it with this:: interface=wlan0 listen-address=192.170.0.1 @@ -62,12 +111,28 @@ Dans /etc/dnsmasq.conf:: domain-needed bogus-priv dhcp-range=192.170.0.50,192.170.0.150,12h + +Test it:: -Dans /etc/default/hostapd (pour hostapd au démarrage): + # systemctl start dnsmasq + +You can check the service status with the following command:: - DAEMON_CONF="/etc/hostapd/hostapd.conf" + # systemctl status dnsmasq + +And enable it with ``systemctl``:: -On teste:: + # systemctl enable dnsmasq + +Bugs +---- + +If you have the following error:: + + Setting locale failed + +You can check the `following page `_, and run:: + + # dpkg-reconfigure locales - sudo service dnsmasq start - sudo service hostapd start +Then select the correct locales. \ No newline at end of file