Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
raspberry-enocean [2015/03/26 16:40] Stéphane Lavirotte [Install the Fhem.de building automation server for testing purposes] |
raspberry-enocean [2015/03/27 13:27] Stéphane Lavirotte [Compile EnOcean Link Library] |
||
---|---|---|---|
Line 8: | Line 8: | ||
First of all you have to connect the EnOcean Pi to the Raspberry. Do this before powering up the Raspberry Pi. | First of all you have to connect the EnOcean Pi to the Raspberry. Do this before powering up the Raspberry Pi. | ||
- | The serial port of the GPIO must be disable (it's normally used for console debugging in standard configuration). Tio achieve this, you have to do the following commands: | + | The serial port of the GPIO must be disable (it's normally used for console debugging in standard configuration). To achieve this, you have to do the following commands: |
<code> | <code> | ||
Line 23: | Line 23: | ||
===== Install the Fhem.de building automation server for testing purposes ===== | ===== Install the Fhem.de building automation server for testing purposes ===== | ||
- | Fhem is a building automation server . We will use it to verify that everything is weel configured. | + | Fhem is a building automation server . We will use it to verify that everything is well configured. |
==== Install Fhem for testing purposes ==== | ==== Install Fhem for testing purposes ==== | ||
Line 55: | Line 55: | ||
Then take all your EnOcean devices and click on them: click on switches to send an event and click on the learn button to send a datagram to discover the equipment. Then you can go the ''EnOcean'' and you can find all the equipment recognized by Fhem. | Then take all your EnOcean devices and click on them: click on switches to send an event and click on the learn button to send a datagram to discover the equipment. Then you can go the ''EnOcean'' and you can find all the equipment recognized by Fhem. | ||
+ | |||
+ | So now you know that everything is functional without programming anything | ||
+ | |||
+ | ===== Compile EnOcean Link Library ===== | ||
+ | |||
+ | To be able to develop your own program with EnOcean protocol, you will have to get and compile the library. | ||
+ | |||
+ | - Download [[https://www.enocean.com/it/enocean-software/enocean-link/|EnOcean Link]]. | ||
+ | - Instruction to [[https://www.enocean.com/fileadmin/redaktion/support/enocean-link/compile.html#raspberry|compile the library for Raspberry Pi]]. | ||
+ | * Modify ''Sandbox.cpp'' to specify ''#define SER_PORT "/dev/ttyAMA0"'' instead of /dev/ttyUSB0 if you use EnOcean Pi (/dev/ttyUSB0 is used for EnOcean USB300 key) | ||
+ | * To compile the library on the Raspberry Pi (not using cross-compilation) | ||
+ | <code> | ||
+ | sudo apt-get install autoconf automake autotools-dev m4 libtool | ||
+ | cd EOLink | ||
+ | chmod +x configure | ||
+ | ./configure CPPFLAGS="-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s" | ||
+ | make | ||
+ | </code> | ||
+ | * Libraries are compiled in the ''.libs/'' directory. | ||
+ | |||
+ | To test the library you have multiple programs in ''Tutorial'' directory. With the current version tested, there is a problem with missing and depcomp files, so I replaced them. | ||
+ | <code> | ||
+ | cd ../Tutorial | ||
+ | chmod +x Tutorial.sh | ||
+ | mv depcomp depcom.sav | ||
+ | mv missing missing.sav | ||
+ | ln -s ../EOLink/depcomp . | ||
+ | ln -s ../EOLink/missing . | ||
+ | ./Tutorial.sh | ||
+ | cd Tutorials | ||
+ | ./HelloWorld | ||
+ | </code> | ||
+ |