RFM69 support on ethernet gateway



  • Hi,

    I have managed to get the serial gateway working with RFM69 modules using latest development baseline. Does anyone know whether the Ethernet gateway is working yet with RFM69? I can't even get it to initialise properly.

    Thanks



  • As far as I can tell, this is because softspi has not been implemented for the Rfm69. This means when using wiznet ethernet shield, the library cannot initialise the radio and hangs up. Bug report logged



  • OK, so I have tried implementing the SOFTSPI, but have not had any luck.

    I did the following:

    Remove any and all things related to RF24 as I won't be using it.
    //////////////////////////////////////////////
    Changed MyConfig.h to include:

    #define SOFTSPI
    #ifdef SOFTSPI
    // Define the soft SPI pins used for RF69 radio
    const uint8_t SOFT_SPI_MISO_PIN = 16;
    const uint8_t SOFT_SPI_MOSI_PIN = 15;
    const uint8_t SOFT_SPI_SCK_PIN = 14;
    const uint8_t SPI_MODE = 0;
    #define RF69_SPI_CS 6 // SS is the SPI slave select pin, for instance D10 on atmega328

    #else

    #define RF69_SPI_CS SS//SS // SS is the SPI slave select pin, for instance D10 on atmega328

    #endif
    //////////////////////////////////////////////////
    Change RF69.h to include:

    #define RF69_MAX_DATA_LEN 61

    #if defined SOFTSPI
    #include <DigitalIO.h>
    #else
    #include <SPI.h>
    #endif

    -> lower down

    class RFM69 {

    private:
    #ifdef SOFTSPI
    SoftSPI<SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN,SPI_MODE> spi;
    #define _SPI spi
    #else
    #define _SPI SPI
    #endif

    ////////////////////////////
    changed RFM69.cpp:

    • changed all SPI.xxx calls in file to _SPI.xxx
      ////////////////////////////////////////

    Everything works if I NOT #define SoftSPI and connect radio to normal SPI pins without ethernet shield.
    When I #define softspi and move radio to defined pins, the radio does not initialise.

    Maybe one of you clever people can help.

    Thanks


  • Admin

    Did you include MyConfig in your RF69.h



  • @hek yes I did



  • Hello mrmin24, did you succeed with the Ethernet gateway and RFM69 ?
    Thanks,

    David.



  • Hello mrmin24, did you succeed with the Ethernet gateway and RFM69 ?



  • Hello ansh, I failed and finally choose the serial gateway !


  • Hardware Contributor

    See this thread: http://forum.mysensors.org/topic/1810/no-softspi-support-for-rfm69/2

    There is a post in there w/ a github repository to a SoftSPI version of the RFM69 code posted by @gieemek. There is also some links I posted there to (especially this one: https://lowpowerlab.com/forum/index.php/topic,838.0) where the LowPowerLab folks have implemented SoftSPI support. It might be worth trying to integrate their updated code into the MySensors.


  • Admin

    Yes, would be great if someone could help out with a SoftSPI patch/PR for the dev-branch.



  • I tried the SoftSPI without success !! As I am MySensors newbie I decided to get more experience on setting my network (Some nodes with serial gateway connected to Jeedom using the current branch) and then I will come back with the dev branch.
    I am not to far as the serial gateway is working fine with RFM69 and nodes are working with Arduino bootloader.

    @hek: I think I tried everithing (3 differrent lib for softspi or hard spi) but the debug mode need to be improved to understand where is the problem. It's just what I think, I could be wrong 😉


Log in to reply
 

Suggested Topics

  • 1
  • 1
  • 6
  • 1
  • 5
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts