rocnet:rocnetnode-img-en
Differences
This shows you the differences between two versions of the page.
— | rocnet:rocnetnode-img-en [2022/10/29 07:11] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== RocNetNode Raspbian Package====== | ||
+ | [[: | ||
+ | [[: | ||
+ | * [[rocnet: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | \\ | ||
+ | [[http:// | ||
+ | \\ | ||
+ | ===== Introduction ===== | ||
+ | To make the Raspi RocNetNode Plug& | ||
+ | |||
+ | ====Raspbian==== | ||
+ | The installer target is **[[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | The following error will occur when trying to install on Debian: | ||
+ | < | ||
+ | dpkg: error processing rocnetnode-xxxxx-raspbian-armhf.deb (--install): | ||
+ | package architecture (armhf) does not match system (armel) | ||
+ | </ | ||
+ | //It is strongly encouraged to use Raspbian because it is optimized for the Rasberry Pi and has therefor better performance.// | ||
+ | \\ | ||
+ | |||
+ | ===== Package contents ===== | ||
+ | ^ Description ^ File ^ | ||
+ | | RocNetNode binary | / | ||
+ | | Libraries | / | ||
+ | | Default setup | / | ||
+ | | Startup script | / | ||
+ | | Update script | / | ||
+ | | Daemon script | / | ||
+ | | Configure the I2C modules | postinst | | ||
+ | | Configure the RocNetNode as service at run level 2 and 3 | postinst | | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== Raspi Basic Settings for Rocnetnode ==== | ||
+ | |||
+ | < | ||
+ | sudo raspi-config | ||
+ | </ | ||
+ | \\ | ||
+ | * enable SSH for remote maintenance | ||
+ | * optional: change password | ||
+ | * enable I2C interface for communication with the PIxx | ||
+ | * enable serial interface for RFID communication | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ===== Download & Install===== | ||
+ | * https:// | ||
+ | With ssh or a direct connection: | ||
+ | < | ||
+ | wget https:// | ||
+ | sudo apt install ./ | ||
+ | sudo reboot | ||
+ | </ | ||
+ | | //Default login: user=pi, password=raspberry// | ||
+ | **Note:** The default keyboard layout is used which is English. (**[[http:// | ||
+ | \\ | ||
+ | |||
+ | ====Upgrade==== | ||
+ | Upgrades are, especially after the first roll out, sometimes necessary to fix bugs and to add extra functionality.\\ | ||
+ | Its done in just a four steps: | ||
+ | < | ||
+ | sudo service rocnetnoded stop | ||
+ | wget https:// | ||
+ | sudo apt install ./ | ||
+ | sudo service rocnetnoded start | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | =====Shutdown===== | ||
+ | ====Workspace==== | ||
+ | {{ : | ||
+ | At shutdown " | ||
+ | |||
+ | ====Configuration Dialog==== | ||
+ | See: [[: | ||
+ | ====Terminal==== | ||
+ | < | ||
+ | sudo service rocnetnoded stop | ||
+ | </ | ||
+ | ====Power off==== | ||
+ | This is **not** the preferred way to shutdown RocNetNode because it does not report it to the Rocrail server and at worst case it could be loss of configuration settings.\\ But sometimes an unwanted power off happens and should normally not lead to any problem.\\ | ||
+ | \\ | ||
+ | |||
+ | < | ||
+ | =====Pre Configured SD-Card===== | ||
+ | | [[: | ||
+ | The RocNetNode version ist not always up to date so after connecting the RocNetNode to Rocrail an __**[[: | ||
+ | \\ | ||
+ | |||
+ | =====SD-Card Image===== | ||
+ | {{ : | ||
+ | | :!: The first thing to do is to __**[[: | ||
+ | |||
+ | ====Raspberry Pi 2 Model B==== | ||
+ | * https:// | ||
+ | A Micro SD card with 8GB capacity will be a good choice.\\ | ||
+ | * It is based on the __**[[http:// | ||
+ | * A Micro SD-Card is needed. | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ====Raspberry Pi 1 Model B/B+==== | ||
+ | * https:// | ||
+ | This image needs at least a capacity of **4GB** (3.965.190.144 Bytes) on a SD-Card. | ||
+ | * It is based on the __**[[http:// | ||
+ | * A Micro SD-Card is needed for Model B+. | ||
+ | \\ | ||
+ | |||
+ | ====Previous images==== | ||
+ | * https:// | ||
+ | This image needs __at least__ a capacity of **3.974.103.040** Bytes and is for Model B only. (Samsung SDHC 4GB Calss 4)\\ | ||
+ | | :!: Some 4GB Cards have less capacity like the SanDisk SDHC 4GB Class 4: **3.965.190.144** Bytes |\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====How to install the image==== | ||
+ | __Read this first if you do not know how to install the image on a SD Card:__ | ||
+ | * __**[[http:// | ||
+ | ===Linux=== | ||
+ | < | ||
+ | sudo umount /dev/sdx1 | ||
+ | sudo dd bs=4M if=rocnetnode-bplus-wheezy-raspbian.img of=/dev/sdx | ||
+ | </ | ||
+ | Replace /dev/sdx with the device found with: | ||
+ | < | ||
+ | command.\\ | ||
+ | The output could look like this: | ||
+ | < | ||
+ | Filesystem | ||
+ | / | ||
+ | none 4,0K | ||
+ | udev 899M 4,0K 899M 1% /dev | ||
+ | tmpfs | ||
+ | none 5,0M | ||
+ | none 910M | ||
+ | none 100M | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | In this case the device **/ | ||
+ | Be very careful not to overwrite another disk except the inserted SD-Card!\\ | ||
+ | \\ | ||
+ | --></ | ||
+ | |||
+ | |||
+ | ====Auto startup==== | ||
+ | < | ||
+ | sudo cp ~/ | ||
+ | sudo chmod 755 / | ||
+ | sudo chmod 755 / | ||
+ | sudo update-rc.d rocnetnoded defaults | ||
+ | </ | ||
+ | To re-install afterwards a modified rocnetnoded script it has to be removed first: | ||
+ | < | ||
+ | sudo update-rc.d rocnetnoded remove | ||
+ | </ | ||
+ | Otherwise the command does do nothing than show warnings only.\\ | ||
+ | |||
+ | ===Run levels=== | ||
+ | ^ Event ^ Levels ^ | ||
+ | | Start | 2, 3 | | ||
+ | | Stop | 0, 1, 6 | | ||
+ | |||
+ | |||
+ | \\ | ||
+ | ===Manually start/ | ||
+ | The RocNetNode can be manually started and stopped with the service command: | ||
+ | < | ||
+ | sudo service rocnetnoded stop | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====Modifications==== | ||
+ | ===Hosts=== | ||
+ | The last line in file /etc/hosts: (// | ||
+ | < | ||
+ | 127.0.0.1 localhost | ||
+ | :: | ||
+ | fe00:: | ||
+ | ff00:: | ||
+ | ff02:: | ||
+ | ff02:: | ||
+ | |||
+ | 127.0.1.1 raspberrypi | ||
+ | </ | ||
+ | must be deleted.\\ | ||
+ | This is needed to retrieve the real IP address of this node.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ====I2C==== | ||
+ | See: __**[[: | ||
+ | | This can only be enabled with the **sudo** command. |\\ | ||
+ | Remove the modules from the **/ | ||
+ | < | ||
+ | # blacklist spi and i2c by default (many users don't need them) | ||
+ | |||
+ | #blacklist spi-bcm2708 | ||
+ | #blacklist i2c-bcm2708 | ||
+ | </ | ||
+ | |||
+ | Add them in **/ | ||
+ | < | ||
+ | # / | ||
+ | # | ||
+ | # This file contains the names of kernel modules that should be loaded | ||
+ | # at boot time, one per line. Lines beginning with "#" | ||
+ | # Parameters can be specified after the module name. | ||
+ | snd-bcm2835 | ||
+ | i2c-bcm2708 | ||
+ | i2c-dev | ||
+ | </ | ||
+ | |||
+ | =====Check the I2C bus===== | ||
+ | Get the I2C tools: | ||
+ | < | ||
+ | sudo apt-get install i2c-tools | ||
+ | </ | ||
+ | Check bus 1 with 2 x __**[[: | ||
+ | < | ||
+ | pi@raspberrypi ~ $ sudo i2cdetect -y 1 | ||
+ | | ||
+ | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 20: 20 21 22 23 -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 70: -- -- -- -- -- -- -- -- | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | =====FAQ===== | ||
+ | - Can both the Rocrail server and the RocNetNode be installed on the same Raspberry Pi? | ||
+ | * Yes. | ||
+ | - I2C stopped working after an Raspbian update | ||
+ | * http:// | ||
+ | \\ | ||
+ | |||
+ | =====Links===== | ||
+ | * http:// | ||
+ | * [[http:// | ||
+ | * http:// | ||
+ | * https:// | ||
+ | \\ | ||
+ | =====Technical Details===== | ||
+ | The components used for basic I/O are the MCP23017 and the Adafruit 16 channel LED/Servo board. The Adafruit board is based on the PCA9685. Datasheets are readily available for both. There are many different I2C chips available but most are available only in surface mount. | ||
+ | |||
+ | * The Adafruit board is available at http:// | ||
+ | \\ | ||
+ | | ||
+ | |||
+ | |||
+ | |||
+ | =====Security===== | ||
+ | |||
+ | Security of the Rpi (Raspberry Pi) is a topic that is not well covered. | ||
+ | |||
+ | - Change the default password for ' | ||
+ | - Turn off unneeded services such as cups (print), etc. | ||
+ | |||
+ | There are other preventative measures that could or should | ||
+ | |||
+ | \\ |
rocnet/rocnetnode-img-en.txt · Last modified: 2022/10/29 07:11 by 127.0.0.1