Compatibility JeeLib.h

Started by Scram, January 30, 2016, 09:52:49 AM

Scram

Hi,

i just received some Moteinos and my goal was to use  them as Nodes within my EmonCMS System (http://openenergymonitor.org).
The Gateway node on my Raspberry works with the Jeelib Demo Sketch on 868MHz in RFM12 compatible mode on a RFM69CW Module collecting the packets from all other nodes running on RFM12B modules.
The big question is now how to implement the software on the Moteino to send compatible packets. I managed to get the Jeelib Demo Sketch up and running on the Moteino but somehow the performance was horrible (rssi <-90 on 4m).  Anyway i do not really like the implementation of the Jeelib and would prefer to use the "RFM12B library" from Felix. Is it possible  to send compatible packets to the Jeelib Demo Sketch? Otherwise i would have to implement a new Gateway software to be compatible with the Emonhub :-(

emjay

@Scram,

Though Felix's RFModule driver is based on JeeLib, several key parameters are set differently and most significantly, the packet structure is different.

As an aside, I would suggest you track down why the signal strength is so low - you have the RFModule correctly matched to the ISM band you are using?

Scram

I think i finally understood my problems  ;) The JeeLib Demo sketch i was using seems to be incompatible with the RFM69HW types. It works ok with the RFM69CW in RFM12B Mode. But using it with the RFM69HW produces unpredictable behaviour. I noted that when i take a "fresh" Moteino and use it with the Demo sketch for the very first time it seems to work but once other things have been done it can happen that it doesn't send anything anymore or at least at very low levels. Probably this is because the demo sketch stores its configuration within the EEPROM once it has been configured. Setting the power level on the HW type seems to be quite different from the way it is done on the lower power types. The Jeelib does seem to be unaware of that.
I now switched over to the RFM69 library from Felix and everything works fine. I now need to decide whether i go back to EmonCMS and adapt the Arduino-RFM-Gateway code in a way that is simulates the JeeLib demo sketch behaviour so Emonhub is happy with it or i switch over completely to the Moteino Gateway architecture which is kind of nice as well. Both solutions have their Pros and Cons so i am not sure right now. Somehow i have the feeling that those guys from EmonCMS spent some more energy in tuning the framework to be "SD card friendly". Up  to now i can not really judge if that is a big difference from doing it like Felix. I think on the long run the only stable solution will be to run the RasPi from an SSD instead of the SD card. Logging to an sd card will fail one day that's for sure...