Problem with RFM12B using SPI interface

Hello,

I am using two RF12B dip tranceivers http://www.hoperf.com/upload/rf/RF12B.pdf in order to establish communication between my robot and a remote control. The robot has an Arduino UNO R3 and the remote control has an Arduino Pro Mini for 5V. Since both these devices have their operating voltage at 5V and the tranceivers have 3V, I am using two logic level converters https://www.sparkfun.com/products/8745 for the signals and a 3,3V voltage regulator for the Arduino Pro Mini 5V since it doesn’t have a built in voltage regulator. The code that I am using (from the examples in the library) is

// Serial data over RF12 demo, works in both directions
// 2009-04-17 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

#include <JeeLib.h>
#include <RF12sio.h>

RF12 RF12;

void setup() {
    Serial.begin(9600);
    Serial.print("\n[rf12serial]");
    rf12_config();
}

void loop() {
    if (Serial.available())
        RF12.send(Serial.read());
    
    if (RF12.poll())
        Serial.print(RF12.read());
}

with the RF12 library from the JeeLabs community, https://github.com/jcw/jeelib. Unfortunately, when I run both programs at the same time and I send a message on the Serial from one of them,the other one doesn’t receive anything.

I looked at the examples on the site and example code is a bit different.

#include <Ports.h>
#include <RF12.h>
#include <RF12sio.h>

RF12 RF12;

void setup() {
    Serial.begin(9600);
    Serial.print("\n[rf12serial]");
    rf12_config();
}

void loop() {
    if (Serial.available())
        RF12.send(Serial.read());
    
    if (RF12.poll())
        Serial.print(RF12.read());
}

I got this from http://jeelabs.org/pub/snapshots/RF12.zip.

Also the site (http://jeelabs.org/2009/02/10/rfm12b-library-for-arduino/) says:

"
on one unit, type “0i 0i 1i” to set its node ID to 1
on the other, type “0i 0i 2i” to set its node ID to 2
send a test packet of 7x bytes by typing “s” ( = 0…9)
you should see the test packet on the other node
use “a” to send a test packet and request an ack"

Have you performed this initialisation?
Follow the setup instructions in the README.txt in the zip file.

Check the wiring given on the site (http://jeelabs.org/2009/02/10/rfm12b-library-for-arduino/) but yours will be a little different due to the level shifters. MISO and IRQ are inputs to the Atmega from the RFM12 and therefore do not need to be shifted. They run at 3.3 volts but that is plenty to record a ‘1’ on the input of the 5 volt Atmega. (The other three connections (signals from the Atmega to the RFM12) need to be downshifted to the 3.3v of the RFM12). I have used the Sparkfun level shifters but on the RFMs prefer to run three 1.8k/3.3k voltage dividers for simplicity and trouble shooting.

Its unlikely to be a problem, but running the 5v pro Mini at 3.3 volts if the oscillator is running at 16 Mhz is beyond the spec and may be unreliable. Having said that I have not had problems running 168s and 328s at 3.3v and 16 Mhz.