====== Ambient systems ======
{{ :ambiant:iot1.png?direct&300|}}
Welcome to the Ambient Systems of the M2Siame.\\
* [[http://m2siame.univ-tlse3.fr/teaching/francois/IoT_course.pdf|IoT main course]] | from electronics to the cloud,
* An introduction to [[http://m2siame.univ-tlse3.fr/teaching/francois/G2EBI_python_tutorial.pdf|Python]],
* [[http://m2siame.univ-tlse3.fr/teaching/francois/Masters-IoT-practical-exercises.pdf|IoT practical exercises]] ... and their github files [[https://github.com/fthiebolt/teaching-IoT|IoT-teaching]],
* Usefull Python packages ([[http://m2siame.univ-tlse3.fr/teaching/francois/UE-SAM/|Adafruit_I2C and others UE-SAM stuffs]]) for our practical exercises.
* UE SAM exam / [[http://m2siame.univ-tlse3.fr/teaching/francois/Examen_M2Siame_ambiant-systems.pdf|last year exam]].\\
* Electronics [[https://m2siame.univ-tlse3.fr/teaching/francois/mouser-backtobasics.pdf|back2basics]] ... a usefull when when it's time to choose components/solutions :).\\
* Introduction to [[http://m2siame.univ-tlse3.fr/teaching/francois/docker-introduction_dec15.pdf|docker]] (Sébastien Binet),
* ... another introduction to [[http://m2siame.univ-tlse3.fr/teaching/francois/docker_alain-tchana_2015.pdf|docker]] (Alain Tchana),
* Docker cheat sheets [[https://www.docker.com/sites/default/files/Docker_CheatSheet_08.09.2016.pdf|here]] and [[http://container-solutions.com/content/uploads/2015/06/15.06.15_DockerCheatSheet_A2.pdf|here]].\\
* European H2020 project related to [[http://m2siame.univ-tlse3.fr/teaching/francois/D03_01_WP03_H2020_UNIFY-IoT_Final.pdf|IoT unify]].\\
* Grand Lyon métropole, [[http://m2siame.univ-tlse3.fr/teaching/francois/SmartCities-GrandLyonMetrolopole_jan17.pdf|Smart Cities explained]].\\
Additionnaly, you can have a look to the [[http://m2siame.univ-tlse3.fr/teaching/francois|download area]].\\
===== a bit further ... =====
{{:ambiant:iot4.png?direct&200 |}}\\
Here are some interesting links related to various topics like:\\
* Buildroot vs OpenEmbedded/Yocto Linux, it's [[http://m2siame.univ-tlse3.fr/teaching/francois/Buildroot_vs_YoctoLinux.pdf|here]],
* The neOCampus [[http://neocampus.univ-tlse3.fr/_media/neocampus-iot-architecture_may16.pdf|main architecture]],
* Building it's own [[http://cpham.perso.univ-pau.fr/LORA/RPIgateway.html|LoRaWAN]] gateway, and [[http://m2siame.univ-tlse3.fr/teaching/francois/LoRa_RPi-gateway_may16.pdf|slides]],
* 6lowPan [[http://m2siame.univ-tlse3.fr/teaching/francois/6lowpan-mrf24j40_may15.pdf|mrf24j40]] driver,
* [Python] [[https://www.toptal.com/python/python-class-attributes-an-overly-thorough-guide|difference]] between CLASS attributes and instances attributes.
\\
===== [RPi] NetworkManager and m2siame AP ... =====
We'll now explain how to setup 'NetworkManager' on your Raspberry Pi ... to add a WiFi connexion to the SSID:m2siame
apt-get -y install network-manager
apt-get -y install network-manager-gnome
apt-get -y remove modemmanager
cat > /etc/network/interfaces << EOF
# NetworkManager: minimum interfaces
# François July,16
#
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
EOF
systemctl stop dhcpcd
systemctl disable dhcpcd
systemctl disable wpa_supplicant
pkill -9 wpa_supplicant
sed -ie '/^managed=/s/=.*/=true/g' /etc/NetworkManager/NetworkManager.conf
sed -i '/^\[main\]/a monitor-connection-files=true' /etc/NetworkManager/NetworkManager.conf
systemctl enable NetworkManager
reboot
\\
In case you need CLI to NetworkManager to add a WiFi connexion:
nmcli con add con-name m2siame ifname "*" type wifi ssid m2siame
nmcli con modify m2siame wifi-sec.key-mgmt wpa-psk
nmcli con modify m2siame wifi-sec.psk
nmcli device wifi rescan
nmcli --wait 30 con up m2siame
\\
To gain access to our network, you first ask for:\\
* RPi's WiFi MAC addr registration in the DHCP server,
* WiFi [[protected:wifi|passphrase]] (teacher only).
\\
{{ :ambiant:iot5.png?direct&500 |}}