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. No communication with NRF24L01 on RPi3 64bit [SOLVED]

No communication with NRF24L01 on RPi3 64bit [SOLVED]

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 881 Views 2 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
    Gunther
    wrote on last edited by Gunther
    #1

    Hi!

    Just recently discovered MySensors and this is what I was looking for!
    Unfortunately I can't get communications my RPI3 to communicate with a NRF24L01.

    My setup: RPi3 with a custom kernel 4.13.16 using 64bit, with loaded kernel module spi_bcm2835.

    $ uname -r
    4.13.16-v8+
    
    $ cat /boot/config.txt
    [...]
    dtparam=spi=on
    
    $ lsmod
    [...]
    spi_bcm2835            20480  0
    
    $ ls /dev/spidev0.*
    /dev/spidev0.0  /dev/spidev0.1
    

    I use the dev-branch (also tried stable, same behavior):

    $ ./configure --prefix=/data/home/gunther/mysensors --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=unknown, Type=unknown, CPU=aarch64.
    [SECTION] Checking GPIO Sysfs.
      [OK] /sys/class/gpio/export found
    [SECTION] Detecting SPI driver.
      [OK] SPI driver detected:SPIDEV.
    [SECTION] Detecting init system.
      [FAILED] unknown init system.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    

    The unknown init system should be fine, as I do not want to create any startup scripts or move files somewhere.

    Running the gateway as root gives:

    $ ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.1-alpha
    mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.1-alpha
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=1
    mysgw: TSM:FAIL:DIS
    mysgw: TSF:TDI:TSL
    

    This tells me that the communication between radio and RPI fails.

    I (more than) triple-checked the wiring.
    I use a voltage regulator from 5V to 3.3V and have a 47µF capacitor between GND and 3.3V. I also tried a different voltage regulator and NRF24L01.

    I assume the radio itself should be fine because attached to a Arduino Nano (with voltage regulator, without condensator) I see:

    16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
    25 TSM:INIT
    26 TSF:WUR:MS=0
    33 TSM:INIT:TSP OK
    35 TSM:FPAR
    37 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2046 !TSM:FPAR:NO REPLY
    

    Which I expect to the missing gateway.

    -) Is the SPIDEV driver ok? BCM does not compile for 64bit.
    -) Do I need to activate any GPIO ports with
    echo "$i" > /sys/class/gpio/export or anything alike?
    -) Is it ok, that I use other GPIO ports directly for other things?
    -) Is there a way to test that SPI is working properly?

    Thanks!

    G 1 Reply Last reply
    0
    • G Gunther

      Hi!

      Just recently discovered MySensors and this is what I was looking for!
      Unfortunately I can't get communications my RPI3 to communicate with a NRF24L01.

      My setup: RPi3 with a custom kernel 4.13.16 using 64bit, with loaded kernel module spi_bcm2835.

      $ uname -r
      4.13.16-v8+
      
      $ cat /boot/config.txt
      [...]
      dtparam=spi=on
      
      $ lsmod
      [...]
      spi_bcm2835            20480  0
      
      $ ls /dev/spidev0.*
      /dev/spidev0.0  /dev/spidev0.1
      

      I use the dev-branch (also tried stable, same behavior):

      $ ./configure --prefix=/data/home/gunther/mysensors --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 
      [SECTION] Detecting target machine.
        [OK] machine detected: SoC=unknown, Type=unknown, CPU=aarch64.
      [SECTION] Checking GPIO Sysfs.
        [OK] /sys/class/gpio/export found
      [SECTION] Detecting SPI driver.
        [OK] SPI driver detected:SPIDEV.
      [SECTION] Detecting init system.
        [FAILED] unknown init system.
      [SECTION] Saving configuration.
      [SECTION] Cleaning previous builds.
      [OK] Finished.
      

      The unknown init system should be fine, as I do not want to create any startup scripts or move files somewhere.

      Running the gateway as root gives:

      $ ./bin/mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.1-alpha
      mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.1-alpha
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: !TSM:INIT:TSP FAIL
      mysgw: TSM:FAIL:CNT=1
      mysgw: TSM:FAIL:DIS
      mysgw: TSF:TDI:TSL
      

      This tells me that the communication between radio and RPI fails.

      I (more than) triple-checked the wiring.
      I use a voltage regulator from 5V to 3.3V and have a 47µF capacitor between GND and 3.3V. I also tried a different voltage regulator and NRF24L01.

      I assume the radio itself should be fine because attached to a Arduino Nano (with voltage regulator, without condensator) I see:

      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
      25 TSM:INIT
      26 TSF:WUR:MS=0
      33 TSM:INIT:TSP OK
      35 TSM:FPAR
      37 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2046 !TSM:FPAR:NO REPLY
      

      Which I expect to the missing gateway.

      -) Is the SPIDEV driver ok? BCM does not compile for 64bit.
      -) Do I need to activate any GPIO ports with
      echo "$i" > /sys/class/gpio/export or anything alike?
      -) Is it ok, that I use other GPIO ports directly for other things?
      -) Is there a way to test that SPI is working properly?

      Thanks!

      G Offline
      G Offline
      Gunther
      wrote on last edited by
      #2

      @gunther After fighting with this problem for some days, I now got it working. The solution was to use the BCM driver instead of SPIDEV.

      I achieved that by commenting out the 32 bit gcc flags in ./configure

      function gcc_cpu_flags {
          local soc=$1
          case $soc in
          BCM2835)
              flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
              ;;
          BCM2836)
              flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
              ;;
          BCM2837)
              flags=""
              #flags="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
              ;;
      

      and running configure with this options:

      $ ./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --soc=BCM2837
      

      Hope this shortens the learning curve for 64bit Rasperry Pi users!

      mfalkviddM 1 Reply Last reply
      1
      • G Gunther

        @gunther After fighting with this problem for some days, I now got it working. The solution was to use the BCM driver instead of SPIDEV.

        I achieved that by commenting out the 32 bit gcc flags in ./configure

        function gcc_cpu_flags {
            local soc=$1
            case $soc in
            BCM2835)
                flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
                ;;
            BCM2836)
                flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
                ;;
            BCM2837)
                flags=""
                #flags="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
                ;;
        

        and running configure with this options:

        $ ./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --soc=BCM2837
        

        Hope this shortens the learning curve for 64bit Rasperry Pi users!

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @gunther great work, thanks for sharing! And welcome to the MySensors community :)

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


        18

        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