flobernd / raspi-fanshim

Lightweight library to control the pimoroni Fan SHIM device on a Raspberry Pi
MIT License
13 stars 2 forks source link

Fanshim and Raspbee #1

Closed Sajivve closed 2 years ago

Sajivve commented 5 years ago

Hi Florian

Greetings from Switzerland.

I am a bit new to all this so excuse me for any mistakes.

I am running a Raspi 4 with full buster and a Raspbee Module from Dresden Electronics.

Everything worked well till now.

Yesterday I bought a Fanshim and installed it and now started the problems.

As soon as I start the default Fanshim service the dconz software cannot connect to the raspberry so, for now, i have had to remove the fanshim.

Could you guide me to the problem?

Also, i wanted to install your fanshim service, but am confused on how to compile and install it as have never worked on c before.

Could you guide me as a newbie on how to install it as a newbie and so that it does not conflict with raspbee?

I await your update.

flobernd commented 5 years ago

Hi there,

to compile the project in this repo you first have to install the required build tools:

sudo apt install git
sudo apt install g++
sudo apt install cmake

After that you can continue with the dependency libraries:

sudo apt install wiringpi

And finally clone the repository and build the project:

git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'
cd raspi-fanshim
mkdir build && cd build
cmake ..
make

You will find the FanshimService binary in one of the sub-directories. As there is no installation script, you might need to manually add an autostart option for the service.


The Raspbee sadly does not seem to work very well in co-existence with the Fanshim. The reason for this is that both devices are using the same PINs:

However if you don't need to control the Fanshim LED (PINs 14 and 15) or react to its button (PIN 17), you could get them working together, if you e.g. use my service and comment out all the LED functionality (I could push an updated version with conditional compilation if you wish so - will probably take until Wednesday tho). The original service supports --no-led and --no-button switches as well, if I remember correctly.

Another problem is PIN 18 which is used to control the fan. Good thing tho: The Raspbee does not use this PIN any longer with the new firmware versions. There was an issue in the deCONZ issue tracker where another user (ebaauw) suggested to just use a booster header and remove this specific pin (or cut off the upper end) so that it won't reach the Raspbee but still connects to the Fanshim: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1643#issuecomment-518778347


One personal note:

I switched from the Raspbee to the ConBee II in the meantime. However there are a lot problems with this device and the Raspberry Pi 4 as well (me and most of the other users are still unable to use any kind of USB device at the same time - at least without using workarounds like USB extension cables).

After some weeks my Fanshim died (probably got contact to a wrong PIN while tinkering around) and I'm now using the RPI CASE ALU07F case:

Always wanted to connect the 2nd Fanshim board to the fans of my new case in order to control them, but did not have time yet.

Sajivve commented 5 years ago

Sehr geehrter Florian

Thanks for your quick and elaborate reply and i really appreciate the same.

Following your instructions I have been able to come till here:

git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git' cd raspi-fanshim mkdir build && cd build cmake .. make I have attached the screen logs for you to view and guide.

Could you guide me on how to start this service on a rpi 4 and also make it persistant upon reboot.

At the moment tI have installed the fan without the Raspbee and without a service and it is always on.

Unfortunately i dont know why but while strying to fit it with the fanshim my raspbee died and i am without a raspbee at the moment. :-)

I will go with your suggestions of the case you suggested and order it tomorrow.

Also as the raspbee is dead though only bought one month ago i dont know if it will be covered under warranty, anyway i have to buy a new one now.

Do you suggest I also buy A Conbee II Usb instead?

Well the usb pi issue drove me mad for 2 weeks with a aeotec zwave stick untill i put a USB 2.0 Cable Hub in between but now it works fine with the cable hub.

I await your update.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 29 Sep 2019, 12:10 +0200, Florian Bernd notifications@github.com, wrote:

