rocnet:rocnetnode-build-en
Differences
This shows you the differences between two versions of the page.
— | rocnet:rocnetnode-build-en [2021/12/11 09:57] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== RocNetNode Build from source====== | ||
+ | [[: | ||
+ | [[: | ||
+ | [[: | ||
+ | * [[rocnet: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * **[[: | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ===== Build ===== | ||
+ | Read first: __**[[: | ||
+ | :!: Do **not** install libi2c-dev; It will break the build process and the needed C-Headers and libraries are already available in the RaspBian image.\\ | ||
+ | The Rocrail Server build also includes the RocNetNode: | ||
+ | < | ||
+ | make server | ||
+ | sudo make install | ||
+ | </ | ||
+ | The binary is written in // | ||
+ | The rocnetnode.ini can be copied from // | ||
+ | |||
+ | ====Install==== | ||
+ | < | ||
+ | cd rocnetnode | ||
+ | sudo make install | ||
+ | </ | ||
+ | This will copy following files to **/ | ||
+ | * rocnetnode | ||
+ | * rocnetnode.ini | ||
+ | * rocnetnode.sh | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ===== Startup ===== | ||
+ | - The rocnetnode.ini and dcc232 library must reside in the working directory. | ||
+ | - To be able to access the **/ | ||
+ | |||
+ | < | ||
+ | 20130825.214751.623 r9999I main | ||
+ | 20130825.214751.624 r9999E main | ||
+ | </ | ||
+ | |||
+ | Sudo startup in the unxbin directory: | ||
+ | < | ||
+ | sudo ./ | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | ==== rocnetnode.ini ==== | ||
+ | See: __**[[: | ||
+ | <code xml> | ||
+ | < | ||
+ | <rocnet id=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <trace rfile=" | ||
+ | <digint lib=" | ||
+ | </ | ||
+ | </ | ||
+ | === rocnet === | ||
+ | ^ Attribute ^ Description ^ Range ^ Default ^ | ||
+ | | id | RocNet ID | 0-65535 | 0 | | ||
+ | | addr | Multicast address | * | 224.0.0.1 | | ||
+ | | port | Multicast port | 0-65535 | 4321 | | ||
+ | \\ | ||
+ | |||
+ | === rocnetnodeoptions === | ||
+ | ^ Attribute ^ Description ^ Range ^ Default ^ | ||
+ | | iotype | I/O type | 0=i2c-1, 1=i2c-0 | 0 | | ||
+ | | sack | Sensor acknowledge | true/false | false | | ||
+ | | rfid | Activate ID-12 reading | true/false | false | | ||
+ | For Raspberry Pi Rev. 1 use I2C-0 as device.\\ | ||
+ | \\ | ||
+ | |||
+ | === portsetup === | ||
+ | ^ Attribute ^ Description ^ Range ^ Default ^ Remark ^ | ||
+ | | port | logical port number to be used for Rocrail addressing | 1-128 | 1 | | | ||
+ | | type | I/O type | 0=output, 1=input | 0 | | | ||
+ | | delay | Input delayed off for occupancy((Minimal pulse length 100ms.)), or output pulse time. | 0-255 | 0 | 10ms units, 0=not used | | ||
+ | | state | saved output state | 0=off, 1=on | 0 | Saved at a Power Off command. | | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== DCC232 Device ==== | ||
+ | To be able to generate a usable DCC signal the internal RS232 cannot be used.\\ | ||
+ | The best way is to attach a __**[[: | ||
+ | < | ||
+ | Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, | ||
+ | crw-rw---T 1 root dialout 188, 0 Jan 1 1970 / | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Shutdown===== | ||
+ | ====Terminal==== | ||
+ | If the program is running in a console it can be stopped with CTRL+C.\\ | ||
+ | In all other cases **kill** must be used.\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====I2C Preparations===== | ||
+ | |||
+ | ====Enable==== | ||
+ | | 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 | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | =====Links & Documentation===== | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
+ | \\ | ||
+ | =====Raspberry Pi and the Serial Port===== | ||
+ | * http:// | ||
+ | |||
+ | By default the Raspberry Pi’s serial port is configured to be used for console input/ | ||
+ | |||
+ | Needless to say you will need some other way to login to the Raspberry Pi, and we suggest doing this over the network using an SSH connection. | ||
+ | |||
+ | ====Disable Serial Port Login==== | ||
+ | |||
+ | To enable the serial port for your own use you need to disable login on the port. There are two files that need to be edited | ||
+ | |||
+ | The first and main one is **/ | ||
+ | |||
+ | This file has the command to enable the login prompt and this needs to be disabled. Edit the file and move to the end of the file. You will see a line similar to | ||
+ | |||
+ | **T0: | ||
+ | |||
+ | Disable it by adding a # character to the beginning. Save the file. | ||
+ | |||
+ | **# | ||
+ | |||
+ | ====Disable Bootup Info==== | ||
+ | |||
+ | When the Raspberry Pi boots up, all the bootup information is sent to the serial port. Disabling this bootup information is optional and you may want to leave this enabled as it is sometimes useful to see what is happening at bootup. If you have a device connected (i.e. Arduino) at bootup, it will receive this information over the serial port, so it is up to you to decide whether this is a problem or not. | ||
+ | |||
+ | You can disable it by editing the file **/ | ||
+ | |||
+ | The contents of the file look like this | ||
+ | |||
+ | **dwc_otg.lpm_enable=0 console=ttyAMA0, | ||
+ | |||
+ | Remove all references to ttyAMA0 (which is the name of the serial port). The file will now look like this | ||
+ | |||
+ | **dwc_otg.lpm_enable=0 console=tty1 root=/ | ||
+ | |||
+ | ====Reboot==== | ||
+ | |||
+ | In order you enable the changes you have made, you will need to reboot the Raspberry Pi | ||
+ | |||
+ | sudo shutdown -r now | ||
+ | |||
+ | |||
+ | |||
+ | |||