Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Can't build librf24-bcm on Banana Pi

Can't build librf24-bcm on Banana Pi

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 2 Posters 6.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GreenSystemes
    wrote on last edited by
    #1

    Hi !

    I'm here because I have some problems with my Banana Pi.

    I downloaded the Zip file on : https://github.com/mysensors/Raspberry
    Read the README file and do the following step :

    sudo apt-get update
    sudo apt-get upgrade
    
    raspi-config
    

    and then enabled SPI module.
    At the end of the config, an error appeared

    FATAL: Module spi-bcm2708 not found.
    

    I ignored this error and tried to build librf24-bcm.

    cd Raspberry-Master/librf24-bcm
    make all
    

    the result is

    g++ -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv6zk -D BCM2835_PERI_BASE=0x -c RF24.cpp
    gcc -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv6zk -D BCM2835_PERI_BASE=0x -c bcm2835.c
    bcm2835.c: In function ‘bcm2835_init’:
    bcm2835.c:1207:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1208:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1209:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1210:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1211:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1212:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1213:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1214:28: error: invalid suffix "x" on integer constant
    bcm2835.c:1228:83: error: invalid suffix "x" on integer constant
    bcm2835.c:1232:81: error: invalid suffix "x" on integer constant
    bcm2835.c:1236:81: error: invalid suffix "x" on integer constant
    bcm2835.c:1239:83: error: invalid suffix "x" on integer constant
    bcm2835.c:1242:83: error: invalid suffix "x" on integer constant
    bcm2835.c:1246:83: error: invalid suffix "x" on integer constant
    bcm2835.c:1249:83: error: invalid suffix "x" on integer constant
    bcm2835.c:1253:79: error: invalid suffix "x" on integer constant
    Makefile:52: recipe for target 'bcm2835.o' failed
    make: *** [bcm2835.o] Error 1
    

    someone has an idea ?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jan Gatzke
      wrote on last edited by
      #2

      @GreenSystemes said:

      Banana Pi.

      I think the problem is, that the banana pi uses another cpu and needs another spi driver. As the Raspberry master seems to compile against the broadcom driver there will be no easy fix for this.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GreenSystemes
        wrote on last edited by
        #3

        @Jan-Gatzke said:

        I think the problem is, that the banana pi uses another cpu and needs another spi driver. As the Raspberry master seems to compile against the broadcom driver there will be no easy fix for this.

        Agreed ! But if I do :

        sudo raspi-config
        

        It should work ... but here, there is an error :

        FATAL: Module spi-bcm2708 not found.
        

        Now, I merged these files : https://github.com/LeMaker/bcm2835_BP with mysensors Lib and it partially works. I can compile but PiGateway doesn't work ...
        Nobody used a Banana Pi with mySensors before ?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jan Gatzke
          wrote on last edited by
          #4

          Bcm stands for Broadcom. And there is no broadcom chip in the banana pi. You need to enable spi and then customize the source and port it to the banana pi.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GreenSystemes
            wrote on last edited by
            #5

            To enable SPI, I run :

            sudo modprobe spi-sun7i
            
            sudo raspi-config
            

            I got :

            FATAL: Module spi-bcm2708 not found
            

            But when I check in /dev/ SPI seems enabled

            ls /dev/spi*
            /dev/spidev0.0  /dev/spidev0.1
            

            Now, when I execute PiGatewaySerial, I have a "check wires" message. But it can still be the drivers, or maybe I plugged the NRF on the wrong SPI port ?

            1 Reply Last reply
            0
            • J Offline
              J Offline
              Jan Gatzke
              wrote on last edited by
              #6

              Not sure what you are going to do with raspiconfig. Just addspi-sun7i to /etc/modules. The banana pi seems to have two spi busses. Could it be you have to connect the nrf to the other one? Or change the bus in the source code if hard coded? I don't have a banana pi and never used a pi as gateway. Still I wanna help. :D

              1 Reply Last reply
              0
              • G Offline
                G Offline
                GreenSystemes
                wrote on last edited by
                #7

                I'll try the second SPI bus but it seems be the good bus.
                After add spi-sun7i in /etc/modules, what i'm supposed to do ? reboot ? just try to run PiGateway ?

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  Jan Gatzke
                  wrote on last edited by
                  #8

                  Nothing. It's just for automatic modprobe on boot. Does lsmos show the module as loaded?

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    GreenSystemes
                    wrote on last edited by
                    #9

                    the result of lsmod :

                    Module                  Size  Used by
                    spidev                  6217  12 
                    spi_sun7i              17802  0 
                    mali_drm                2608  0 
                    drm                   209226  1 mali_drm
                    mali                  111427  0 
                    ump                    52415  1 mali
                    
                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      Jan Gatzke
                      wrote on last edited by
                      #10

                      Looks good.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        GreenSystemes
                        wrote on last edited by
                        #11

                        okay thank you for your help,
                        i'm trying an other way to run mysensors, i'll post a fix when it works.

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          Jan Gatzke
                          wrote on last edited by Jan Gatzke
                          #12

                          I just had another look at this. There is an nrf24 library for the banana pi: https://github.com/bearpawmaxim/librf24-sunxi/tree/master/src
                          The raspberry gateway must be ported to this lib. Doesn't look to complicated.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          27

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.1k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular