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. Controllers
  3. Domoticz
  4. nrf24l01+ RPi2 direct connection problem
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

nrf24l01+ RPi2 direct connection problem

Scheduled Pinned Locked Moved Domoticz
13 Posts 5 Posters 6.8k Views 5 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.
  • alexsh1A Offline
    alexsh1A Offline
    alexsh1
    wrote on last edited by alexsh1
    #1

    Hello,

    I followed the nrf24l01+ direct RPi2 connection guide here:
    http://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection

    I have had librf24-bcm.so.1.0 installed from tmrh20.
    Unfortunately, I was not able to compile it from librf24-bcm folder:

    g++ -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv7-a -D BCM2835_PERI_BASE=0x -c RF24.cpp
    gcc -Wall -fPIC -Ofast -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv7-a -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
    

    When I run PiGatewaySerial, I see the following:

    pi@raspberrypi2 ~/Raspberry $ sudo ./PiGatewaySerial
    Starting PiGatewaySerial...
    Protocol version - 1.4
    Created PTY '/dev/pts/1'
    Gateway tty: /dev/ttyMySensorsGateway
    ================ SPI Configuration ================
    CSN Pin  	 = CE0 (PI Hardware Driven)
    CE Pin  	 = Custom GPIO22
    Clock Speed	 = 8 Mhz
    ================ NRF Configuration ================
    STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
    RX_ADDR_P0-1	 = 0xa8a8e1fc00 0xa8a8e1fc00
    RX_ADDR_P2-5	 = 0xff 0xc4 0xc5 0xc6
    TX_ADDR		 = 0xa8a8e1fc01
    RX_PW_P0-6	 = 0x20 0x20 0x20 0x00 0x00 0x00
    EN_AA		 = 0x3b
    EN_RXADDR	 = 0x06
    RF_CH		 = 0x4c
    RF_SETUP	 = 0x23
    CONFIG		 = 0x0e
    DYNPD/FEATURE	 = 0x3f 0x06
    Data Rate	 = 250KBPS
    Model		 = nRF24L01+
    CRC Length	 = 16 bits
    PA Power	 = PA_LOW
    read: 1-1-0 s=255,c=0,t=17,pt=0,l=3:1.5
    send: 1-194-1-0 s=255,c=0,t=17,pt=0,l=3,st=ok:1.5
    read: 1-1-0 s=255,c=3,t=6,pt=1,l=1:0
    send: 1-194-1-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    read: 1-1-0 s=255,c=3,t=11,pt=0,l=17:Sensebender Micro
    send: 1-194-1-0 s=255,c=3,t=11,pt=0,l=17,st=ok:Sensebender Micro
    read: 1-1-0 s=255,c=3,t=12,pt=0,l=3:1.2
    send: 1-194-1-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.2
    read: 1-1-0 s=1,c=0,t=6,pt=0,l=0:
    send: 1-194-1-0 s=1,c=0,t=6,pt=0,l=0,st=ok:
    read: 1-1-0 s=2,c=0,t=7,pt=0,l=0:
    send: 1-194-1-0 s=2,c=0,t=7,pt=0,l=0,st=fail:
    read: 1-1-0 s=199,c=0,t=13,pt=0,l=0:
    send: 1-194-1-0 s=199,c=0,t=13,pt=0,l=0,st=fail:
    read: 1-1-0 s=1,c=1,t=0,pt=7,l=5:23.2
    send: 1-194-1-0 s=1,c=1,t=0,pt=7,l=5,st=fail:23.2
    read: 1-1-0 s=2,c=1,t=1,pt=2,l=2:57
    send: 1-194-1-0 s=2,c=1,t=1,pt=2,l=2,st=fail:57
    read: 1-1-0 s=199,c=1,t=38,pt=4,l=4:3143
    send: 1-194-1-0 s=199,c=1,t=38,pt=4,l=4,st=fail:3143
    read: 1-1-0 s=255,c=3,t=0,pt=1,l=1:88
    send: 1-194-1-0 s=255,c=3,t=0,pt=1,l=1,st=fail:88
    read: 1-1-255 s=255,c=3,t=7,pt=0,l=0:
    

    Nothing can be seen in Domoticz.
    Unfortunately, I cannot reinstall my RPi to re-compile librf24-bcm.so.1.0 as it is production system.

    Any ideas please?

    1 Reply Last reply
    0
    • alexsh1A Offline
      alexsh1A Offline
      alexsh1
      wrote on last edited by alexsh1
      #2

      @Mediacj - I have just noticed you had a similar issue. Care to share how you resolved it please?
      @hek - Do you know if the problem is only in librf24-bcm.so.1.0?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mediacj
        wrote on last edited by Mediacj
        #3

        I didn't get it to work unfortunately.

        alexsh1A 1 Reply Last reply
        0
        • M Mediacj

          I didn't get it to work unfortunately.

          alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by alexsh1
          #4

          @Mediacj said:

          I didn't get it to work unfortunately.

          Damn! All google links are only to this website and it looks like there is no solution to this issue for now. Thanks for your reply though

          1 Reply Last reply
          0
          • S Offline
            S Offline
            salvato
            wrote on last edited by
            #5

            Hello.
            I think that the problem related to the messsage:
            error: invalid suffix "x" on integer constant
            come from a problem in the Makefile of the librf24-bcm.
            There you can find the following line:

            IOBASE := $(shell cat /proc/iomem | grep bcm2708_vcio | cut -f 1 -d "-")

            This try to find the memory base address of the peripherals in the Raspberry that is variable between the different models.

            In my Raspberry the /proc/iomem file does not contain any information about bcm2708_vcio and the string returned is empty (in my case should be 0x20000000)

            You could try to hard code the correct value in the Makefile.

            Hope this help

            1 Reply Last reply
            0
            • alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by
              #6

              @salvato Thanks very much!
              The makefile has to be changed to

              This is for the standard PI
              amend the following:
              #define BCM2835_PERI_BASE 0x3F000000

              I can confirm - now it works and everything compiles fine!

              S 1 Reply Last reply
              1
              • alexsh1A alexsh1

                @salvato Thanks very much!
                The makefile has to be changed to

                This is for the standard PI
                amend the following:
                #define BCM2835_PERI_BASE 0x3F000000

                I can confirm - now it works and everything compiles fine!

                S Offline
                S Offline
                salvato
                wrote on last edited by
                #7

                @alexsh1
                Happy to have solved your problem.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lubo
                  wrote on last edited by
                  #8

                  Hi guys, i have the same problem with compiling librf24-bcm library on RPI2. I have changed line "#define BCM2835_PERI_BASE 0x20000000" to "#define BCM2835_PERI_BASE 0x3F000000" in bcm2835.h file but it didnt help. I still get compiling error "bcm2835.c:1253:79: error: invalid suffix "x" on integer constant
                  Makefile:52: recipe for target 'bcm2835.o' failed". What else need to be changed ? thanks

                  L 1 Reply Last reply
                  0
                  • L lubo

                    Hi guys, i have the same problem with compiling librf24-bcm library on RPI2. I have changed line "#define BCM2835_PERI_BASE 0x20000000" to "#define BCM2835_PERI_BASE 0x3F000000" in bcm2835.h file but it didnt help. I still get compiling error "bcm2835.c:1253:79: error: invalid suffix "x" on integer constant
                    Makefile:52: recipe for target 'bcm2835.o' failed". What else need to be changed ? thanks

                    L Offline
                    L Offline
                    lubo
                    wrote on last edited by
                    #9

                    @lubo
                    oh i had to update CCFLAGS += -D BCM2835_PERI_BASE=0x${IOBASE} to CCFLAGS += -D BCM2835_PERI_BASE=0x3F000000 in makefile and it works now thanks :)

                    1 Reply Last reply
                    0
                    • alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #10

                      @lubo Ok, you have figured it out. Excellent! It is the makefile which has to be changed

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        salvato
                        wrote on last edited by
                        #11

                        well... I made a different modification:
                        I changed the row
                        IOBASE := $(shell cat /proc/iomem | grep bcm2708_vcio | cut -f 1 -d "-")
                        in
                        IOBASE := 20000000

                        (3F000000 in your case)

                        1 Reply Last reply
                        1
                        • E Offline
                          E Offline
                          Eawo
                          wrote on last edited by
                          #12

                          Wow nice and easy to follow. I had the error but the error thread helped me.
                          Just wondering why does it say its running "MySensors Gateway USB
                          Version: 1.4"

                          alexsh1A 1 Reply Last reply
                          0
                          • E Eawo

                            Wow nice and easy to follow. I had the error but the error thread helped me.
                            Just wondering why does it say its running "MySensors Gateway USB
                            Version: 1.4"

                            alexsh1A Offline
                            alexsh1A Offline
                            alexsh1
                            wrote on last edited by
                            #13

                            Because it is running MS v1.4 (current is v1.5 and development is v1.6) :-)
                            If you wonder why it says USB, it emulates USB.

                            @Eawo said:

                            Just wondering why does it say its running "MySensors Gateway USB
                            Version: 1.4"

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


                            19

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.0k

                            Posts


                            Copyright 2019 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