[Solved] Building RPi Gateway - No Support for nRF24 radio on this platform



  • Hello All! I am very excited about getting into MySensors but have gotten stuck just trying to get the gateway going. I would really appreciate some help! Thanks in advance.

    Here's my problem, I have been following the steps on the website to build a raspberry pi gateway but when I go to configure Transport and build the gateway I get an error stating "SPI.h: No such file or directory". I will layout more details below.

    My Setup:

    • Raspberry Pi 2
    • The RPi is running Home Assistant v45.1. I installed Home Assistant using the Raspberry Pi All-In-One Installer
    • 315 mhz receiver and transmitter hooked up to the GPIO pins (I have since taken them off in the course of debugging)
    • NRF24 Radio connected to the GPIO pins

    Steps taken to build the RPi Gateway:

    1. Downloaded the Master branch of the MySensors repository
    2. Ran ./configure --my-transport=nrf24 to configure the transports to the nrf24 radio. This gave me the following output:
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=unknown, Type=unknown, CPU=armv7l.
    [SECTION] Checking GPIO Sysfs.
      [OK] /sys/class/gpio/export found
    [SECTION] Detecting SPI driver.
      [WARNING] No supported SPI driver detected.
    [SECTION] Detecting init system.
      [OK] init system detected: systemd.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    
    1. Ran ./configure --my-gateway=ethernet --my-controller-ip-address=YOUR-CONTROLLER-IP and using my RPi IP address and got the exact same output as above.
    2. At this point i knew something was wrong, but I figured I would tried to build the gateway by running make and got the following error:
    In file included from examples_linux/mysgw.cpp:74:0:
    ./MySensors.h:254:2: error: #error No support for nRF24 radio on this platform
     #error No support for nRF24 radio on this platform
      ^
    In file included from ./drivers/RF24/RF24.cpp:23:0,
                     from ./MySensors.h:290,
                     from examples_linux/mysgw.cpp:74:
    ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
     #include <SPI.h>
                     ^
    compilation terminated.
    Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
    make: *** [build/examples_linux/mysgw.o] Error 1
    

    Steps taken to Troubleshoot:

    1. Lots of reading of the Home Assistant and MySensors forums. I have seen a few posts that seem similar to my issue, but I have not been able get the solution yet.
    2. Removed and re-downloaded MySensors master repository.
    3. Checked configuration options - SPI driver options looked promising, but I am not sure what they do or how I could change them.
    4. Checked and rechecked that the nrf24 radio is connected properly.
    5. Included and removed a capacitor between vcc and ground of the radio.
    6. Tried with 5 different nrf24 radios.
    7. Disconnected the 315mhz receiver and transmitter.
    8. Checked the serial group name of the serial device of the GPIO's.
    9. Searched through directories and files to see if I could find the file or directory and see if there was a slight name change causing it not to be found (Had this issue when setting up Open zwave).
    10. I probably tried a few more things I am not remembering now.
    11. Reached out to the MySensors Community via the forum!

  • Mod

    Radio connection is not the problem because you can compile it without any radio attached. In raspi-config did you enable the spi? You could also try downloading the development branch that has some improvements.



  • on second configure run you forget to add --my-transport=nrf24



  • hmm, nrf24 is the default so it is not required to specify it explicitly ... which version of MySensors you use ?



  • paste the full compiulation output



  • @gohan Thanks so much! As soon as I went into raspi-config and enabled spi I was able to run the configurations and build the gateway! Now that its built I'm getting a failure to connect to the nrf24 radio messages when I have debug on so Ill have to start working through that, but this thread can be closed!

    @rozpruwacz I didn't realize that I could combine multiple configuration change with one go, I thought they had to be run separately, but now I see that using the "--" combines multiple configuration changes.

    Thanks for all your help!



  • @rusg323 said in [Solved] Building RPi Gateway - No Support for nRF24 radio on this platform:

    nfiguration chang

    actually this is the only way, every configure launch will overwrite previous settings. Thats how configure wokrs. You can do ./configure --help to see all the options



Suggested Topics

17
Online

11.4k
Users

11.1k
Topics

112.7k
Posts