Hi there, to compile the project in this repo you first have to install the required build tools: sudo apt install git sudo apt install g++ sudo apt install cmake After that you can continue with the dependency libraries: sudo apt install wiringpi And finally clone the repository and build the project: git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git' cd raspi-fanshim mkdir build && cd build cmake .. make You will find the FanshimService binary in one of the sub-directories. As there is no installation script, you might need to manually add an autostart option for the service. The Raspbee sadly does not seem to work very well in co-existence with the Fanshim. The reason for this is that both devices are using the same PINs:

https://pinout.xyz/pinout/raspbee# • https://pinout.xyz/pinout/fan_shim#

However if you don't need to control the Fanshim LED (PINs 14 and 15) or react to its button (PIN 17), you could get them working together, if you e.g. use my service and comment out all the LED functionality (I could push an updated version with conditional compilation if you wish so - will probably take until Wednesday tho). Another problem is PIN 18 which is used to control the fan. Good thing tho: The Raspbee does not use this PIN any longer with the new firmware versions. There was an issue in the deCONZ issue tracker where another user (ebaauw) suggested to just use a booster header and remove this specific pin (or cut off the upper end) so that it won't reach the Raspbee but still connects to the Fanshim: dresden-elektronik/deconz-rest-plugin#1643 (comment) One personal note: I switched from the Raspbee to the ConBee II in the meantime. However there are a lot problems with this device and the Raspberry Pi 4 as well (me and most of the other users are still unable to use any kind of USB device at the same time - at least without using workarounds like USB extension cables). After some weeks my Fanshim died (probably got contact to a wrong PIN while tinkering around) and I'm now using the RPI CASE ALU07F case: Always wanted to connect the 2nd Fanshim board to the fans of my new case in order to control them, but did not have time yet. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

Do you suggest I also buy A Conbee II Usb instead?

Yeah I would probably buy this device instead of another Raspbee. Especially if you already using an USB hub or extension cable.

Could you guide me on how to start this service on a rpi 4 and also make it persistant upon reboot.

Please take a look at this guide for the available persistent autostart options on the Raspberry Pi: https://jankarres.de/2014/07/raspberry-pi-autostart-von-programmen-einrichten/

Sajivve commented 5 years ago

Sehr geehrter Florian

Thanks for your quick response.

As suggested I have already ordered the Conbee 11 and I should get it tomorrow evening.

Thanks for the autostart pointer i will go through it.

In the meantime can you give me the command to start the service manually and where and by what name the compiled service file would be which needs to be started?

I will be highly obliged for your advise.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 29 Sep 2019, 17:20 +0200, Florian Bernd notifications@github.com, wrote:

Do you suggest I also buy A Conbee II Usb instead? Yeah I would probably buy this device instead of another Raspbee. Especially if you already using an USB hub or extension cable. Could you guide me on how to start this service on a rpi 4 and also make it persistant upon reboot. Please take a look at this guide for the available persistent autostart options on the Raspberry Pi: https://jankarres.de/2014/07/raspberry-pi-autostart-von-programmen-einrichten/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

In the meantime can you give me the command to start the service manually and where and by what name the compiled service file would be which needs to be started?

It should be right in the raspi-fanshim/build directory and can be started by typing ./FanshimService.

Sajivve commented 5 years ago

Sehr geehrter Florian

On executing the suggested command, I am getting the following error:

pi@ST-Raspberry:~ $ ls  deconz-latest.deb  Desktop  Documents  Downloads  fanshim-python  gnome-schedule-2.3.0  gnome-schedule-2.3.0.tar.gz  MagPi  Music  org.openhab.binding.zwave-2.5.0-SNAPSHOT-sources.jar  Pictures  Public  raspi-fanshim 's operation has occurred'  Templates  Videos pi@ST-Raspberry:~ $ cd raspi-fanshim pi@ST-Raspberry:~/raspi-fanshim $ ls build dependencies include README.md CMakeLists.txt examples LICENSE src pi@ST-Raspberry:~/raspi-fanshim $ cd build pi@ST-Raspberry:~/raspi-fanshim/build $ ./FanshimService -bash: ./FanshimService: No such file or directory pi@ST-Raspberry:~/raspi-fanshim/build $

