This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1101: Raw data bits

Part Number: CC1101

Hi All,

I am very new to the CC1101 with about 2 weeks worth of experience. I originally purchased it to complete a specific project and have come a long way in those 2 weeks.

My project is getting an Arduino (actually Teensy) to communicate with some TPMS external valve sensors. They are not going to be used as TPMS sensors as such but the sensors themselves suit my purpose perfectly. I got the sensors as a kit (with a receiver) and used an SDR dongle to decode the data. The next step was getting the Teensy to read the data from the sensors and that’s where the CC1101 comes in.

The sensors send 433.920Mhz FSK Manchester Encoded data that is essentially a 7 byte preamble (10 10 10 10 etc), a sync word and 9 bytes of data. This is after it has been Manchester decoded. Unfortunately, I have had to read it unencoded and decode the Manchester decoding in software as the sensor does not send the preamble Manchester encoded and the CC1101 can’t handle that.

The above has been successful and I can read the packets on the Teensy.

Then I ran in to a problem. This all worked fine on the first sensor but then the other 3 sensors I could not read at all on the CC1101. I sat for hours playing with the settings in SmartRF but could not get anything from the other 3 sensors even though I could see them on continuous RX (the blips) and also see them on a spectrum analyser and read them from SDR and they were all sending the same data format and the receiver that comes with them could pick them all up.

After some more playing, I eventually found out the reason why. The first sensor was sending at a data rate of 19.2k but from the other 3, 2 of them were transmitting at a data rate of 18.1k and the fourth was transmitting at 18.4k data rate. These are cheap sensors so I guess the tolerances of the RF transmitter or crystals are not that accurate. But the receiver that came with it can pick all 4 up even though the data rates are slightly different. 

Is there anyway I can get the CC1101 to just demodulate the signal and send me the raw 1s and 0s and I will have to piece it together myself in software. I guess I mean ignore the data rates and packet handling and just give me binary data. If so, how would I connect this to something like an Arduino or Teensy and set it up on the CC1101? Or indeed, is there a way this can be done through the CC1101?

Many thanks in advance for any help or advice you can give me.

  • You may try Asynchronous Serial Operation for this (search the datasheet)

  • Thank you.

    I did look at Asynchronous mode but there were a few things that I didn't understand that the datasheet didn't address.

    I worked out that I need to set PKTCTRL0 to 0x32 and IOCFG0 to 0x0D to start Asynchronous mode (I am using GDO0 to connect to my MCU).

    I assume now that the data rate that is set (19200) is now the Asynchronous baud rate between the CC1101 and the MCU.

    I also assume that the Asynchronous is standard and I can just connect GDO0 to the RX pin on the hardware UART on the MCU. I am expecting that the CC1101 sends a Start-Bit, Data and then Stop-Bit.

    The above is what I have tried and I am getting data come through my UART on the MCU, but nothing that looks like the data I am expecting.

  • A different name for Asynchronous mode is transparent mode meaning that CC1101 will output a signal that has deviation higher than the carrier as a '1' and deviation lower than carrier as '0'. Hence if you just have noise on the air you will still get a datastream from the chip. You can gate this by using CS meaning that you only get a datastream if the input signal is larger than the CS threshold. You then have to decode the datastream with your MCU (looking for a know pattern to indicate the start of the transmission) 

     Asynchronous mode is not a automatic air to UART option. 

  • Thank you very much for your help. I managed to get it working today. It still needs some fine tuning, but I was getting valid data. I also need to experiment with the CS.

    I assume that the data rate setting in the registers is ignored when using asynchronous mode?

  • If you look in the datasheet under Asynchronous  mode you will see that the datarate you set the chip to use sets the oversamplings rate internally in the CC1101 so the best is to set this to the datarate you expect the datastream to be or higher. 

  • Ok, this is now fully working. I had to play with the CS carrier sense to filter out unwanted noise but it picks up everything I need now.

    I also got this working using the standard packet handling as well. I decided to read the datasheet from front to back and understand as much as I could. I discovered there was a register called BSCFG. This is the datarate deviation percentage. By changing my datarate to 18.6k and setting the BS_LIMIT to 2, it now picks up all my sensors.

    This has been a good journey and I have learnt a lot about the CC1101 and it's capabilites. Still a lot to learn but I have come a long way.