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. OpenHardware.io
  3. 💬 MySensors Nrf24/RFM Serial/Ethernet GW Shield (for Uno)

💬 MySensors Nrf24/RFM Serial/Ethernet GW Shield (for Uno)

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsnrf24l01+rfm69
28 Posts 4 Posters 618 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.
  • H Offline
    H Offline
    hlehoux
    wrote on last edited by
    #5

    awaiting some components to test

    1 Reply Last reply
    0
    • Nick WillisN Offline
      Nick WillisN Offline
      Nick Willis
      wrote on last edited by
      #6

      I'm going to try it out too. However I can't find the values for some of the components:
      R1, R2, R3
      R4-R13
      C1, C2, C3
      Does anyone know the values of the above?

      sundberg84S 1 Reply Last reply
      0
      • H Offline
        H Offline
        hlehoux
        wrote on last edited by
        #7

        @sundberg84 could you please provide us some help ?

        1 Reply Last reply
        0
        • Nick WillisN Nick Willis

          I'm going to try it out too. However I can't find the values for some of the components:
          R1, R2, R3
          R4-R13
          C1, C2, C3
          Does anyone know the values of the above?

          sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by sundberg84
          #8

          @Nick-Willis @Nick-Willis - Im also trying out the RFM version, but not finished yet. I need to run the signals through a signal analyser, Either i messed some soldering up or something else i up with this... Im getting that MySensors does not recognize the radio, but I have to use softspi and not sure yet how this works with MySensors and Rfm.
          R1-R3 (led current limiting resistor = 330 - 1k
          R4 - R13 = 10k pullups
          C1 = 0,1uF, C2 = 10uF C3= Nrf24l01+ resistor, 4.7µ - 47µF

          Nick WillisN 1 Reply Last reply
          1
          • sundberg84S sundberg84

            @Nick-Willis @Nick-Willis - Im also trying out the RFM version, but not finished yet. I need to run the signals through a signal analyser, Either i messed some soldering up or something else i up with this... Im getting that MySensors does not recognize the radio, but I have to use softspi and not sure yet how this works with MySensors and Rfm.
            R1-R3 (led current limiting resistor = 330 - 1k
            R4 - R13 = 10k pullups
            C1 = 0,1uF, C2 = 10uF C3= Nrf24l01+ resistor, 4.7µ - 47µF

            Nick WillisN Offline
            Nick WillisN Offline
            Nick Willis
            wrote on last edited by Nick Willis
            #9

            @sundberg84 Thanks for the update and information.
            The soft spi with RFM issue is a concern. Have you tried using the new RFM driver instead of the default?
            https://www.mysensors.org/apidocs/group__SoftSpiSettingGrpPub.html

            sundberg84S 1 Reply Last reply
            0
            • Nick WillisN Nick Willis

              @sundberg84 Thanks for the update and information.
              The soft spi with RFM issue is a concern. Have you tried using the new RFM driver instead of the default?
              https://www.mysensors.org/apidocs/group__SoftSpiSettingGrpPub.html

              sundberg84S Offline
              sundberg84S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #10

              @Nick-Willis - yes I did, and when I used the new driver everything compiled and the node started, but I got a strange serial log message saying radio = 0 (not radio failed) or something.

              Nick WillisN 1 Reply Last reply
              0
              • H Offline
                H Offline
                hlehoux
                wrote on last edited by
                #11

                @sundberg84 Thank you
                My knowledge being very limited, i understand this might be difficult for my to go on the RFM69 version ?

                Hopefully, my nrf24 network based on your designs works well :-)

                1 Reply Last reply
                1
                • H Offline
                  H Offline
                  hlehoux
                  wrote on last edited by
                  #12

                  Thanks to @sundberg84

                  My Nrf24 gateaway is know quasi professionnal !

                  Can't wait to test the RFM69 version

                  IMG_0364.jpg

                  1 Reply Last reply
                  1
                  • sundberg84S sundberg84

                    @Nick-Willis - yes I did, and when I used the new driver everything compiled and the node started, but I got a strange serial log message saying radio = 0 (not radio failed) or something.

                    Nick WillisN Offline
                    Nick WillisN Offline
                    Nick Willis
                    wrote on last edited by Nick Willis
                    #13

                    @sundberg84 I've now built both the NRF gateway (working perfectly) and the RFM gateway but not working for the RFM one.
                    I get this in my serial output:

                    0 MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2
                    55 MCO:BGN:BFR
                    76 TSM:INIT
                    89 TSF:WUR:MS=0
                    105 RFM69:INIT
                    121 RFM69:INIT:PIN,CS=6,IQP=2,IQN=1
                    3230 RFM69:PTX:LEVEL=5 dBm
                    3259 !RFM69:INIT:SANCHK FAIL
                    3289 !TSM:INIT:TSP FAIL
                    3314 TSM:FAIL:CNT=1
                    3336 TSM:FAIL:DIS
                    3354 TSF:TDI:TSL
                    3372 RFM69:RSL
                    

                    And this is the important bit of my sketch. I'm using it as an MQTT Ethernet gateway:

                    #define MY_RADIO_RFM69
                    #define MY_RFM69_NEW_DRIVER
                    #define MY_IS_RFM69HW
                    #define MY_RFM69_FREQUENCY RFM69_868MHZ
                    
                    #define MY_W5100_SPI_EN 4 
                    
                    #define MY_SOFTSPI
                    #define MY_SOFT_SPI_SCK_PIN 14
                    #define MY_SOFT_SPI_MISO_PIN 16
                    #define MY_SOFT_SPI_MOSI_PIN 15
                    
                    #define MY_RFM69_CS_PIN 6
                    
                    #define MY_RFM69_IRQ_PIN 2
                    #define MY_RFM69_IRQ_NUM 1
                    
                    #define MY_GATEWAY_W5100
                    

                    Is this the same problem you get too?

                    sundberg84S 1 Reply Last reply
                    0
                    • Nick WillisN Nick Willis

                      @sundberg84 I've now built both the NRF gateway (working perfectly) and the RFM gateway but not working for the RFM one.
                      I get this in my serial output:

                      0 MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2
                      55 MCO:BGN:BFR
                      76 TSM:INIT
                      89 TSF:WUR:MS=0
                      105 RFM69:INIT
                      121 RFM69:INIT:PIN,CS=6,IQP=2,IQN=1
                      3230 RFM69:PTX:LEVEL=5 dBm
                      3259 !RFM69:INIT:SANCHK FAIL
                      3289 !TSM:INIT:TSP FAIL
                      3314 TSM:FAIL:CNT=1
                      3336 TSM:FAIL:DIS
                      3354 TSF:TDI:TSL
                      3372 RFM69:RSL
                      

                      And this is the important bit of my sketch. I'm using it as an MQTT Ethernet gateway:

                      #define MY_RADIO_RFM69
                      #define MY_RFM69_NEW_DRIVER
                      #define MY_IS_RFM69HW
                      #define MY_RFM69_FREQUENCY RFM69_868MHZ
                      
                      #define MY_W5100_SPI_EN 4 
                      
                      #define MY_SOFTSPI
                      #define MY_SOFT_SPI_SCK_PIN 14
                      #define MY_SOFT_SPI_MISO_PIN 16
                      #define MY_SOFT_SPI_MOSI_PIN 15
                      
                      #define MY_RFM69_CS_PIN 6
                      
                      #define MY_RFM69_IRQ_PIN 2
                      #define MY_RFM69_IRQ_NUM 1
                      
                      #define MY_GATEWAY_W5100
                      

                      Is this the same problem you get too?

                      sundberg84S Offline
                      sundberg84S Offline
                      sundberg84
                      Hardware Contributor
                      wrote on last edited by
                      #14

                      @Nick-Willis - I have not had the time yet to investigate this. It is not the same serial output as you (and im not using an ethernet shield for my RFM gateway). It seems in your serial output that the radio cant be initialised at all (no contact).

                      Thi is my code:

                      include <SPI.h>
                      
                      // Enable debug prints to serial monitor
                      #define MY_DEBUG
                      
                      // Enable and select radio type attached
                      #define MY_RFM69_NEW_DRIVER
                      #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                      
                      #define MY_SOFTSPI
                      #define MY_SOFT_SPI_SCK_PIN 14
                      #define MY_SOFT_SPI_MOSI_PIN 15
                      #define MY_SOFT_SPI_MISO_PIN 16
                      
                      #ifndef MY_RF24_CE_PIN
                      #define MY_RF24_CE_PIN 5
                      #endif
                      #ifndef MY_RF24_CS_PIN
                      #define MY_RF24_CS_PIN 6
                      #endif
                      
                      // Enable serial gateway
                      #define MY_GATEWAY_SERIAL
                      
                      #include <MySensors.h>
                      
                      void setup()
                      {
                          // Setup locally attached sensors
                      }
                      
                      void presentation()
                      {
                          // Present locally attached sensors
                      }
                      
                      void loop()
                      {
                          // Send locally attached sensor data here
                      }
                      
                      1 Reply Last reply
                      0
                      • sundberg84S Offline
                        sundberg84S Offline
                        sundberg84
                        Hardware Contributor
                        wrote on last edited by sundberg84
                        #15

                        So, today I have been making some test for RFM radio + this shield.
                        With the new driver, it seems ok - but I suspect TSP=NA isnt a good sign.
                        This happens both with SoftSPI with and without the shield attached.

                        0;255;3;0;9;0 MCO:BGN:INIT GW,CP=R-NGAA--,FQ=16,REL=255,VER=2.3.2
                        0;255;3;0;14;Gateway startup complete.
                        0;255;0;0;17;2.3.2
                        0;255;3;0;9;359 MCO:BGN:STP
                        0;255;3;0;9;365 MCO:REG:NOT NEEDED
                        0;255;3;0;9;368 MCO:BGN:INIT OK,TSP=NA
                        

                        With a logic analyser, I cant seen any activity at all from the UNO on the defined softSPI pins. All I see here is some activity on RX and some on A3 (for signing - atsha chip)

                        2e727f86-6834-40ef-b481-14f94c187e5f-image.png

                        By removing softSPI from the code, using default pins (and bridge the uno to my shield with dupont cables) i get exactly the same as above, TSP=NA

                        Could it be that SoftSPI uses analog pins, and im using logic level converters on the shield...

                        By just replacing the new driver with //#define MY_RADIO_RFM69 i get a more correct looking log:

                        0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RRNGAA--,FQ=16,REL=255,VER=2.3.2
                        0;255;3;0;9;108 TSM:INIT
                        0;255;3;0;9;111 TSF:WUR:MS=0
                        0;255;3;0;9;114 TSM:INIT:TSP OK
                        0;255;3;0;9;117 TSM:INIT:GW MODE
                        0;255;3;0;9;120 TSM:READY:ID=0,PAR=0,DIS=0
                        0;255;3;0;9;123 MCO:REG:NOT NEEDED
                        0;255;3;0;14;Gateway startup complete.
                        0;255;0;0;18;2.3.2
                        0;255;3;0;9;129 MCO:BGN:STP
                        0;255;3;0;9;135 MCO:BGN:INIT OK,TSP=1
                        0;255;3;0;9;139 TSM:READY:NWD REQ
                        0;255;3;0;9;145 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                        

                        I can also see things happening all over all SPI logic channels.

                        So whats up with the new driver? Did i not define it right?

                        // Enable and select radio type attached
                        #define MY_RFM69_NEW_DRIVER
                        #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                        

                        Or is it using other than default pins?

                        Nick WillisN 1 Reply Last reply
                        0
                        • sundberg84S sundberg84

                          So, today I have been making some test for RFM radio + this shield.
                          With the new driver, it seems ok - but I suspect TSP=NA isnt a good sign.
                          This happens both with SoftSPI with and without the shield attached.

                          0;255;3;0;9;0 MCO:BGN:INIT GW,CP=R-NGAA--,FQ=16,REL=255,VER=2.3.2
                          0;255;3;0;14;Gateway startup complete.
                          0;255;0;0;17;2.3.2
                          0;255;3;0;9;359 MCO:BGN:STP
                          0;255;3;0;9;365 MCO:REG:NOT NEEDED
                          0;255;3;0;9;368 MCO:BGN:INIT OK,TSP=NA
                          

                          With a logic analyser, I cant seen any activity at all from the UNO on the defined softSPI pins. All I see here is some activity on RX and some on A3 (for signing - atsha chip)

                          2e727f86-6834-40ef-b481-14f94c187e5f-image.png

                          By removing softSPI from the code, using default pins (and bridge the uno to my shield with dupont cables) i get exactly the same as above, TSP=NA

                          Could it be that SoftSPI uses analog pins, and im using logic level converters on the shield...

                          By just replacing the new driver with //#define MY_RADIO_RFM69 i get a more correct looking log:

                          0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RRNGAA--,FQ=16,REL=255,VER=2.3.2
                          0;255;3;0;9;108 TSM:INIT
                          0;255;3;0;9;111 TSF:WUR:MS=0
                          0;255;3;0;9;114 TSM:INIT:TSP OK
                          0;255;3;0;9;117 TSM:INIT:GW MODE
                          0;255;3;0;9;120 TSM:READY:ID=0,PAR=0,DIS=0
                          0;255;3;0;9;123 MCO:REG:NOT NEEDED
                          0;255;3;0;14;Gateway startup complete.
                          0;255;0;0;18;2.3.2
                          0;255;3;0;9;129 MCO:BGN:STP
                          0;255;3;0;9;135 MCO:BGN:INIT OK,TSP=1
                          0;255;3;0;9;139 TSM:READY:NWD REQ
                          0;255;3;0;9;145 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                          

                          I can also see things happening all over all SPI logic channels.

                          So whats up with the new driver? Did i not define it right?

                          // Enable and select radio type attached
                          #define MY_RFM69_NEW_DRIVER
                          #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                          

                          Or is it using other than default pins?

                          Nick WillisN Offline
                          Nick WillisN Offline
                          Nick Willis
                          wrote on last edited by
                          #16

                          @sundberg84 I'm also still having problems with this.
                          I got the same result if I define only MY_RFM69_NEW_DRIVER then TSP=NA so no transport. I think the MY_RFM69_NEW_DRIVER option is not defining the radio type but is just an option (like the frequency setting) so you need for the old driver:

                          #define MY_RADIO_RFM69
                          

                          And for the new driver - both options set:

                          #define MY_RADIO_RFM69
                          #define MY_RFM69_NEW_DRIVER
                          

                          However it still doesn't work with SoftSPI. I've also used dupont cables and wired directly to the hardware SPI pins on my Mega then removed all the SoftSPI defines. I'm also trying a simple serial gateway as follows:

                          
                          // Enable debug prints to serial monitor
                          #define MY_DEBUG
                          #define MY_DEBUG_VERBOSE_RFM69
                          
                          // Enable and select radio type attached
                          #define MY_RADIO_RFM69
                          #define MY_RFM69_NEW_DRIVER
                          #define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
                          
                          // Enable serial gateway
                          #define MY_GATEWAY_SERIAL
                          
                          /*
                          #define MY_SOFTSPI
                          #define MY_SOFT_SPI_SCK_PIN 14
                          #define MY_SOFT_SPI_MOSI_PIN 15
                          #define MY_SOFT_SPI_MISO_PIN 16
                          
                          #ifndef MY_RF24_CE_PIN
                          #define MY_RF24_CE_PIN 5
                          #endif
                          #ifndef MY_RF24_CS_PIN
                          #define MY_RF24_CS_PIN 6
                          #endif
                          */
                          
                          #include <MySensors.h>
                          
                          void setup()
                          {
                              // Setup locally attached sensors
                          }
                          
                          void presentation()
                          {
                              // Present locally attached sensors
                          }
                          
                          void loop()
                          {
                              // Send locally attached sensor data here
                          }
                          

                          My log:

                          0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2
                          0;255;3;0;9;5 TSM:INIT
                          0;255;3;0;9;7 TSF:WUR:MS=0
                          0;255;3;0;9;10 RFM69:INIT
                          0;255;3;0;9;12 RFM69:INIT:PIN,CS=53,IQP=2,IQN=0
                          0;255;3;0;9;1286 RFM69:PTX:LEVEL=5 dBm
                          0;255;3;0;9;1289 !RFM69:INIT:SANCHK FAIL
                          0;255;3;0;9;1293 !TSM:INIT:TSP FAIL
                          0;255;3;0;9;1296 TSM:FAIL:CNT=1
                          0;255;3;0;9;1299 TSM:FAIL:DIS
                          0;255;3;0;9;1302 TSF:TDI:TSL
                          0;255;3;0;9;1304 RFM69:RSL
                          

                          So something is wrong. I've checked my soldering and connections and it all looks ok (well as far as I can tell). There was one odd thing though - if I check resistance (on an unsoldered board) between the 3.3v pin on the RFM and the 3.3v on the regulator there is no connection. If I test against other 3.3v locations they are connected.
                          Looking in KiCAD I see a white line between the two 3.3v rails that are not connected. Is some connection missing here?
                          2020-07-30 10_00_44-Pcbnew — C__Users_Nick_Desktop_design_Su_Mys_Gateway.kicad_pcb.png

                          I tried soldering a wire to make the connection but still it won't work (same log as above). Really not sure what to try next.

                          1 Reply Last reply
                          0
                          • sundberg84S Offline
                            sundberg84S Offline
                            sundberg84
                            Hardware Contributor
                            wrote on last edited by
                            #17

                            You are correct, it should look like this:
                            b1a9bc0b-987e-4592-b470-e546a9fa744b-image.png I will update this to the final version. Can you comfirm you have 3.3v on the RFM module?

                            I will try with both #defines - that might work! Thanks for that.

                            One thing to do (quickfix) if you want to use it as a serial gateway is to cut the pinheaders for all SPI channels. Then hardswire the SPI channels to the normal pins 10-13 instead of softSPI which is currently using. You ofcourse needs to solder them from the pinheader and not RFM module itself since you need to logic level conversion. I will give this a new go as soon as I have time. I really really want a RFM gateway over ethernet.

                            Nick WillisN 1 Reply Last reply
                            0
                            • sundberg84S sundberg84

                              You are correct, it should look like this:
                              b1a9bc0b-987e-4592-b470-e546a9fa744b-image.png I will update this to the final version. Can you comfirm you have 3.3v on the RFM module?

                              I will try with both #defines - that might work! Thanks for that.

                              One thing to do (quickfix) if you want to use it as a serial gateway is to cut the pinheaders for all SPI channels. Then hardswire the SPI channels to the normal pins 10-13 instead of softSPI which is currently using. You ofcourse needs to solder them from the pinheader and not RFM module itself since you need to logic level conversion. I will give this a new go as soon as I have time. I really really want a RFM gateway over ethernet.

                              Nick WillisN Offline
                              Nick WillisN Offline
                              Nick Willis
                              wrote on last edited by
                              #18

                              @sundberg84 Yes I can confirm I see 3.3v on the RFM.
                              I'd thought about cutting the pin headers+ hard wire for hardware SPI but wanted it to work with the dupont cables first. I've tried a Mega and now an Uno but still it doesn't work. I guess either something is soldered wrong, the radio is broken or something else. Checked it all many many times so perhaps time to replace the radio.

                              1 Reply Last reply
                              0
                              • Nick WillisN Offline
                                Nick WillisN Offline
                                Nick Willis
                                wrote on last edited by
                                #19

                                Oops fixed it by remelting all the solder joints on the mini regulators. So will cut the pin headers and hard wire for a serial gateway (which I'm starting to think is a good idea anyway to keep down system latency of going via ethernet).

                                sundberg84S 1 Reply Last reply
                                0
                                • Nick WillisN Nick Willis

                                  Oops fixed it by remelting all the solder joints on the mini regulators. So will cut the pin headers and hard wire for a serial gateway (which I'm starting to think is a good idea anyway to keep down system latency of going via ethernet).

                                  sundberg84S Offline
                                  sundberg84S Offline
                                  sundberg84
                                  Hardware Contributor
                                  wrote on last edited by sundberg84
                                  #20

                                  @Nick-Willis - great to hear.
                                  By using dupont cables and "normal pinout" for RFM radio i now also get the new driver to work thanks to your input.

                                  #include <SPI.h>
                                  
                                  // Enable debug prints to serial monitor
                                  #define MY_DEBUG
                                  
                                  // Enable and select radio type attached
                                  
                                  #define MY_RADIO_RFM69
                                  #define MY_RFM69_NEW_DRIVER
                                  #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                                  #define MY_IS_RFM69HW
                                  
                                  //#define MY_SOFTSPI
                                  //#define MY_SOFT_SPI_SCK_PIN A0
                                  //#define MY_SOFT_SPI_MOSI_PIN A1
                                  //#define MY_SOFT_SPI_MISO_PIN A2
                                  
                                  //#ifndef MY_RF24_CE_PIN
                                  //#define MY_RF24_CE_PIN 5
                                  //#endif
                                  //#ifndef MY_RF24_CS_PIN
                                  //#define MY_RF24_CS_PIN 6
                                  //#endif
                                  
                                  #define MY_SIGNING_ATSHA204
                                  #define MY_SIGNING_ATSHA204_PIN A3
                                  #define MY_SIGNING_REQUEST_SIGNATURES
                                  #define MY_SIGNING_WEAK_SECURITY 
                                  
                                  // Enable serial gateway
                                  #define MY_GATEWAY_SERIAL
                                  
                                  #include <MySensors.h>
                                  
                                  void setup()
                                  {
                                      // Setup locally attached sensors
                                  }
                                  
                                  void presentation()
                                  {
                                      // Present locally attached sensors
                                  }
                                  
                                  void loop()
                                  {
                                      // Send locally attached sensor data here
                                  }
                                  
                                  ⸮S[0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                  0;255;3;0;9;108 TSM:INIT
                                  0;255;3;0;9;111 TSF:WUR:MS=0
                                  0;255;3;0;9;114 TSM:INIT:TSP OK
                                  0;255;3;0;9;116 TSM:INIT:GW MODE
                                  0;255;3;0;9;119 TSM:READY:ID=0,PAR=0,DIS=0
                                  0;255;3;0;9;123 MCO:REG:NOT NEEDED
                                  0;255;3;0;14;Gateway startup complete.
                                  0;255;0;0;18;2.3.2
                                  0;255;3;0;9;128 MCO:BGN:STP
                                  0;255;3;0;9;135 MCO:BGN:INIT OK,TSP=1
                                  0;255;3;0;9;138 TSM:READY:NWD REQ
                                  0;255;3;0;9;145 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                  

                                  IMG_20200730_172146.jpg

                                  But with SofSPI engaged - not working-

                                  0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                  0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                  0;255;3;0;9;277 TSM:INIT
                                  0;255;3;0;9;279 TSF:WUR:MS=0
                                  0;255;3;0;9;282 !TSM:INIT:TSP FAIL
                                  0;255;3;0;9;285 TSM:FAIL:CNT=1
                                  0;255;3;0;9;288 TSM:FAIL:DIS
                                  0;255;3;0;9;290 TSF:TDI:TSL
                                  
                                  • Continuity on all logic level converters are OK
                                  • Not much traffic at all from the UNO in SPI. I guess the intial contact with the radio is faulty so thats why.

                                  It must be either connection Uno > Logic Level Shifter > Radio, code / defines or softwareSPI not working.

                                  sundberg84S 1 Reply Last reply
                                  0
                                  • sundberg84S sundberg84

                                    @Nick-Willis - great to hear.
                                    By using dupont cables and "normal pinout" for RFM radio i now also get the new driver to work thanks to your input.

                                    #include <SPI.h>
                                    
                                    // Enable debug prints to serial monitor
                                    #define MY_DEBUG
                                    
                                    // Enable and select radio type attached
                                    
                                    #define MY_RADIO_RFM69
                                    #define MY_RFM69_NEW_DRIVER
                                    #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                                    #define MY_IS_RFM69HW
                                    
                                    //#define MY_SOFTSPI
                                    //#define MY_SOFT_SPI_SCK_PIN A0
                                    //#define MY_SOFT_SPI_MOSI_PIN A1
                                    //#define MY_SOFT_SPI_MISO_PIN A2
                                    
                                    //#ifndef MY_RF24_CE_PIN
                                    //#define MY_RF24_CE_PIN 5
                                    //#endif
                                    //#ifndef MY_RF24_CS_PIN
                                    //#define MY_RF24_CS_PIN 6
                                    //#endif
                                    
                                    #define MY_SIGNING_ATSHA204
                                    #define MY_SIGNING_ATSHA204_PIN A3
                                    #define MY_SIGNING_REQUEST_SIGNATURES
                                    #define MY_SIGNING_WEAK_SECURITY 
                                    
                                    // Enable serial gateway
                                    #define MY_GATEWAY_SERIAL
                                    
                                    #include <MySensors.h>
                                    
                                    void setup()
                                    {
                                        // Setup locally attached sensors
                                    }
                                    
                                    void presentation()
                                    {
                                        // Present locally attached sensors
                                    }
                                    
                                    void loop()
                                    {
                                        // Send locally attached sensor data here
                                    }
                                    
                                    ⸮S[0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                    0;255;3;0;9;108 TSM:INIT
                                    0;255;3;0;9;111 TSF:WUR:MS=0
                                    0;255;3;0;9;114 TSM:INIT:TSP OK
                                    0;255;3;0;9;116 TSM:INIT:GW MODE
                                    0;255;3;0;9;119 TSM:READY:ID=0,PAR=0,DIS=0
                                    0;255;3;0;9;123 MCO:REG:NOT NEEDED
                                    0;255;3;0;14;Gateway startup complete.
                                    0;255;0;0;18;2.3.2
                                    0;255;3;0;9;128 MCO:BGN:STP
                                    0;255;3;0;9;135 MCO:BGN:INIT OK,TSP=1
                                    0;255;3;0;9;138 TSM:READY:NWD REQ
                                    0;255;3;0;9;145 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                    

                                    IMG_20200730_172146.jpg

                                    But with SofSPI engaged - not working-

                                    0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                    0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGAA--,FQ=16,REL=255,VER=2.3.2
                                    0;255;3;0;9;277 TSM:INIT
                                    0;255;3;0;9;279 TSF:WUR:MS=0
                                    0;255;3;0;9;282 !TSM:INIT:TSP FAIL
                                    0;255;3;0;9;285 TSM:FAIL:CNT=1
                                    0;255;3;0;9;288 TSM:FAIL:DIS
                                    0;255;3;0;9;290 TSF:TDI:TSL
                                    
                                    • Continuity on all logic level converters are OK
                                    • Not much traffic at all from the UNO in SPI. I guess the intial contact with the radio is faulty so thats why.

                                    It must be either connection Uno > Logic Level Shifter > Radio, code / defines or softwareSPI not working.

                                    sundberg84S Offline
                                    sundberg84S Offline
                                    sundberg84
                                    Hardware Contributor
                                    wrote on last edited by sundberg84
                                    #21

                                    I have now tested all SPI lines and its logic level converter individually.
                                    To be absolutely sure the hardware worked, I desoldered the radio and wrote a arduino program sending 5v in 5 sek over the same sofwareSPI lines and 0V over 5 sek - all behaved correctly, 3.3v and 0V.

                                    I also swapped radio, but same same...

                                    Not really sure how to proceed. I need to get the softwareSPI working or else I cant use it as a ethernet gateway.

                                    Is there someone here that got RFM gateway working with softwareSPI?
                                    I dont think its the hardware anymore...
                                    Code:

                                    #include <SPI.h>
                                    
                                    // Enable debug prints to serial monitor
                                    #define MY_DEBUG
                                    
                                    // Enable and select radio type attached
                                    
                                    #define MY_RADIO_RFM69
                                    #define MY_RFM69_NEW_DRIVER
                                    #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                                    //#define MY_IS_RFM69HW
                                    
                                    #define MY_SOFTSPI
                                    #define MY_SOFT_SPI_SCK_PIN 14
                                    #define MY_SOFT_SPI_MISO_PIN 16
                                    #define MY_SOFT_SPI_MOSI_PIN 15
                                    
                                    #define MY_RFM69_CS_PIN 6
                                    #define MY_RFM69_IRQ_PIN 2
                                    
                                    #define MY_SIGNING_ATSHA204
                                    #define MY_SIGNING_ATSHA204_PIN A3
                                    #define MY_SIGNING_REQUEST_SIGNATURES
                                    #define MY_SIGNING_WEAK_SECURITY 
                                    
                                    // Enable serial gateway
                                    #define MY_GATEWAY_SERIAL
                                    
                                    #include <MySensors.h>
                                    
                                    void setup()
                                    {
                                        // Setup locally attached sensors
                                    }
                                    
                                    void presentation()
                                    {
                                        // Present locally attached sensors
                                    }
                                    
                                    void loop()
                                    {
                                        // Send locally attached sensor data here
                                    }
                                    
                                    sundberg84S 1 Reply Last reply
                                    0
                                    • sundberg84S sundberg84

                                      I have now tested all SPI lines and its logic level converter individually.
                                      To be absolutely sure the hardware worked, I desoldered the radio and wrote a arduino program sending 5v in 5 sek over the same sofwareSPI lines and 0V over 5 sek - all behaved correctly, 3.3v and 0V.

                                      I also swapped radio, but same same...

                                      Not really sure how to proceed. I need to get the softwareSPI working or else I cant use it as a ethernet gateway.

                                      Is there someone here that got RFM gateway working with softwareSPI?
                                      I dont think its the hardware anymore...
                                      Code:

                                      #include <SPI.h>
                                      
                                      // Enable debug prints to serial monitor
                                      #define MY_DEBUG
                                      
                                      // Enable and select radio type attached
                                      
                                      #define MY_RADIO_RFM69
                                      #define MY_RFM69_NEW_DRIVER
                                      #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
                                      //#define MY_IS_RFM69HW
                                      
                                      #define MY_SOFTSPI
                                      #define MY_SOFT_SPI_SCK_PIN 14
                                      #define MY_SOFT_SPI_MISO_PIN 16
                                      #define MY_SOFT_SPI_MOSI_PIN 15
                                      
                                      #define MY_RFM69_CS_PIN 6
                                      #define MY_RFM69_IRQ_PIN 2
                                      
                                      #define MY_SIGNING_ATSHA204
                                      #define MY_SIGNING_ATSHA204_PIN A3
                                      #define MY_SIGNING_REQUEST_SIGNATURES
                                      #define MY_SIGNING_WEAK_SECURITY 
                                      
                                      // Enable serial gateway
                                      #define MY_GATEWAY_SERIAL
                                      
                                      #include <MySensors.h>
                                      
                                      void setup()
                                      {
                                          // Setup locally attached sensors
                                      }
                                      
                                      void presentation()
                                      {
                                          // Present locally attached sensors
                                      }
                                      
                                      void loop()
                                      {
                                          // Send locally attached sensor data here
                                      }
                                      
                                      sundberg84S Offline
                                      sundberg84S Offline
                                      sundberg84
                                      Hardware Contributor
                                      wrote on last edited by sundberg84
                                      #22

                                      What im noticing is that when I connect the radio, the IRQ line on D2 is 1.0v when high and not 3.3v. Anyone who knows this is normal behaviour? Same with two different (and comfirmed working) radios. SPI logic level converter is comfirmed working and changed with same behavoir.

                                      Edit > This is the same using normal pins and does not have anything to do with SPI. It works when not using softSPI and IRQ has this low voltage...

                                      1 Reply Last reply
                                      0
                                      • sundberg84S Offline
                                        sundberg84S Offline
                                        sundberg84
                                        Hardware Contributor
                                        wrote on last edited by sundberg84
                                        #23
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • sundberg84S Offline
                                          sundberg84S Offline
                                          sundberg84
                                          Hardware Contributor
                                          wrote on last edited by
                                          #24

                                          Anyone good with SPI channel analysis?

                                          Hardware SPI (Looks great):
                                          3de4dd2e-0577-48d3-9d1c-10742605ee74-image.png

                                          Software SPI (Same setup, just changed code and pins).
                                          a5279a91-af78-4d0f-966d-622c03c377aa-image.png

                                          In the first, I can clearly see MOSI and MISO communicating on 5/6. Enable on 7.
                                          Software SPI does not make any sense.

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


                                          23

                                          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