Can't build librf24-bcm on Banana Pi



  • 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 ?



  • @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.



  • @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 ?



  • 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.



  • 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 ?



  • 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. 😄



  • 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 ?



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



  • 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
    


  • Looks good.



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



  • 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.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 2
  • 1
  • 3
  • 2

23
Online

11.2k
Users

11.1k
Topics

112.5k
Posts