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. Development
  3. Problem changing CS and CE pins on RPi gateway

Problem changing CS and CE pins on RPi gateway

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 58 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.
  • tinnutT Offline
    tinnutT Offline
    tinnut
    wrote on last edited by
    #1

    Hi,

    I recently set up an OpenSprinkler that's using a Raspberry Pi and thought I could use it for more, then I found MySensors and now I think I have a new hobby :) It's all very impressive.

    I've connected up a nrf24l01 module to the Raspberry Pi and followed the guide, but I found that the rpi would only successfully connect to the nrf24 when I'm using the default CS and CE pins. When I try to change their pins using --my-rf24-ce-pin=33 --my-rf24-cs-pin=37 with the configure script, it didn't appear the change the pins as the rpi would fail to connect to the nrf24 on those pins, but could still connect with the default pins. When the make is running, I can see it launching g++ with -DMY_RF24_CS_PIN=37 -DMY_RF24_CE_PIN=33.

    I also tried directly editing the MyConfig.h file to explicitly define the values, but that failed to work as well.

    The OpenSprinkler RPi PCB board and case makes it harder (but not impossible) to access the back row of pins which is why I was trying to use non-default pins in the first place.

    If I add --extra-cxxflags="-DMY_DEBUG_VERBOSE_RF24" to the configure script, then when I run a test, it includes the output:

    DEBUG RF24:INIT:PIN,CE=33,CS=37
    

    Which suggests that the software knows that's I've specified alternate pins to use.

    I'm using DietPi distribution, btw. It does some things a little different which complicates things.

    Does anyone have any suggestions?

    To be honest, I'm happy enough to just use the default pins at this stage but this might help anyone else that finds themselves in the same situation.

    Cheers,
    Konrad.

    TRS-80T henk herckH 2 Replies Last reply
    1
    • tinnutT tinnut

      Hi,

      I recently set up an OpenSprinkler that's using a Raspberry Pi and thought I could use it for more, then I found MySensors and now I think I have a new hobby :) It's all very impressive.

      I've connected up a nrf24l01 module to the Raspberry Pi and followed the guide, but I found that the rpi would only successfully connect to the nrf24 when I'm using the default CS and CE pins. When I try to change their pins using --my-rf24-ce-pin=33 --my-rf24-cs-pin=37 with the configure script, it didn't appear the change the pins as the rpi would fail to connect to the nrf24 on those pins, but could still connect with the default pins. When the make is running, I can see it launching g++ with -DMY_RF24_CS_PIN=37 -DMY_RF24_CE_PIN=33.

      I also tried directly editing the MyConfig.h file to explicitly define the values, but that failed to work as well.

      The OpenSprinkler RPi PCB board and case makes it harder (but not impossible) to access the back row of pins which is why I was trying to use non-default pins in the first place.

      If I add --extra-cxxflags="-DMY_DEBUG_VERBOSE_RF24" to the configure script, then when I run a test, it includes the output:

      DEBUG RF24:INIT:PIN,CE=33,CS=37
      

      Which suggests that the software knows that's I've specified alternate pins to use.

      I'm using DietPi distribution, btw. It does some things a little different which complicates things.

      Does anyone have any suggestions?

      To be honest, I'm happy enough to just use the default pins at this stage but this might help anyone else that finds themselves in the same situation.

      Cheers,
      Konrad.

      TRS-80T Offline
      TRS-80T Offline
      TRS-80
      wrote on last edited by
      #2

      Welcome to the forums, tinnut!

      @tinnut said in Problem changing CS and CE pins on RPi gateway:

      I found MySensors and now I think I have a new hobby

      (Emphasis mine). This is certainly the right approach, IMO. ;)

      Contrary to popular opinion, I am not such a fan of RPi, but since you already have it, on we go. Even I must admit that it was my first purchase, before I knew any better. :)

      @tinnut said in Problem changing CS and CE pins on RPi gateway:

      I found that the rpi would only successfully connect to the nrf24 when I'm using the default CS and CE pins. When I try to change their pins using --my-rf24-ce-pin=33 --my-rf24-cs-pin=37 with the configure script, it didn't appear the change the pins as the rpi would fail to connect to the nrf24 on those pins, but could still connect with the default pins. When the make is running, I can see it launching g++ with -DMY_RF24_CS_PIN=37 -DMY_RF24_CE_PIN=33.
      I also tried directly editing the MyConfig.h file to explicitly define the values, but that failed to work as well.
      The OpenSprinkler RPi PCB board and case makes it harder (but not impossible) to access the back row of pins which is why I was trying to use non-default pins in the first place.
      If I add --extra-cxxflags="-DMY_DEBUG_VERBOSE_RF24" to the configure script, then when I run a test, it includes the output:
      DEBUG RF24:INIT:PIN,CE=33,CS=37

      Which suggests that the software knows that's I've specified alternate pins to use.

      As to particulars of this issue, hopefully one of devs familiar with that part of code (build scripts for RPi?) stops by. Because I am not that person. ;) Furthermore as mentioned, I eschew RPi (for lots of reasons). You could also help the project out tremendously by lodging an issue over at the GitHub, which is probably more likely to get addressed (sooner or later) than posting here in forums, where possibly it could get overlooked.

      @tinnut said in Problem changing CS and CE pins on RPi gateway:

      I'm using DietPi distribution, btw. It does some things a little different which complicates things.

      As you are just beginning to figure out (perhaps) this is only one aspect of the problems with RPi. I played around with DietPi once a little bit (if that is what I am thinking of), what a mess with all their custom stuff going on. It was very hard to even know what is really going on with it, I finally gave up.

      tinnutT 1 Reply Last reply
      0
      • tinnutT tinnut

        Hi,

        I recently set up an OpenSprinkler that's using a Raspberry Pi and thought I could use it for more, then I found MySensors and now I think I have a new hobby :) It's all very impressive.

        I've connected up a nrf24l01 module to the Raspberry Pi and followed the guide, but I found that the rpi would only successfully connect to the nrf24 when I'm using the default CS and CE pins. When I try to change their pins using --my-rf24-ce-pin=33 --my-rf24-cs-pin=37 with the configure script, it didn't appear the change the pins as the rpi would fail to connect to the nrf24 on those pins, but could still connect with the default pins. When the make is running, I can see it launching g++ with -DMY_RF24_CS_PIN=37 -DMY_RF24_CE_PIN=33.

        I also tried directly editing the MyConfig.h file to explicitly define the values, but that failed to work as well.

        The OpenSprinkler RPi PCB board and case makes it harder (but not impossible) to access the back row of pins which is why I was trying to use non-default pins in the first place.

        If I add --extra-cxxflags="-DMY_DEBUG_VERBOSE_RF24" to the configure script, then when I run a test, it includes the output:

        DEBUG RF24:INIT:PIN,CE=33,CS=37
        

        Which suggests that the software knows that's I've specified alternate pins to use.

        I'm using DietPi distribution, btw. It does some things a little different which complicates things.

        Does anyone have any suggestions?

        To be honest, I'm happy enough to just use the default pins at this stage but this might help anyone else that finds themselves in the same situation.

        Cheers,
        Konrad.

        henk herckH Offline
        henk herckH Offline
        henk herck
        wrote on last edited by
        #3

        @tinnut Set each GPIO you use as a slave select to be an output and set it high

        some info to do it in terminal other then scripts and code

        https://raspberry-projects.com/pi/command-line/io-pins-command-line/io-pin-control-from-the-command-line

        or use a library as WiringOP

        or even better buy a Orange Pi for 10 euro and check your pins of your opensprinkler pcb most likley you only have it to turn around RPi is right to left and a OPI is the io pins from left to right .

        Get Armbian and have mainline kernel and up to date linux distro

        have fun

        TRS-80T tinnutT 2 Replies Last reply
        2
        • henk herckH henk herck

          @tinnut Set each GPIO you use as a slave select to be an output and set it high

          some info to do it in terminal other then scripts and code

          https://raspberry-projects.com/pi/command-line/io-pins-command-line/io-pin-control-from-the-command-line

          or use a library as WiringOP

          or even better buy a Orange Pi for 10 euro and check your pins of your opensprinkler pcb most likley you only have it to turn around RPi is right to left and a OPI is the io pins from left to right .

          Get Armbian and have mainline kernel and up to date linux distro

          have fun

          TRS-80T Offline
          TRS-80T Offline
          TRS-80
          wrote on last edited by
          #4

          @henk-herck said in Problem changing CS and CE pins on RPi gateway:

          Get Armbian and have mainline kernel and up to date linux distro

          This is main reason I have become such big fan (and proponent) of Armbian ever since finding out about it only a few years ago!

          Very glad to run into a fellow man of taste and distinction! :beers:

          At least you are able to help OP in the meantime with what he has now. I can't even do that any more as I gave up on RPi long time ago.

          1 Reply Last reply
          0
          • TRS-80T TRS-80

            Welcome to the forums, tinnut!

            @tinnut said in Problem changing CS and CE pins on RPi gateway:

            I found MySensors and now I think I have a new hobby

            (Emphasis mine). This is certainly the right approach, IMO. ;)

            Contrary to popular opinion, I am not such a fan of RPi, but since you already have it, on we go. Even I must admit that it was my first purchase, before I knew any better. :)

            @tinnut said in Problem changing CS and CE pins on RPi gateway:

            I found that the rpi would only successfully connect to the nrf24 when I'm using the default CS and CE pins. When I try to change their pins using --my-rf24-ce-pin=33 --my-rf24-cs-pin=37 with the configure script, it didn't appear the change the pins as the rpi would fail to connect to the nrf24 on those pins, but could still connect with the default pins. When the make is running, I can see it launching g++ with -DMY_RF24_CS_PIN=37 -DMY_RF24_CE_PIN=33.
            I also tried directly editing the MyConfig.h file to explicitly define the values, but that failed to work as well.
            The OpenSprinkler RPi PCB board and case makes it harder (but not impossible) to access the back row of pins which is why I was trying to use non-default pins in the first place.
            If I add --extra-cxxflags="-DMY_DEBUG_VERBOSE_RF24" to the configure script, then when I run a test, it includes the output:
            DEBUG RF24:INIT:PIN,CE=33,CS=37

            Which suggests that the software knows that's I've specified alternate pins to use.

            As to particulars of this issue, hopefully one of devs familiar with that part of code (build scripts for RPi?) stops by. Because I am not that person. ;) Furthermore as mentioned, I eschew RPi (for lots of reasons). You could also help the project out tremendously by lodging an issue over at the GitHub, which is probably more likely to get addressed (sooner or later) than posting here in forums, where possibly it could get overlooked.

            @tinnut said in Problem changing CS and CE pins on RPi gateway:

            I'm using DietPi distribution, btw. It does some things a little different which complicates things.

            As you are just beginning to figure out (perhaps) this is only one aspect of the problems with RPi. I played around with DietPi once a little bit (if that is what I am thinking of), what a mess with all their custom stuff going on. It was very hard to even know what is really going on with it, I finally gave up.

            tinnutT Offline
            tinnutT Offline
            tinnut
            wrote on last edited by
            #5

            @TRS-80
            Thanks for your reply :)

            If I get the energy I might move away from DietPi, but unfortunately I have a lot to do at the moment.

            1 Reply Last reply
            0
            • henk herckH henk herck

              @tinnut Set each GPIO you use as a slave select to be an output and set it high

              some info to do it in terminal other then scripts and code

              https://raspberry-projects.com/pi/command-line/io-pins-command-line/io-pin-control-from-the-command-line

              or use a library as WiringOP

              or even better buy a Orange Pi for 10 euro and check your pins of your opensprinkler pcb most likley you only have it to turn around RPi is right to left and a OPI is the io pins from left to right .

              Get Armbian and have mainline kernel and up to date linux distro

              have fun

              tinnutT Offline
              tinnutT Offline
              tinnut
              wrote on last edited by
              #6

              @henk-herck - thanks for your reply and suggestions.

              I changed the pins to output and set them as high, but unfortunately it didn't change the outcome. In the end I soldered some wire into the OpenSprinkler's expansion board to help me get to that row of pins which allowed me to work around my issue.

              I'd never really looked at the Orange Pi range before and went a bit down a rabbit hole looking at them yesterday. They're quite interesting and I'll look into them a bit more today.

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


              17

              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