Please advise.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 30 Sep 2019, 07:37 +0200, Florian Bernd notifications@github.com, wrote:

In the meantime can you give me the command to start the service manually and where and by what name the compiled service file would be which needs to be started? It should be right in the raspi-fanshim/build directory and can be started by typing ./FanshimService. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

Did the cmake and make command succeed in the first place?

Sajivve commented 5 years ago

Sehr geehrter Florian

Thanks for your email.

I tried all the steps again and am receiving the following errors:

Linux ST-Raspberry 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Oct 1 09:17:18 2019

pi@ST-Raspberry:~ $ sudo apt install git Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.20.1-2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pi@ST-Raspberry:~ $ sudo apt install g++ Reading package lists... Done Building dependency tree Reading state information... Done g++ is already the newest version (4:8.3.0-1+rpi2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pi@ST-Raspberry:~ $ sudo apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done cmake is already the newest version (3.13.4-1). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pi@ST-Raspberry:~ $ sudo apt install wiringpi Reading package lists... Done Building dependency tree Reading state information... Done wiringpi is already the newest version (2.52). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pi@ST-Raspberry:~ $ git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'; fatal: destination path 'raspi-fanshim' already exists and is not an empty directory. pi@ST-Raspberry:~ $ cd raspi-fanshim pi@ST-Raspberry:~/raspi-fanshim $ mkdir build && cd build mkdir: cannot create directory ‘build’: File exists pi@ST-Raspberry:~/raspi-fanshim $ cmake .. CMake Error: The source directory "/home/pi" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. pi@ST-Raspberry:~/raspi-fanshim $ make make: *** No targets specified and no makefile found. Stop. pi@ST-Raspberry:~/raspi-fanshim $

Please advise.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 1 Oct 2019, 09:46 +0200, Florian Bernd notifications@github.com, wrote:

Did the cmake and make command succeed in the first place? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

You have to run the cmake command from inside the build directory.

mkdir build && cd build
mkdir: cannot create directory ‘build’: File exists

The build directory already exists thats why the cd command did not get executed.

Sajivve commented 5 years ago

Sehr geehrter Florian

Good Morning.

My quest to do C Compiling continues.. :-)

Could you please check the below file and advise me where I am going wrong now?

Also what is the difference between your and Pimroni service?

I await your advise.

pi@ST-Raspberry:/raspi-fanshim/fanshim-python/examples $ cd /

pi@ST-Raspberry:/ $ sudo apt install git Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.20.1-2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

pi@ST-Raspberry:/ $ sudo apt install g++ Reading package lists... Done Building dependency tree Reading state information... Done g++ is already the newest version (4:8.3.0-1+rpi2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

pi@ST-Raspberry:/ $ sudo apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done cmake is already the newest version (3.13.4-1). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

pi@ST-Raspberry:/ $ sudo apt install wiringpi Reading package lists... Done Building dependency tree Reading state information... Done wiringpi is already the newest version (2.52). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

pi@ST-Raspberry:/ $ git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'; fatal: destination path 'raspi-fanshim' already exists and is not an empty directory.

pi@ST-Raspberry:/ $ cd raspi-fanshim

pi@ST-Raspberry:/raspi-fanshim $ cd build -bash: cd: build: No such file or directory

pi@ST-Raspberry:/raspi-fanshim $ ls CMakeLists.txt examples include README.md dependencies fanshim-python LICENSE src

pi@ST-Raspberry:/raspi-fanshim $ mkdir build && cd build mkdir: cannot create directory ‘build’: Permission denied

pi@ST-Raspberry:/raspi-fanshim $ sudo mkdir build && cd build

pi@ST-Raspberry:/raspi-fanshim/build $ cmake .. CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:174 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeOutput.log Call Stack (most recent call first): CMakeLists.txt:5 (project)

CMake Error: Could not open file for write in copy operation /raspi-fanshim/build/CMakeFiles/3.13.4/CMakeSystem.cmake.tmp CMake Error: : System Error: No such file or directory CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:186 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdC Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:737 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:51 (CMAKE_DETERMINE_COMPILER_ID_VENDOR) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:737 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:51 (CMAKE_DETERMINE_COMPILER_ID_VENDOR) /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

-- The C compiler identification is unknown CMake Error: Could not open file for write in copy operation /raspi-fanshim/build/CMakeFiles/3.13.4/CMakeCCompiler.cmake.tmp CMake Error: : System Error: No such file or directory CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:192 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:5 (project)

CMake Error: Could not find cmake module file: /raspi-fanshim/build/CMakeFiles/3.13.4/CMakeCCompiler.cmake CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:161 (file): file problem creating directory: /raspi-fanshim/build/CMakeFiles/3.13.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:737 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:51 (CMAKE_DETERMINE_COMPILER_ID_VENDOR) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:737 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:51 (CMAKE_DETERMINE_COMPILER_ID_VENDOR) /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)

