User Tools

Site Tools


open_source:ccgx:installing_ccgx_func_on_raspberry_pi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
open_source:ccgx:installing_ccgx_func_on_raspberry_pi [2015-02-27 22:43] – [Installing CCGX functionality on a raspberry pi] mvaderopen_source:ccgx:installing_ccgx_func_on_raspberry_pi [2019-06-22 15:47] (current) mvader
Line 1: Line 1:
 ====== Installing CCGX functionality on a raspberry pi ====== ====== Installing CCGX functionality on a raspberry pi ======
  
-(in progress, everybody reading this page, feel free too add and improve)+The contents of this page were moved to the Venus OS wiki:
  
-The goal of this page is to run as much as possible of the CCGX functionality on a raspberry pi. Just for fun. Below steps have been done on a raspberry pi 2. Much of the source code is not yet available publicly. So to start, I am putting instructions down for all the projects that are available. And for projects that contain private Victron source code I'll.+https://github.com/victronenergy/venus/wiki
  
-===Cross compile vs compiling locally=== 
-There are many differeny ways to make the ccgx functionality run on a rpi. For example do something with Poky/Yocto/Open embedded, our build system. But to keep it simple and also more fun, I will compile all of it compile locally on the rpi. 
  
-===== Steps ===== 
- 
-==== 1. Install daemontools ==== 
-[[http://cr.yp.to/daemontools.html|Daemontools]] is a set of tools to run services: it runs an executable, and when it fails it will start it again. To see some commonly used commands, like starting and stopping a service, or seeing status of all services, check the [[open_source:ccgx:commandline|CCGX command-line introduction]]. 
- 
-To install daemontools follows [[http://cr.yp.to/daemontools/install.html|the instructions on its install page]], with one addition: right before running /package install, there is one change that is necessary to make it compile: 
- 
-open conf-cc in ./src, and add the following parameter to the gcc call: 
-<code> 
--include /usr/include/errno.h      
-</code> 
- 
-Daemontools will now be running, to make sure check the processlist: 
-<code> 
-pi@raspberrypi ~ $ ps ax | grep svscan 
- 2171 ?        Ss     0:00 /bin/sh /command/svscanboot 
- 2173 ?        S      0:00 svscan /service 
- 2260 pts/0    S+     0:00 grep --color=auto svscan 
-</code> 
- 
-But is not doing anything yet, as there are no services setup in /service yet. 
- 
-==== 2. Install the dbus-cli ==== 
-[[https://code.google.com/p/dbus-tools/wiki/DBusCli|dbus-cli]] is a command line interface to dbus. Very useful to play with and debug all the different CCGX services. To find what D-Bus is, read the [[open_source:ccgx:start|CCGX introduction]] and look on Google. See [[open_source:ccgx:commandline|CCGX commandline intro]] for basic usage. 
- 
-First, get the code from above, and put it somewhere in the path. 
- 
-Then, get some dependencies, first install pip, the python installer: 
-  sudo apt-get install python-pip 
-   
-Then install lxml, which is needed by dbus-cli: 
-  sudo apt-get install libxml2-dev libxslt1-dev python-dev 
-  sudo pip install lxml 
-   
-Done! If all works, you'll be able to run dbus -y from the commandline: 
-  pi@raspberrypi ~ $ dbus -y 
-  org.freedesktop.DBus 
- 
-==== 3. Install dbus-modbustcp ==== 
-[[https://github.com/victronenergy/dbus_modbustcp|dbus-modbustcp]] is a modbustcp server, that allows for example PLCs to get data (battery voltage, etc.) from the D-Bus. 
- 
-First get the sources: 
-  cd 
-  mkdir dev 
-  cd dev 
-  git clone git@github.com:victronenergy/dbus_modbustcp.git 
-     
-Install the qt libraries: 
-  sudo apt-get install libqt4-dev 
-   
-Run qmake to create the makefile (set MACHINE to ccgx to make dbus_modbustcp use the system D-Bus): 
-  export MACHINE=ccgx && qmake 
-   
-Run make to compile the sources: 
-  make 
-   
-Done! Run the binary to see that you were successful: 
-  ~/dev/dbus_modbustcp $ ./dbus_modbustcp 
-  INFO 2015-02-27T21:04:03.752 dbus_modbustcp v0.6.3 started (v0.6.3) 
-  INFO 2015-02-27T21:04:03.752 Built with Qt 4.8.2 running on 4.8.2 
-  INFO 2015-02-27T21:04:03.753 Built on Feb 27 2015 at 21:03:50 
-  ERROR 2015-02-27T21:04:03.784 "[Server] QTcpServer error: The address is protected" 
-  INFO 2015-02-27T21:04:03.787 [Mappings] Add ("com.victronenergy.vebus", "/Ac/ActiveIn/L1/V", "d", "V AC", "3", "uint16", "10", "R") 
-  INFO 2015-02-27T21:04:03.788 [Mappings] Add ("com.victronenergy.vebus", "/Ac/ActiveIn/L2/V", "d", "V AC", "4", "uint16", "10", "R") 
-   
-Note that I have not yet looked into that error! 
- 
-==== 4. Install dbus_qwacs ==== 
-[[https://github.com/victronenergy/dbus_qwacs|dbus_qwacs]] reads data from the [[http://www.victronenergy.com/accessories/wireless-AC-sensor|Wireless AC Sensors]] and makes it available on D-Bus, for all the other processes. 
- 
-To compile, follow the same steps as dbus_modbustcp. 
- 
-When done, output will look like this: 
-  ~/dev/dbus_qwacs $ ./dbus_qwacs 
-  INFO 2015-02-27T21:19:24.723 dbus_qwacs v1.0.1 started (v1.0.1) 
-  INFO 2015-02-27T21:19:24.724 Built with Qt 4.8.2 running on 4.8.2 
-  INFO 2015-02-27T21:19:24.724 Built on Feb 27 2015 at 21:15:59 
-  INFO 2015-02-27T21:19:24.728 Wait for local setting on DBus... 
-  INFO 2015-02-27T21:19:26.733 Wait... 
-  INFO 2015-02-27T21:19:28.735 Wait... 
- 
-And that goes on forever, since the local settings process is not yet installed, lets do that first! 
- 
-==== 5. Local settings ==== 
-[[https://github.com/victronenergy/localsettings|localsettings]] is a D-Bus settings manager that interfaces between xml file on disk(/data/conf/settings.xml) and D-Bus. 
- 
-Steps to install (probably not as it should be done with regards to rights etc, welcome to correct this! Also it is perhaps better to make a install script for localsettings. Instead of just cloning the whole thing and adding some files, same thing: if you can improve, please do): 
-  cd /opt 
-  sudo mkdir color-control 
-  cd ./color-control 
-  chmod a+w . 
-  git clone --recursive git@github.com:victronenergy/localsettings.git 
-  cd localsettings 
-   
-All done (except for setting this up with daemontools). Run it to see what happens: 
-  ./localsettings 
-===== DISQUS ===== 
-~~DISQUS~~ 
open_source/ccgx/installing_ccgx_func_on_raspberry_pi.1425073405.txt.gz · Last modified: by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki