Author Topic: Can RFM69 communicate with RFM12B? [YES!]  (Read 88297 times)

Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Can RFM69 communicate with RFM12B? [YES!]
« on: November 26, 2013, 01:51:02 PM »
Sorry second question in a row from me today  ;D
I was wondering if it's possible to send data with RFM69 and receive it with RFM12b or vice versa?  i.e. between Moteino R2 and R3?
« Last Edit: December 17, 2013, 09:17:26 PM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Can RFM69 communicate with RFM12b?
« Reply #1 on: November 26, 2013, 07:49:48 PM »
UPDATE: It's possible! See this entry below!

Short answer is no, not with my original libraries. I think this was asked before in the forum. I did not spend too much time trying to get the 2 radios to talk to each other, just because they are so different. But not to say it's impossible.
There's a great post by kolumkilli who made a bridge between 2 such networks: http://lowpowerlab.com/forum/index.php/topic,204.0.html

I am moving towards RFM69 since they just work better, have much better range. I have yet to replace all my RFM12B nodes to RFM69, but slowly doing that.
« Last Edit: December 17, 2013, 09:29:46 PM by Felix »

Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Re: Can RFM69 communicate with RFM12b?
« Reply #2 on: November 26, 2013, 08:38:18 PM »
Thanks! I'll check it out. I think this might be of interest to some as many people already own R2. I've yet to make a switch to RFM69 with my Xronos clock since I made so many PCBs and got boatload of RFM12Bs :) 

NixHydra

  • NewMember
  • *
  • Posts: 41
Re: Can RFM69 communicate with RFM12b?
« Reply #3 on: November 27, 2013, 01:06:43 AM »
@Lensdigital,

   Thanks to Felix writing a library for the various flavours of Hope RFM69 wireless modules, I've purchased five or so R4 Moteinos equipped with Hope RFM69HW wireless modules, to play with. Have to admit, from the testing I've done so far the RFM69s have got to be the way to go ... so much better ... in so many ways!! The fact that the RFM69CW flavour is a footprint/pin compatible replacement for the RFM12B, would seem to make it an ideal upgrade choice for any older RFM12Bs. I intend to use the R4 Moteinos equipped with the RFM69HWs as remote sensor nodes, especially since the inclusion of the 25X40CL flash chip on the R4 Moteinos, enable wireless reflashing of the R4 Moteino ATMEGA328s.

   This might be of interest, then again, maybe not? Couldn't help myself, so cobbled together an Arduino footprint RFM69HW pcb to use as a base station, to listen to the Moteino R4 sensor nodes. Please see the following link for details.

http://jeelabs.net/boards/6/topics/2934?r=3179#message-3179

cheers,


 

   

MikesTechBlog

  • NewMember
  • *
  • Posts: 21
    • Mike's Tech Blog
Re: Can RFM69 communicate with RFM12b?
« Reply #4 on: December 12, 2013, 11:07:05 AM »
Since I have about a dozen Motenio's with the RFM12b module, which is going away, and the RFM12b can't communicate with the RFM69, my thought is to have two networks. One with RFM12b's for the legacy devices, and one with RFM69.

Like most people here, I too am using a Raspberry Pi for the gateway to communicate. The problem with my idea is that there is only one RS-232 port on the Raspbi.

I was wondering if anyone has taken a Motenio-USB with a RFM69 and set up a second gateway / network using a USB port on the Raspbi as a second serial port. Then if a Motenio with a RFM12b wants to communicate to a Motenio with a RFM69, it does so via the raspbi through the python script.

This way my legacy RFM12b Motenio's are still useful. Thoughts anyone?
My Tech Blog:

Mike's Tech Blog

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Can RFM69 communicate with RFM12b?
« Reply #5 on: December 12, 2013, 11:24:22 AM »
RFM12B is not really going away, at least not YET. But how much faith can we have? HopeRF might discontinue anytime without owing anyone an explanation. And that's completely fair.

Of course that's not to say people should throw away their RFM12B based projects. There's ways to still use those radios and bridge them together etc.

For an example on how to bridge the two see this excellent post by kolumkilli: http://lowpowerlab.com/forum/index.php/topic,204.0.html

Another thing that comes to mind is to piggy back a RFM12B-Moteino-Gateway on top of a RFM69-Moteino-Gateway, and bridge them through a software serial port. I know this is not ideal and all that but I have not seen any issues with software serial in my own share of use. I'm sure it can be abused and made to fail since it's not a hardware UART, but I'm sure the same is true to an extent about a true UART.

So there you go .. 2 options to start with. I'm sure there's other ways.

jbeale

  • Jr. Member
  • **
  • Posts: 62
Re: Can RFM69 communicate with RFM12b?
« Reply #6 on: December 12, 2013, 02:44:14 PM »
The problem with my idea is that there is only one RS-232 port on the Raspbi.
The R-Pi can easily be outfitted with several serial ports via USB-serial adaptors. These cost under $2 shipped.

http://www.ebay.com/itm/USB-PL2303HX-To-RS232-TTL-Auto-Converter-Adapter-Controller-Module-for-Arduino-/360792330927

timw

  • NewMember
  • *
  • Posts: 3
Re: Can RFM69 communicate with RFM12b?
« Reply #7 on: December 12, 2013, 06:35:41 PM »
It is possible to get the RFM69 and RFM12Bs to talk to each other. You have to tweak the RFM12B code a bit so it matches up with the CRC algorithm of the RFM69, and modify the payload structure (which is different in the RFM69 library), but otherwise they're good to go. I have a mixed network in my home using both.

I modified the original library code which can be found on GitHub:

https://github.com/aanon4/RFM12B
https://github.com/aanon4/RFM69

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Can RFM69 communicate with RFM12b?
« Reply #8 on: December 12, 2013, 07:10:12 PM »
Thanks for sharing - wow if that's true and you got them to talk I have to try that tonight!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Can RFM69 communicate with RFM12b?
« Reply #9 on: December 13, 2013, 07:48:05 PM »
Have tried your modded libs but I can't seem to have any data go across from RFM12B to RFM69. What frequency are the radios you tested?
I got a RFM69-915Mhz listening using the Gateway example in your modfied RFM69 library and a RFM12b-915Mhz sending with the Send example in your RFM12B library.

timw

  • NewMember
  • *
  • Posts: 3
Re: Can RFM69 communicate with RFM12b?
« Reply #10 on: December 14, 2013, 02:29:23 AM »
I have your 433 parts, so I can't try the 915 versions. On the 433 pieces I had to tweak the frequencies because the default for the RFM12B was 434 and RFM69 433 (or possibly the other way round - I forget offhand). Also, I'm not using encryption.

I will test these with your send/receive demo sketches to make sure I didnt miss anything. I actually run a star network at home, with a raw RFM69 board attached to a Raspberry Pi as the controller, and have an adaptor library which hides the radio I'm using on each sensor node.
« Last Edit: December 14, 2013, 03:28:46 AM by timw »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Can RFM69 communicate with RFM12b?
« Reply #11 on: December 14, 2013, 06:34:20 PM »
If you have a working example where a RFM12B can talk to a RFM69 (along with the libs and settings) that would be great.

timw

  • NewMember
  • *
  • Posts: 3
Re: Can RFM69 communicate with RFM12b?
« Reply #12 on: December 17, 2013, 12:41:27 AM »
Apparently I hardwired the bitrate in the RFM69 library, so you need to set the RFM12B bitrate as follows:

  radio.Initialize(NODEID, RF12_433MHZ, NETWORKID, 0, 0x7F);

You also need to disable encryption on both ends (they use different algorithms and I've not rewritten the RFM12B version because I don't use encryption at home). They should then talk to each other (currently testing the RFM69 running Struct_send and RFM12B running Receive). Not very intelligible on the console ouput, but should demonstrate them working okay.

Note: I updated my RFM12B fork on GitHut to set the default bitrate to be the same for both RFM12B and RFM69, and I now print a console message if you try to use encryption on the RFM12B.
« Last Edit: December 17, 2013, 10:05:49 AM by timw »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
It WORKS!
« Reply #13 on: December 17, 2013, 09:16:58 PM »
Yikes, it does work, RFM12B can talk to RFM69!!!

Just reloaded both libs from your github repo (https://github.com/aanon4/RFM12B & https://github.com/aanon4/RFM69) and I used the Struct_receive example for RFM69 and Struct_send example for RFM12B. So RFM12B can send data to RFM69, and I can even read the RSSI of the signal on the RFM69 end. Sweeet!

Which means those of us who have RFM12B nodes can still use them if getting new RFM69 nodes!
The only drawback at the moment is that the encryption on the two platforms is not in synch. The RFM69 has hardware 128bit AES encryption, and the RFM12B has software XXTEA encryption (https://en.wikipedia.org/wiki/XXTEA). This software encryption could easily be ported/duplicated on the RFM69 side.

Great work timw, thanks for sharing it!

MikesTechBlog

  • NewMember
  • *
  • Posts: 21
    • Mike's Tech Blog
Re: Can RFM69 communicate with RFM12B? [YES!]
« Reply #14 on: December 18, 2013, 01:00:13 AM »
Thank you timw! - And of course thank you to Felix for coming up with this whole scheme in the first place.
My Tech Blog:

Mike's Tech Blog