Project

General

Profile

Using Jeelink V3 as Rfm12Pi

Added by hatfieldr about 5 years ago

Hi
I am trying to set up my Ubuntu laptop using a Jeelink V3 at 433 Mhz to run software which is currently running on an Rpi with an RFM12Pi board
The software runs fine on the RPi but on the Laptop I cant make it communicate properly with the Jeelink
Which sketch should I load onto the Jeelink? (and what modifications do I need to make?) I have tried RF12_demo https://github.com/jcw/jeelib/tree/master/examples/RF12/RF12demo (changing baud rate to 9600, which is the rate the software uses) and the sketch which is currently running on the RFM12Pi https://github.com/mharizanov/RFM2Pi/blob/master/firmware/RF12\_Demo\_atmega328/RF12\_Demo\_atmega328.ino but neither of these work. The software recognises the Jeelink (on /dev/ttyUSB0) but it fails to configure it correctly & does not receive the packets correctly

Any ideas?

Richard


Replies (15)

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

hatfieldr

Does “dmesg” show an FTDI device being recognised?
Also, there are a couple of places where the baud rate is set depending on processor:

#else
#define TINY        0
#define SERIAL_BAUD 57600   // adjust as needed
#define DATAFLASH   0       // set to 0 for non-JeeLinks, else 4/8/16 (Mbit)
#define LED_PIN     9       // activity LED, comment out to disable
#endif

I guess you changed the one above - the 57600 to 9600?

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

Hi
The FTDI device is recognised (I use the same laptop for programing Arduinos)
I have set the baud rate to 9600
The software communicates with the RFM12Pi on the Pi but not with the JeeLink on the Laptop
I am still not sure which sketch I should have on the JeeLink & whether there are any other changes I should make apart from the baud rate?

Richard

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

The sketch from the latest library will be fine. Does the RFM12Pi based software connect to the /dev/ttyAMA0 port?

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

What is the software you are trying to run, have you tried something like:

screen /dev/ttyUSB0 9600

on the laptop?

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

Yes but the Jeelink is not setup correctly (Frequency, Nodeid) & received packets cannot be decoded
There are 2 latest sketches one for the RF12_demo & one for the RFM12Pi still not sure which one to use?

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

using
screen /dev/ttyUSB0 9600

It would appear it is set to the wrong frequency 868 MHz not 433MHz

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

Those are the default values, set the values you need (“8b”) and these will be saved for subsequent restarts.

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

hatfieldr wrote:
> There are 2 latest sketches one for the RF12_demo & one for the RFM12Pi still not sure which one to use?
I guess it should be the RF12_demo program since the RFM12Pi program probably drives the radio hardware directly.

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

JohnO wrote:
> Those are the default values, set the values you need (“8b”) and these will be saved for subsequent restarts.

That should be “4b” for your hardware.

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

I have set it to 433Mhz using screen but this should have been done from the software Group & node id are also correct
It is still not decoding received packets
Richard

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

Is there a link to your RF12_demo program?

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

the one I am using is https://github.com/jcw/jeelib/tree/master/examples/RF12/RF12demo

The unit is now transmitting (correctly) but not receiving.

RE: Using Jeelink V3 as Rfm12Pi - Added by JohnO about 5 years ago

I appear to be confused as I understand it you are running the https://github.com/jcw/jeelib/tree/master/examples/RF12/RF12demo sketch on your JeeLink which is connected to your laptop.
You are also running a program on your laptop the reads and writes a data stream to this Jeelink. This program is similar to a program you are able to run on your RasPi that connects to the RFM12Pi hardware.

I would like to know which program you are running on the laptop while you are running the RF12Demo sketch on your JeeLink. This is the program that you want to receive information from the JeeLink and from your last post this program is able to send information to the JeeLink for transmission.

RE: Using Jeelink V3 as Rfm12Pi - Added by hatfieldr about 5 years ago

Hi John
Many thanks for your help, the problem is now solved!
The problem was with the software linking to the radio (emonhub from OEM)
The first version of this linked fine with the RFM12Pi firmware (for which it was developed) but not the RF12_demo
Apparently the RF12_demo is sensitive to the suffix ‘OK’ which was screwing up the receive packets
I have now upgraded to the latest edition of the emonhub software which is RF12_demo friendly
The problem was that hardly anyone had tried to use emonhub with a Jeelink (loads of people are using it on the Pi)
It works fine on the Pi so I thought the problem was with the Jeelink.
The solution came from the developer of emonhub

Thanks for your help
Regards
Richard

    (1-15/15)