Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
network_protocol_programming_lab:robust [2020/06/02 09:30] – rathke | network_protocol_programming_lab:robust [2021/04/19 12:43] (current) – [Requirements] rathke | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Exercise: Making the system robust against disturbances ====== | ====== 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 | + | 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 our transmitter |
- | 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. | + | 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 number of bytes of 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. | + | Both kind of error can be avoided by timers. In the first case, if no sync work will be received, there will be no data 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. | + | 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 by interrupt service routines. |
===== Requirements | ===== Requirements | ||
Line 13: | Line 13: | ||
This task requires | This task requires | ||
- | * a ready BeagleBone Black equipped with the CC1200 | + | * a ready BeagleBone Black equipped with the CC1200. |
- | * one TI Development Kit for the CC1200. | + | * 4C attached to a second BeagleBone Black equipped with the CC1200. |
- | * Smart RF Studio | + | * 4C sending packets with a symbol rate of 1.2 kBaude and a preamble count of 6 Bytes. |
+ | ===== Tasks ===== | ||
+ | |||
+ | * the programming is done by extending the source files from the previous lesson [[network_protocol_programming_lab: | ||
+ | * Extend your program to control packet reception by timers. | ||
+ | * For testing, start your program and use the same test scenarios used by [[network_protocol_programming_lab: | ||
+ | * If an error occurs, your program should continue receiving packets. Perhaps some data will be lost, but receiving continues. | ||
+ | |||
+ | ===== Hints ===== | ||
+ | |||
+ | * Pay attention on the timer values: The time waiting for data within a packet is normally shorter than waiting for the first payload byte. The time waiting for the first payload byte of the packet includes some preamble bits (but maybe not all) and the sync word bits. Whereas the time between two bytes within the packet is exactly 8bit plus some overhead. | ||