This is an old revision of the document!
Table of Contents
Exercise: Making the system robust against disturbances
In the next step, the receiver need to be more robust against errors. An error will occur, if an RSSI is detected, but no packet was transmitted. Another reason for an error could be, if not out transmitter hat transmitted the packet. In these two cases, the receiver will not recognize the sync word an out program will be blocked.
But this is not the only error that could happen: The receiver will wait for the number of bytes, that is written in the length field of the packet. But if, the length field is corrupted, the number of bytes can be larger, than the packet. If this happened the receiver will wait for ever.
Both kind of error can be avoided by timers. In the first case, if no sync work will be received, there will be no date in the FIFO. An also, if the length field is too large, the FIFO becomes empty and will remain empty. Therefore a solution of the problem could be, that after some time, there must be some data in the FIFO. If not, the frame reception can be aborted.
In this lesson, you should control data reception be timers. It is up to you, how timers will be implemented. Timers could be simple implemented by software loops incrementing a variable, by delay functions or be interrupt service routines.
Requirements
This task requires
- a ready BeagleBone Black equipped with the CC1200 operating at a symbol rate of 1.2 kBaude.
- one TI Development Kit for the CC1200.
- Smart RF Studio sending packets with a symbol rate of 1.4 kBaude and a preamble count of 6 Bytes.
Tasks
- the programming is done by extending the source files from the previous lesson Exercise: Sensing a channel.
- Extend your program by a function that measures the RSSI within a frequency band. If no RSSI is detected, choose another band and try again. But, if an RSSI is detected, start receiving a packet. After packet reception, scan again ….
- Limit the number of frequencies to 3.
- For testing, start your program.
- Use SmartRF Studio to transmit packets at the RF frequency of your supported frequency set.(do not forget to change the symbol rate and preamble count in SmartRF Studio).
- Your program should recognize a valid RSSI and start receiving packets.
- Now, change RF to a frequency to another frequency band. Stopping and restarting the transmitter ist not necessary.
- The receiver, the BeagleBone Black, should now recognize the frequency change and should continue receiving packets.