Obviously my software works well to receive messages from the radiator controllers if they are just sent sporadically – every now and then.

But the software is unable to receive sequences of messages, in case they are sent directly one after the other, without temporal gap. In fact, the Room Unit sents sequences of messages in case the temperature of a zone has to change.

Why does the software fail?

Because it tries to read one message into the 64 byte FIFO receive buffer. As it is not possible to find out how long the message will be (without decoding it), the software just reads until the 64 bytes are read. And this is fatal, as in this case the software already reads the beginning (e.g. the RF preamble of alternating “1” and “0”) from the subsequent message.


66 55 56 55 2B 2B 52 B2 AD 53 4A CD 52 B5 55 55 55 55 55 55 55 4C B5 2C AB 4B 4A B5 2C AB 32 CA B2 B5 4B 2C D2 B4 CD 59 55

What now?

  • Alternative #1: Forget to read messages in the FIFO buffer and decode after that, instead do “direct stream processing”, bit by bit ?
  • Alternative #2: Fill the FIFO buffer byte by byte, and somehow try to find out when the complete message is read, then (very quickly) process the message and receive the next message using the RF receiver. The problem is that it takes some amount of time to decode the message and send the result to the client – probably too much time so we miss the RF preamble of the subsequent message.



3 thoughts on “Disillutionment

  1. Hi Wolfgang,
    I started adding a CC1101 to a Pi a few years ago and the project was shelved, I actually replied to you back here https://www.raspberrypi.org/forums/viewtopic.php?t=58609&p=441053
    I think back then you and I were about the only ones interested in CC1101’s and I did not have the time. Long ago reformatted that particular SD card and lost my backup on a dead hard drive 😦

    Since restarting the project a few days ago and figured googling for the latest info would be the best way to start and since it is now a Rpi 2 running Jessie your comments about the kernel changes made me decide to start with your code as it appears late model and also very nicely written. I think about the only Rpi CC1101 code on the net too.. unless I am missing something.

    Anyway my project will involve receiving dozens of messages a second, so if I find a good solution to your buffering issue I will let you know what I did.
    The PIC’s I use normally have never had overflow issues, they use small packets of only 7 data bytes + the RSSI/LQ data, also addressing and broadcast. I must revisit my register details but from memory I leave Rx mode once a message is received until it is processed. Not ideal for this current application or yours by all appearances.

    So far I have added my register profile and had a bit of a play around, I am receiving packets but it is not the same format as yours yet so I have a bit of modifications to do. The socket stuff is great, I will be using that later.

    I just wanted to thank you for the awesome code base, I write in C and C++ looks great to me but I struggle to comprehend the details, so thanks for the giant leap forward.

  2. Hi Wolfgang,

    My aim is to use Openhab on my new Pi3 and talk to the temperature sensors (Lacrosse type or Oregon) and eneregy Monitor (OWL160) which booth operate on 433 or 868 MHz
    I bought a tranceiver CC1101, like this one

    it works on SPI

    my question is :
    Shoukd I use your library to get the information on the Pi3 and then to Openhab
    or should I use an arduino nano V3 to talk to the CC101 and the USB of the arduino on the ISB of the Pi3 to send back the results on the COM port

    Thanks a lot

    • What way to choose depends on the experience that you have. In my point of view, the best path to learn how to interface with the CC1101 is an Arduino-compatible product called “RFBee”. It comes with proven firmware, that can be easy changed and played around with. The next stage would be to use an external CC1101 (like the one you already bought) and another Arduino board, e.g. Arduino Nano. If you manage to get your firmware running there successfully, you also could “port” your solution to the Raspbery Pi.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s