Hi there,
I did some communication test among three RF module using CC1101. Just call them RF1,RF2,RF3.
The communication between each of them is OK.(915MHz,76.8bps, no address check)
However, when I use both RF2 and RF3 to send data to RF1 simultaneously, can only one be received by RF1 if the sending interval is smaller than 100ms, and the other one seems be blocked.
I wonder if there is some mechanic between sender and receiver (ie. ACK )?
So, if I want to use one CC1101 as a center, and many other CC1101 as clients to send data to the center, is that feasible?
Any suggestion is welcome, Thanks!
-Icing
Hi Jiang dayong,
What you want to do is feasible but you need some synchronization mechanism between them if you want to send packets at a fast rate. One way to do it is to transmit a short sync packet from the master and have all the clients synchronize to it and then each client has to transmit during a specific time-slot - called "time division multiple access". This way there should be no collisions between different clients.
If you don't need to transmit very often you could just have each client transmit at random times and then most of the time it would work but once in a while there could be a collision. If you use this system you should use the "transmit on CCA" feature of the CC1101 - it listens to make sure the channel is clear before transmitting. If the channel is not clear then it does not transmit and you can wait some time and try again.
You can use ACKs between the sender and receiver if you want but it is not automatically done by the CC1101. Your code needs to do that. If you use a protocol stack like SimpliciTI then that feature is built in (although optional).
Russ
Hi Russ,
Thanks for your reply,
I'll try to use the "transmit on CCA" feature of the CC1101.
The test I did before was like this:
First I use RF2 sending data to RF1 in 100ms interval, then open RF3 as well. The result is RF1 could only receive data from RF3. And even when RF3 was closed, RF1 still could not receive data from RF2.
Why did that happen?In my understanding, RF1 should receive the data from RF2 when RF3 is closed. However, RF2 seems dead in there although it was sending data all the time.
Any idea is welcome,
Thanks a lot!
Hi Jiang,
You are correct that it should be able to receive RF2 again after you stop RF3 from transmitting. There must be some other problem but it is hard to say what it might be without knowing more about your code. What code are you using? Is this using sample code from TI, or SimpliciTI, or your own code?
It could be that when RF3 starts transmitting, it causes RF2 to go into some state where it doesn't transmit any more. Does RF1 receive RF3 again after resetting RF3? Or do you have to reset RF1?
Thanks for your reply.
The most probability is that RF3 causes RF2 to go into some state where it doesn't transmit any more.
RF1 can receive RF3 properly when it sends data again. And it dose no need to reset RF1, as it is working properly all the time.
However, RF2 is not so lucky, it has to be reset if it want to be received or to receive data from others.
I use code written by myself, and configuration parameter is generated by SmartRF Studio.
Three RF modules almost use the same parameter. But there's a little difference.
Actually, configuration of RF1 is as following:
Address:0x01
Address check: yes, without broadcast address.
Working sate: RX in normal, and RXOFF_MODE and TXOFF_MODE stay in RX
configuration of RF2 is as following:
Address:0x02
Address check: yes, with broadcast address.
Working sate: TX in normal, and TXOFF_MODE stay in TX
So it can send data all the time in theory.(sending address is 0x01)
configuration of RF3 is as following:
Address:0x03
The following is a general configuration used by my RF module.
/********************************************************************************************************/
// Chipcon
// Product = CC1100
// Chip version = F (VERSION = 0x03)
// Crystal accuracy = 10 ppm
// X-tal frequency = 26 MHz
// RF output power = 0 dBm
// RX filterbandwidth = 232.142857 kHz
// Deviation = 32 kHz
// Datarate = 76.766968 kBaud
// Modulation = (0) 2-FSK
// Manchester enable = (0) Manchester disabled
// RF Frequency = 914.999969 MHz
// Channel spacing = 199.951172 kHz
// Channel number = 0
// Optimization = -
// Sync mode = (3) 30/32 sync word bits detected
// Format of RX/TX data = (0) Normal mode, use FIFOs for RX and TX
// CRC operation = (1) CRC calculation in TX and CRC check in RX enabled
// Forward Error Correction = (0) FEC disabled
// Length configuration = (1) Variable length packets, packet length configured by the first received byte after sync word.
// Packetlength = 64
// Preamble count = (2) 4 bytes
// Append status = 1
// Address check = (0) No address check
// FIFO autoflush = 0
// Device address = 0
// GDO0 signal selection = ( 7) Asserts when a packet has been received with OK CRC. De-asserts when the first byte is read from the RX FIFO
// GDO2 signal selection = (46) High impedance (3-state)
RF_SETTINGS rfSettings = {
0x08, // FSCTRL1 Frequency synthesizer control.
0x00, // FSCTRL0 Frequency synthesizer control.
0x23, // FREQ2 Frequency control word, high byte.
0x31, // FREQ1 Frequency control word, middle byte.
0x3B, // FREQ0 Frequency control word, low byte.
0x7B, // MDMCFG4 Modem configuration.
0x83, // MDMCFG3 Modem configuration.
0x03, // MDMCFG2 Modem configuration.
0x22, // MDMCFG1 Modem configuration.
0xF8, // MDMCFG0 Modem configuration.
0x00, // CHANNR Channel number.
0x42, // DEVIATN Modem deviation setting (when FSK modulation is enabled).
0xB6, // FREND1 Front end RX configuration.
0x10, // FREND0 Front end TX configuration.
0x18, // MCSM0 Main Radio Control State Machine configuration.
0x1D, // FOCCFG Frequency Offset Compensation Configuration.
0x1C, // BSCFG Bit synchronization Configuration.
0xC7, // AGCCTRL2 AGC control.
0x00, // AGCCTRL1 AGC control.
0xB2, // AGCCTRL0 AGC control.
0xEA, // FSCAL3 Frequency synthesizer calibration.
0x2A, // FSCAL2 Frequency synthesizer calibration.
0x00, // FSCAL1 Frequency synthesizer calibration.
0x1F, // FSCAL0 Frequency synthesizer calibration.
0x59, // FSTEST Frequency synthesizer calibration.
0x81, // TEST2 Various test settings.
0x35, // TEST1 Various test settings.
0x09, // TEST0 Various test settings.
0x0E, // FIFOTHR RXFIFO and TXFIFO thresholds.
0x2E, // IOCFG2 GDO2 output pin configuration.
0x07, // IOCFG0D GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.
0x04, // PKTCTRL1 Packet automation control.
0x05, // PKTCTRL0 Packet automation control.
0x00, // ADDR Device address.
0x40 // PKTLEN Packet length.
};
/**********************************************************************************************************************************/
I can't see anything obviously wrong with your approach although I didn't check through all the details of your register settings. Some things you could try to narrow down the problem:
Yes, that would cause RF2 to stop transmitting. That's good you figured it out.
The CC1101 can operate up to 600kbps so you could speed it up quite a lot from the 76.8kbps that you are using. There is some overhead of course in each packet so you want to make your packet size as large as practical. These things are always a trade-off with radio performance - if you increase the data rate the receiver sensitivity gets worse (you can see this in the data sheet) - if you increase the packet size the probability of an error in the packet goes up. So you have to decide on how to trade those off.
hello sir,
i have two CC1101 and i trying to send data from one to other one...
i am writting the data and after i send the Tx strobe.
the second one is already in Rx mode.
the registers i set them from the TI programm.
i have to do anything else to work?
please help me.