Is it possible to connect two different RF tranceivers on Raspberry Pi 2?

So far what I have tried is to connect them in parallel on the SPI pins, but the rfm69w is on CE1 and nRF24 on CE0. I have made two different programms that make the modules "listen", which work as expected when executed one at a time. However, when I execute them at the same time on different terminal windows they don't work. They receive 0s and or the communication doesn't work at all.

Any ideas on how I can make the RPi support functionality on both RF modules simultaneously?

Thank you

| improve this question | | | | |
  • I'm not familiar with nrf24l01. Do they operate on different frequencies? If not how do they prevent mutual interference? – joan Nov 12 '15 at 15:11
  • The rfm69w works at 868MHz, while the nRF24L01+ at 2.4GHz. – evgi9 Nov 12 '15 at 15:14
  • So it should work. You can only talk to one SPI device at a time. Are the messages atomic, i.e. is it safe to have calls to CE1 being intermingled with CE0? The SPI driver will be happy to do so. Will the radio devices be happy to be deselected at the end of each SPI message. – joan Nov 12 '15 at 15:25

Apparently the CE pins of the SPI are not supposed to be on at the same time. So what I tried to do is to merge the two programs into one. This unified program has some basic configuration in the beginning for both the RF modules, and a loop that checks if there is new packet at either modules, one loop checks the rf24, next loop the rfm69 etc... Although it is simple to code, I had some problems with this implementation, too. They turned out to be caused by the version of the kernel that my raspberry had at the time (4.1.13). So I downgraded it to 3.18.16 using this command that I found in a german forum http://www.forum-raspberrypi.de/Thread-tutorial-firmware-u-kernel-downgrade-mit-rpi-update

rpi-update 33a6707cf1c96b8a2b5dac2ac9dead590db9fcaa

And problem solved! My Raspberry Pi can now "listen" to packets from both the RF modules that I use.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.