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. [SOLVED] Yet another RFM69HCW / W5100 ethernet gateway thread :-)

[SOLVED] Yet another RFM69HCW / W5100 ethernet gateway thread :-)

Scheduled Pinned Locked Moved Troubleshooting
22 Posts 6 Posters 6.1k 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.
  • stevebusS Offline
    stevebusS Offline
    stevebus
    wrote on last edited by
    #9

    BTW - meant to also say that I have a ENC28J60 module laying on my desk if it's easier to get it working alongside the RFM69 :-)

    Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

    Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

    1 Reply Last reply
    0
    • korttomaK Offline
      korttomaK Offline
      korttoma
      Hero Member
      wrote on last edited by
      #10

      Did you edit the w5100.h according to the instructions @jpaulin posted in the thread you linked to?

      The editing of w5100.h is different depending on with CS pin you use.
      As I use D9 for the radio

      #define MY_RF69_SPI_CS 9
      

      And pin D10 for the w5100 CS and edited the w5100.h like this:

      #else
      	  inline static void initSS()    { DDRB  |=  _BV(2); };
      	  inline static void setSS()     { cli(); PORTB &= ~_BV(2); };
      	  inline static void resetSS()   { PORTB |=  _BV(2); sei(); };
          #endif
      
      • Tomas
      1 Reply Last reply
      0
      • scalzS Offline
        scalzS Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #11

        @korttoma
        I remember i checked, in recent Mysensors lib, w5100+rfm69 on same hardware spi bus without any changes to the w5100 lib.. Isn't it working??

        tbowmoT 1 Reply Last reply
        0
        • scalzS scalz

          @korttoma
          I remember i checked, in recent Mysensors lib, w5100+rfm69 on same hardware spi bus without any changes to the w5100 lib.. Isn't it working??

          tbowmoT Offline
          tbowmoT Offline
          tbowmo
          Admin
          wrote on last edited by
          #12

          @scalz said in Yet another RFM69HCW / W5100 ethernet gateway thread :-):

          @korttoma
          I remember i checked, in recent Mysensors lib, w5100+rfm69 on same hardware spi bus without any changes to the w5100 lib.. Isn't it working??

          Depends on your W5100 module :)

          1 Reply Last reply
          1
          • scalzS Offline
            scalzS Offline
            scalz
            Hardware Contributor
            wrote on last edited by scalz
            #13

            tested it with this module https://www.itead.cc/w5100-ethernet-network-module.html and a 8Mhz/3.3v arduino mini if i remember (so no level shifting needed in my case)

            1 Reply Last reply
            0
            • korttomaK Offline
              korttomaK Offline
              korttoma
              Hero Member
              wrote on last edited by
              #14

              My RFM69 EthGW is built on the 2.1.0 version of the MySensors library and back then the w5100 lib hack was required. I don't know what the case is with current available MySensors Lib versions. And I don't have additional hardware to test this on...

              • Tomas
              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #15

                I am waiting for some new w5100 shields and rfm69hw that I'll test

                1 Reply Last reply
                0
                • stevebusS Offline
                  stevebusS Offline
                  stevebus
                  wrote on last edited by
                  #16

                  Hi guys,

                  Thanks for all the responses! I had not made any edits to the w5100.h file because a) I thought I had read they had become unnecessary, and b) I wasn't sure what exact values to use. Does the W5100 shield use pin 10 for CS? (pretty sure it uses 10 for the Ethernet module and 4 for the SD card, which I don't use, but hadn't had time to research for sure yet)... I'm using this shield, not a module, so I can't change the wiring. I've ordered the module-based W5100, but it'll be early June before I get it.

                  With that said, I wonder it it's an issue between mysensors and specifically the Adafruit breakout of the RFM69HCW? Just to test a different way, I quickly last night built a raspberry pi Ethernet gateway (so the W5100 isn't' involved) and I had the same problem with the radio (failed to init). The radio initializes and works fine with the tests here, so I believe the radios are good. They just don't seem to respond to either an Arduino-based gateway or the raspberry pi one. I've ordered a couple of 'bare bones" RFM69HCW radios to test with.

                  --Steve

                  Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                  Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                  1 Reply Last reply
                  0
                  • stevebusS Offline
                    stevebusS Offline
                    stevebus
                    wrote on last edited by
                    #17

                    Hey guys,

                    quick update: got this working, at least on the gateway side -- haven't tried hooking up a node yet, that's next... Once I confirm that works, I'll add SOLVED to the title of this. :-)

                    For the gateway, I went digging through the new driver code, looking for things to try and adding some debug writes, and found the code in RFM69_Initialise() where, if MY_RFM69_RST_PIN is defined, it will reset the radio. I already had the RST line on the RFM69HCW wired up, and had previously (with the old driver) manually added code to do it, but it didn't help...

                    But with the new driver from the dev branch (used by #define MY_RFM69_NEW_DRIVER) I just added

                    #define MY_RFM69_RST_PIN 6

                    to my sketch and now I get...

                    0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGA---,VER=2.2.0-beta
                    0;255;3;0;9;26 TSM:INIT
                    0;255;3;0;9;28 TSF:WUR:MS=0
                    0;255;3;0;9;36 TSM:INIT:TSP OK
                    0;255;3;0;9;39 TSM:INIT:GW MODE
                    0;255;3;0;9;43 TSM:READY:ID=0,PAR=0,DIS=0
                    0;255;3;0;9;46 MCO:REG:NOT NEEDED
                    IP: 192.168.0.215
                    0;255;3;0;9;1350 MCO:BGN:STP
                    0;255;3;0;9;1353 MCO:BGN:INIT OK,TSP=1
                    

                    I had read somewhere that the Adafruit breakout normally pulls RST high and supposedly resets itself at power-on, but I guess that wasn't enough... Explicitly resetting the radio seems to have done the trick and may be required for the Adafruit RFM69HCW breakout.

                    Going to see if I can get the raspberry pi GW working now, since my curiosity is piqued :-)

                    Thank you all for the help and input!

                    --Steve

                    Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                    Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                    1 Reply Last reply
                    3
                    • stevebusS Offline
                      stevebusS Offline
                      stevebus
                      wrote on last edited by
                      #18

                      Hey guys,

                      Another update... and an admission :-).

                      After playing with it some more, it looks like I mis-read the details on how the Adafruit breakout treats the reset pin. I hard connected it to ground and it now works without setting the RST_PIN define. Apparently we just need to explicitly pull the RST pin low (which makes sense). Having the 'define' set was doing that in code earlier.

                      You do have to have the new drivers, but don't have to fool with the reset pin. The GW works in both Arduino and raspberry pi now.

                      thanks for thinking through this with me.

                      Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                      Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                      1 Reply Last reply
                      1
                      • stevebusS Offline
                        stevebusS Offline
                        stevebus
                        wrote on last edited by
                        #19

                        Marking SOLVED - we are back in business. Thanks everyone!

                        Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                        Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                        1 Reply Last reply
                        0
                        • stevebusS Offline
                          stevebusS Offline
                          stevebus
                          wrote on last edited by
                          #20

                          Ok - apparently I don't know how to mark it as SOLVED :-)

                          Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                          Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

                          mfalkviddM 1 Reply Last reply
                          0
                          • stevebusS stevebus

                            Ok - apparently I don't know how to mark it as SOLVED :-)

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

                            @stevebus click edit on your fist post in this topic. At the very top in the edit view you can update the topic subject.

                            1 Reply Last reply
                            0
                            • stevebusS Offline
                              stevebusS Offline
                              stevebus
                              wrote on last edited by
                              #22

                              done! Thanks @mfalkvidd

                              Vera Edge/UI7; mysensors; Arduino's and RPIs; data posted to Azure for an IoT 'dashboard' of my house

                              Opinions expressed here are my own and do not necessarily reflect Microsoft's feelings on a given topic :-)

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


                              7

                              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