-- The CXX compiler identification is unknown CMake Error: Could not open file for write in copy operation /raspi-fanshim/build/CMakeFiles/3.13.4/CMakeCXXCompiler.cmake.tmp CMake Error: : System Error: No such file or directory CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCXXCompiler.cmake:190 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:5 (project)

CMake Error: Could not find cmake module file: /raspi-fanshim/build/CMakeFiles/3.13.4/CMakeCXXCompiler.cmake -- Check for working C compiler: /usr/bin/cc CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:25 (file): file failed to open for writing (No such file or directory):

/raspi-fanshim/build/CMakeFiles/CMakeTmp/testCCompiler.c Call Stack (most recent call first): CMakeLists.txt:5 (project)

CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:37 (try_compile): Unknown extension ".c" for file

/raspi-fanshim/build/CMakeFiles/CMakeTmp/testCCompiler.c

try_compile() works only for enabled languages. Currently these are: C CXX See project() command to enable other languages. Call Stack (most recent call first): CMakeLists.txt:5 (project) -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:48 (file): file failed to open for writing (No such file or directory): /raspi-fanshim/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): CMakeLists.txt:5 (project) CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:5 (project) -- Configuring incomplete, errors occurred! CMake Error: Cannot open file for write: /raspi-fanshim/build/CMakeCache.txt.tmp CMake Error: : System Error: Permission denied CMake Error: Unable to open cache file for save. /raspi-fanshim/build/CMakeCache.txt CMake Error: : System Error: Permission denied

pi@ST-Raspberry:/raspi-fanshim/build $ sudo cmake .. -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Configuring done -- Generating done -- Build files have been written to: /raspi-fanshim/build

pi@ST-Raspberry:/raspi-fanshim/build $ make Scanning dependencies of target RaspiAPA102 CMake Error: Cannot open file for write: /raspi-fanshim/build/dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/depend.make.tmp CMake Error: : System Error: Permission denied make[2]: [dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/build.make:112: dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/depend] Error 2 make[1]: [CMakeFiles/Makefile2:127: dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 pi@ST-Raspberry:/raspi-fanshim/build $ sudo make Scanning dependencies of target RaspiAPA102 [ 20%] Building C object dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/src/APA102.c.o [ 40%] Building C object dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/src/ColorConversion.c.o [ 60%] Linking C static library libRaspiAPA102.a [ 60%] Built target RaspiAPA102 Scanning dependencies of target RaspiFanshim [ 80%] Building C object CMakeFiles/RaspiFanshim.dir/src/Fanshim.c.o [100%] Linking C static library libRaspiFanshim.a [100%] Built target RaspiFanshim

pi@ST-Raspberry:/raspi-fanshim/build $ ls CMakeCache.txt dependencies RaspiFanshimExportConfig.h CMakeFiles libRaspiFanshim.a cmake_install.cmake Makefile

pi@ST-Raspberry:/raspi-fanshim/build $ sudo systemctl stop pimoroni-fanshim.service pi@ST-Raspberry:/raspi-fanshim/build $ sudo systemctl disable pimoroni-fanshim.service Removed /etc/systemd/system/multi-user.target.wants/pimoroni-fanshim.service.

pi@ST-Raspberry:/raspi-fanshim/build $ ./FanshimService -bash: ./FanshimService: No such file or directory pi@ST-Raspberry:/raspi-fanshim/build $ ./RaspiFanshim -bash: ./RaspiFanshim: No such file or directory pi@ST-Raspberry:/raspi-fanshim/build $

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 1 Oct 2019, 14:14 +0200, Florian Bernd notifications@github.com, wrote:

You have to run the cmake command from inside the build directory. mkdir build && cd build

mkdir: cannot create directory ‘build’: File exists The build directory already exists thats why the cd command did not get executed. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

You messed up the permissions by using sudo. I suggest to remove the complete raspi-fanshim directory (sudo rm -rf raspi-fanshim) and start from scratch by executing the commands from my first answer again.

Also what is the difference between your and Pimroni service?

My service is written in C instead of Phython. It uses less CPU resources and provides more configuration options (in the source file). Otherweise they should do the same thing.

Sajivve commented 5 years ago

Sehr geehrter Florian

Thanks for your email.

I deleted the directory as advise and re did everything again.

Though it says built target but i cant execute it.

Below is the log from start to end.

Can you please advise me the problem.

Linux ST-Raspberry 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Oct 4 22:14:04 2019 from 192.168.188.10 pi@ST-Raspberry:~ $ sudo systemctl disable pimoroni-fanshim.service Removed /etc/systemd/system/multi-user.target.wants/pimoroni-fanshim.service. pi@ST-Raspberry:~ $ sudo rm -rf raspi-fanshim pi@ST-Raspberry:~ $ sudo apt install git Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.20.1-2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. pi@ST-Raspberry:~ $ sudo apt install g++ Reading package lists... Done Building dependency tree Reading state information... Done g++ is already the newest version (4:8.3.0-1+rpi2). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. pi@ST-Raspberry:~ $ sudo apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done cmake is already the newest version (3.13.4-1). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. pi@ST-Raspberry:~ $ sudo apt install wiringpi Reading package lists... Done Building dependency tree Reading state information... Done wiringpi is already the newest version (2.52). The following packages were automatically installed and are no longer required: libdrm-etnaviv1 libllvm6.0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. pi@ST-Raspberry:~ $ git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'; Cloning into 'raspi-fanshim'... remote: Enumerating objects: 33, done. remote: Counting objects: 100% (33/33), done. remote: Compressing objects: 100% (14/14), done. remote: Total 33 (delta 9), reused 33 (delta 9), pack-reused 0 Unpacking objects: 100% (33/33), done. Submodule 'dependencies/raspi-apa102' (https://github.com/flobernd/raspi-apa102.git) registered for path 'dependencies/raspi-apa102' Cloning into '/home/pi/raspi-fanshim/dependencies/raspi-apa102'... remote: Enumerating objects: 43, done. remote: Counting objects: 100% (43/43), done. remote: Compressing objects: 100% (20/20), done. remote: Total 43 (delta 17), reused 37 (delta 13), pack-reused 0 Submodule path 'dependencies/raspi-apa102': checked out '67946aab668c03a9eee917d66ee98287d12bff6f' pi@ST-Raspberry:~ $ cd raspi-fanshim pi@ST-Raspberry:~/raspi-fanshim $ mkdir build && cd build pi@ST-Raspberry:~/raspi-fanshim/build $ cmake .. -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Configuring done -- Generating done -- Build files have been written to: /home/pi/raspi-fanshim/build pi@ST-Raspberry:~/raspi-fanshim/build $ make Scanning dependencies of target RaspiAPA102 [ 20%] Building C object dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/src/APA102.c.o [ 40%] Building C object dependencies/raspi-apa102/CMakeFiles/RaspiAPA102.dir/src/ColorConversion.c.o [ 60%] Linking C static library libRaspiAPA102.a [ 60%] Built target RaspiAPA102 Scanning dependencies of target RaspiFanshim [ 80%] Building C object CMakeFiles/RaspiFanshim.dir/src/Fanshim.c.o [100%] Linking C static library libRaspiFanshim.a [100%] Built target RaspiFanshim pi@ST-Raspberry:~/raspi-fanshim/build $ ls CMakeCache.txt dependencies RaspiFanshimExportConfig.h CMakeFiles libRaspiFanshim.a cmake_install.cmake Makefile pi@ST-Raspberry:~/raspi-fanshim/build $ ./FanshimService -bash: ./FanshimService: No such file or directory pi@ST-Raspberry:~/raspi-fanshim/build $ ls CMakeCache.txt dependencies RaspiFanshimExportConfig.h CMakeFiles libRaspiFanshim.a cmake_install.cmake Makefile pi@ST-Raspberry:~/raspi-fanshim/build $ ./FanshimService

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 2 Oct 2019, 15:14 +0200, Florian Bernd notifications@github.com, wrote:

You messed up the permissions by using sudo. I suggest to remove the complete raspi-fanshim directory (sudo rm -rf raspi-fanshim) and start from scratch by executing the commands from my first answer again.

Also what is the difference between your and Pimroni service? My service is written in C instead of Phython. It uses less CPU resources and provides more configuration options (in the source file). Otherweise they should do the same thing. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

Ah well yeah, the BUILD_EXAMPLES option is not checked by default. Try to install:

sudo apt install cmake-curses-gui

and after that just cd into the build directory and run

ccmake ..

Choose configure, tick the RASPI_FANSHIM_BUILD_EXAMPLES option and execute the generate. After that run make again.

Sajivve commented 5 years ago

Sehr geehrter Florian

Thanks for your email and did as you suggested.

Attached is a screenshot of the configuration and the errors which are coming.

Please advise.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 5 Oct 2019, 14:31 +0200, Florian Bernd notifications@github.com, wrote:

Ah well yeah, the BUILD_EXAMPLES option is not checked by default. Try to install: sudo apt install cmake-curses-gui and after that just cd into the build directory and run ccmake .. Choose configure, tick the RASPI_FANSHIM_BUILD_EXAMPLES option and execute the generate. After that run make again. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

flobernd commented 5 years ago

Hi there, GitHub does not support posting attachments by using the email reply option 😛

Sajivve commented 5 years ago

Sehr geehrter Florian

Is it not possible that you can compile the file and send me the compiled version on my email:

sajivve.trehaan@gmail.com

Please advise.

Vielen Dank für Ihre Kenntnisnahme Freundliche Grüsse

TREHAN Sajive


Schaffhauserstrasse 60 CH 8302 Kloten Schweiz

Fone : + 41 44 516 74 74 Natel : + 41 76 674 60 09 Email : sajivve.trehaan@gmail.com


Haftungsausschluss: Diese Nachricht ist nur für den Empfänger gedacht. Sollte es von Unbefugten entgegengenommen werden, bitte ich Sie, mich so bald wie möglich persönlich zu benachrichtigen und dann die Kommunikation mit allen Anhängen sowie Kopien zu vernichten oder zu löschen. Die Verwendung der Informationen ist untersagt. On 7 Oct 2019, 09:52 +0200, Florian Bernd notifications@github.com, wrote:

Hi there, GitHub does not support posting attachments by using the email reply option 😛 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

prawnz commented 4 years ago

I can give some insights.. When you run ccmake , make sure your settings are as followed

CMAKE_INSTALL_PREFIX /usr/local RASPI_APA102_BUILD_EXAMPLES OFF RASPI_APA102_BUILD_SHARED_LIB OFF RASPI_FANSHIM_BUILD_EXAMPLES ON RASPI_FANSHIM_BUILD_SHARED_LIB OFF wiringPi_LIB /usr/lib/libwiringPi.so

Then press C , then G then run make