No softspi support for RFM69



  • It seems that the softspi functions were not implemented as part of the Rfm69 implementation and this is not mentioned anywhere as far as I can tell. There is a big difference in the Rf24.h and Rf69.h files. This means that it is not possible to use ethernet gateway with Rfm69 and wiznet module


  • Admin

    with an extra component it should be possible to use wiznet and rfm69.. you need to have something that can disable MISO line from the Wiznet chip.

    Could be a 74lvc1g125. Needs a bit more soldering / messing arround, but it's doable..

    It should also be possible to use normal SPI for the NRF together with W5100, when using the above "hack"



  • I managed to get the softspi working and will upload to Git soon


  • Hardware Contributor

    @mrmin24 Have you had a chance to upload this yet?

    FYI - It looks like the RFM69 library from lowpowerlabs might not have have been updated. Here are some threads about using an RFM69 w/ an ethernet shield over there:

    https://lowpowerlab.com/forum/index.php/topic,838.0
    https://lowpowerlab.com/forum/index.php?topic=557.0
    https://lowpowerlab.com/forum/index.php?topic=201.15

    I'm just starting to work my way through these now but if you've already got it working, that would be great. I'm very curious to see if MqttClientGateway + digital signing + RFM69 will compile down small enough to fit.



  • I was able to implement the module RFM69 on a soft spi (RFM69 only for now). It is not very complicated. If anyone is interested, I can post a description how to do this, or I can send the ready files. Unfortunately, I did not use GitHub yet and not posted files there - I'll try to do it as soon as I can.
    I use modules RFM69W and RFM69HW as radio modules. As the gate I use MySensors MQTTgateway (Arduino Mega 2560 R3 + ethernet shield + RFM69HW). Everything works pretty well and I can build an entire network of sensors based on MySensors libraries.


  • Hardware Contributor

    Thanks. Chat message sent w/ my email to get the files. I won't have time to mess with the radios until next week but then I can set up a git pull request with your changes if you like. I decided to spend the $7 and get a Mega for my gateway and duplicate your set up (except w/ the MqttClientGateway). Did you apply the ethernet shield reset fix to the mega+ethernet? More info here: http://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors/156



  • I'm using Arduino Mega in my gate because I want to add LCD display in the future . Uno has too little ram to do it.
    Now when I compile MQTTgateway sketch with my RFM69 soft spi library in the arduino ide it takes 18 838 bytes, variables 882 bytes, so this should be fit for Uno.



  • I had no problems with resetting the gate so far, but I must point out, if I have this problem.


  • Hardware Contributor

    Nice. I bought a Mega with an LCD touch screen too. I also thought it would be interesting to have a gateway that can show you messages it receives on a screen and other information.



  • OK, finally I put my library and files at GitHub repositories. You can find it at https://github.com/gieemek



  • @TD22057 said:

    Thanks. Chat message sent w/ my email to get the files. I won't have time to mess with the radios until next week but then I can set up a git pull request with your changes if you like. I decided to spend the $7 and get a Mega for my gateway and duplicate your set up (except w/ the MqttClientGateway). Did you apply the ethernet shield reset fix to the mega+ethernet? More info here: http://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors/156

    I don't need to reset my gateway after power lost (Arduino Mega 2560 + ethernet shield + RFM69HW radio) - everythng working good.



  • @gieemek said:

    I'm using Arduino Mega in my gate because I want to add LCD display in the future . Uno has too little ram to do it.
    Now when I compile MQTTgateway sketch with my RFM69 soft spi library in the arduino ide it takes 18 838 bytes, variables 882 bytes, so this should be fit for Uno.

    Ooops, I have made a mistake. My MQTTGateway.ino sketch with RFM_softSPI library compiles to 28 474 bytes, variables 1 003 bytes. Sorry for my earlier notes.


  • Hardware Contributor

    Thanks! The connection diagrams are a nice touch. I'll take a look and try it out (probably w/ the MQTTClientGateway) as soon as I can.

    How hard would it be to make a version of RFM69 that would support soft and hard spi? I haven't run diff's yet to see what your modifications were but it would be nice if this was a fork of the LowPowerLap library so Felix could fold back in to his version code. Having two versions of the same file that I have to switch between might get confusing in the future.



  • Modifications were easier than I expected, only that I am successfull (I'm not a programmer).
    For now, the program did not switching between soft and hard SPI and I fail to realize it fast - really frequently change the file is uncomfortable.
    I want to send my library to LowPowerLab to check it.
    If you are interested in further modification of this library, I can send you by mail a list of changes I made.


  • Hero Member

    @gieemek
    @TD22057
    Any chance that you ore someone else has adapted this RFM69 SoftSPI solution to the MySensors 2.0 Library version?



  • I modified MyConfig.h file and RFM69 driver to allow you build gateway (ethernet or MQTT) with W5100 ethernet and RFM69 radio modules using SoftSPI bus. You can find it at: https://github.com/gieemek/RFM69_softSPI-for-MySensors-2.1.1


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.