S7d51fae4e5f67d29.jimcontent.com



Objectif de ce labo?:Le but de ce document est de vous familiariser avec l’installation et l’utilisation d’un réseaxu de capteurs sans fil (appelé en anglais Wireless Sensor Network ou encore WSN). Les composants hardware d’un réseau sans fil sont les capteurs (sensors), les n?uds (motes), les gateways et les ordinateurs, connecte?s comme dans l’image ci-dessous. Les capteurs sont branche?s sur les n?uds. Les n?uds, que nous appellerons aussi Motes, servent a? alimenter les capteurs et a? en recueillir les résultats des mesures. Les n?uds sont alimente?s avec 2xAA piles chacun. En utilisant des antennes filaires, les n?uds transmettent leurs donne?es au n?ud-puit. Ce n?ud-puit est identique aux autres n?uds, mais, a? différence des autres, il est branche? sur un Gateway. Le Gateway sert a? établir une connexion avec un ordinateur par son port USB. Nous utiliserons le système d’exploitation Tinyos pour notre WSN.Le text qui suit est donné en anglaise. Comme vous le savez, cest très souvent dans cette langue que les informations techniques sont échangées.Tiny-OS Installation and Hello World appInstall an Ubuntu virtual machine.Tell?apt?about the TinyProd Signing Key. $ wget -O - | sudo apt-key add -Add the following lines to /etc/apt/sources.list.d/tinyprod-debian.list: deb stretch main deb msp430-46 main $ sudo -s $ cd /etc/apt/sources.list.d $ echo "deb stretch main" >> tinyprod-debian.list $ echo "deb msp430-46 main" >> tinyprod-debian.list $ exitInstall the new packages: $ sudo apt-get update $ sudo apt-get install nesc tinyos-tools-devel msp430-46 avr-tinyosDownload the tinyos-main from: .bashrc fileexport TOSROOT="<local-tinyos-path>"export TOSDIR="$TOSROOT/tos"export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java:$TOSROOT/support/sdk/java/tinyos.jar:.export MAKERULES="$TOSROOT/support/make/Makerules"export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/pythonIn order to program the motes, you will need to access the serial ports. This can be done by joining the group that grants this privilege. sudo gpasswd -a <your-user> dialoutThe environment should be ready now. To test it, open a new console and enter the following commands: $TOSROOT/apps/Blink cd $TOSROOT/apps/Blink/make telosbRestart the machine to let the “user privilege” go on. Update to the latest version of pySerial Modify tos-bsl as follows:Remove: self.serialport.setBaudrate(baudrate)Add:#handle pyserial 2.x and 3.0.1try: self.serialport.setBaudrate(baudrate)except AttributeError: self.serialport.baudrate = baudrateTry as follows to install your app on device: make telosb install.1 bsl,/dev/ttyUSB0Check if your Blink application works properly and show the final outcome to the lab instructor.In the next step, try to analyze the Blink application code and get familiar with the way it works. In the next lab, we will get more familiar with the structure of the code. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download