Still searching for a working Ethernet GW with RFM69



  • Hallo,

    I stil ltry to setup an ethernet gateway with arduino nano, w5100 or w5550 (both are in my stock) and a RFM69 Modul.
    It is possible, that someone post his sketch and the wiering. I am despairing. It will not working 😞

    Thank you and grettings from Germany.
    Sascha


  • Hardware Contributor

    Hello

    have you taken a look at the docs on main site?

    In case, those docs will be helpful 😉



  • Yes I do, but some PINs you cant get twice and PIN 10 ist for the W5100 reserverd.
    ther is no discription how to connect RFM69 und W5100.
    I cant get it to work and ask for a working sketch with Pinout.

    BR
    Sascha



  • Is this a SoftSPI problem (see https://forum.mysensors.org/topic/1810/no-softspi-support-for-rfm69)?

    Perhaps using the "normal" SPI-PINs for both modules in parallel may help, but don't forget to levelshift these and you may have to enable CS-PIN before trying to communicate via the WS5100. With some other SPI device, the following worked in a nRF setup at least in my first tests (CS1=10):

    void before() {
      pinMode (CS1, OUTPUT);
    digitalWrite(CS1, HIGH);
    }
    

    Perhaps this is better placed in preHwInit() (?).


  • Admin

    @Snobs
    W5100 does not like to share the SPI bus with other devices, as it doesn't tri-state the MISO line when you disable it. This is why we use softspi for the NRF module when using W5100.

    I can't remember if someone actually have made softspi available for the RFM69, or if it is still a work in progress.. If it's still a work in progress, the easiest solution is to get a Sensebender Gateway, as stated by @scalz


  • Hero Member

    T get the Ethernet GWworking with RFM69 please check out the instruktionsfrom @jpaulin from here -> https://forum.mysensors.org/topic/5109/solved-rfm69-based-nodes-unable-to-report-lib-version/25


  • Hero Member

    @Snobs did you manage to get this to work?



  • Nope, sorry for late response. Need a litte space, otherwise I throw it before frustration in the garbage.
    I`ll edit the w5100.h file and it looks like so

     #else
     /*inline static void initSS()    { DDRB  |=  _BV(2); };
     inline static void setSS()     { PORTB &= ~_BV(2); };
     inline static void resetSS()   { PORTB |=  _BV(2); }; */
     inline static void initSS()    { DDRB  |=  _BV(2); };
     inline static void setSS()     { cli(); PORTB &= ~_BV(2); };
     inline static void resetSS()   { PORTB |=  _BV(2); sei(); };
    #endif
    

    It doesn't matter for me wich pin it is, so I`ll try pin 10 for w5100 and with

    #define MY_RF69_SPI_CS 7
    

    Switch default pin D10 from RFM68 to D7 and connect NSS from w5100 do D10.

    First it looks good, but by any msg from a sending/working sensor the device restart and after some retries.

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.100.254
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    0;255;3;0;9;TSF:MSG:SEND,0-0-11-11,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=2,c=1,t=0,pt=7,l=5,sg=0:22.3
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.100.254
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=3,c=1,t=38,pt=7,l=5,sg=0:3.4
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.100.254
    

    I use a FHEM Controller in germany with seperate other device like LaCrosse or Homematic.
    Some ideas why it restart and only the msg is showing on serial output in IDE?

    Thanks for help.
    BR
    Sascha



  • Seeting up an blank, clean, new Domoticz Controller. Same Error if receiving data.

    2017-03-09 19:33:29.101 MySensors: TCP/IP Worker stopped...
    2017-03-09 19:33:30.103 MySensors: trying to connect to: 192.168.100.254:5003
    2017-03-09 19:33:31.104 MySensors: connected to: 192.168.100.254:5003
    2017-03-09 19:33:40.106 MySensors: Connection reset!
    2017-03-09 19:33:40.106 TCP: Reconnecting in 30 seconds...
    2017-03-09 19:34:10.110 TCP: Reconnecting...
    2017-03-09 19:34:11.110 MySensors: connected to: 192.168.100.254:5003
    2017-03-09 19:34:20.112 MySensors: Connection reset!
    2017-03-09 19:34:20.112 TCP: Reconnecting in 30 seconds... 
    


  • It is working!

    The trick was, downgrade the AVR to Version to 1.6.11. After that the erstart/reboot dosent happen and it work 🙂
    Thank you for your support!

    BR
    Sascha


  • Hero Member

    Nice! Greate that you found the solution to the rebooting on your own. Many have encountered the issue. Now we are at least 3 persons with a working RFM69 Ethernet GW.



  • Yes, the first 12 hours it is working without disconnect or reboot. So I tought post your result, hope that helps other people with the same problem and give back some information to this great forum 🙂

    BR
    Sascha



  • Hello,
    For those like me that have followed the intructions but cannot have their ethernet gateway to work with RFM69, that page may explain the source of the problem : some W5100 hardware modules do not have the logic allowing other SPI device to share the same bus (time to solder...).
    Hope that can help others, saving them hours of tests and failures...



  • Started some tests to drive W5100 Funduino module SPI_EN pin by a dedicated arduino output as it seems to be the goal of MY_W5100_SPI_EN but after some more failures (a LED on MY_W5100_SPI_EN pin does not blink as I would expect), I realize that I do not see any use of that pin definition in MQTT, only in the EthernetGateway sketch... Am I missing something ?
    For those who manage to get their W5100 and RFM69 sharing the same SPI but ( @Snobs , @jpaulin , @korttoma ) what W5100 modules are you using ? Do you know how the Wiznet SPI_EN pin is driven (do you have the module schematic) ?


  • Hero Member

    I am using this module with an arduino pro mini

    #define MY_RADIO_RFM69
    #define MY_RFM69_FREQUENCY RF69_433MHZ
    #define MY_RF69_SPI_CS 9
    // Enable gateway ethernet module type 
    #define MY_GATEWAY_W5100
    


  • Thanks @korttoma for your feedback ! Looks like the one I use. Did you manage to get this hardware working with MQTT sketch ?


  • Hero Member

    @rene_2k2 sorry I do not use MQTT



  • It is possible to use RFM69 radio via SoftSPI which allow to build gateway with W5100 or ethernet shield. You need to change RFM69 driver and MyConfig.h configuration file.
    I put modified these files at github repository: https://github.com/gieemek/RFM69_softSPI-for-MySensors-2.1.1
    You can find instruction how to prepare gateway sketch at this repository too.
    My gateway (as MQTT client) with ethernet shield and RFM69 radio via SoftSPI is working for 10 days without any problems.


Log in to reply
 

Suggested Topics

  • 87
  • 8
  • 1
  • 10
  • 7
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts