Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| network_protocol_programming_lab:8_smartrf [2022/04/28 12:11] – ssh tunnel instructions for 4C fangenoorth | network_protocol_programming_lab:8_smartrf [2022/04/29 08:43] (current) – [4C Installation] fangenoorth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== CC1200 Control Center (4C) ====== | ||
| + | 4C is a Web application that runs the Google Chrome and Firefox Web Browser to communicate via the Internet with a BeagleBone Black, that is equipped with an evaluation module with a RF chip mounted. For our purpose we are using the //CC1200 Evaluation Module//. | ||
| + | |||
| + | 4C will be used to evaluate the RF-IC (on our case the CC1200) at an early stage in the design process. Chips like the CC1200 are configured by a bunch of configuration registers (CC1200 has about 100 configurations registers). E.g. to program the RF frequency you habe to program at least three registers. 4C helps you to find an appropriate setting of the configuration registers and functional test your application. | ||
| + | |||
| + | To find an appropriate setting, you a predefined setting of all resisters is inherited in 4C. You modify the configuration registers to your needs. For most common cases, it is not necessary to modify the bits of registers directly. You just modify chip parameters like the output power or the data rate. At the moment only the RF Frequency can be changed directly. Other parameters could also be changed in the future. 4C will compile your desired parameters and set the affected bits of configuration registers. After you have found your setting, you can export the configuration register values to file. The format of the file is in C style. | ||
| + | |||
| + | 4C can also be used to perform some performance test, like continuously sending an receiving a bit stream or transmitting and receiving data packets. | ||
| + | ===== 4C Installation ===== | ||
| + | |||
| + | //4C// communicates with a local Web-Server //4C-Web// in //Node.js// via web-sockets written. //Node.js// is a JavaScript interpreter outside a Web-Browser. //4C-Web// translates the commands from //4C// and forwards them via a stream-socket to a deamon (// | ||
| + | |||
| + | To install //4C// several steps have to be done: | ||
| + | |||
| + | - Download the //cc1200 daemon// from [[https:// | ||
| + | - Go back to your PC or laptop. Download Version v14.16.0 of [[https:// | ||
| + | - Download //4C// as a ZIP-File from [[https:// | ||
| + | - If not already done, open a your favorite terminal app (terminal in Linux or Mac OS X, Powershell in MS Windows) and change to directory '' | ||
| + | - Now open your Browser (remember: Chrome, Firefox or Safari) and go to the url: <code bash> | ||
| + | |||
| + | **If you work inside uni with your own machines the above setup will not work.** This is because the BeagleBones reside in their own subnet to which you don't have access from your laptops connected to eduroam for example. This issue arose already in the earlier steps. Back then we solved it by first sshing into the inna server (or via JumpHost) and then ssh into the BeagleBones. But now the situation is a bit different, because we cannot instruct our Webbrowser to do this. Instead we have to use a technique called //SSH port tunneling// | ||
| + | |||
| + | Luckily the command to set this up is quite easy. First execute steps 1 to 3 from the above. However in step 3 enter '' | ||
| + | <code bash> | ||
| + | ssh -N t27@inna.tkn.tu-berlin.de -L 4711:<IP of BBB>: | ||
| + | </ | ||
| + | This tells ssh to forward packets arriving on port 4711 on your local machine (from the node webapp) to port 4711 on the BeagleBones (to the cc1200 daemon) using the inna server as a intermediate Jump Host. Note that the terminal window needs to stay opened and this ssh call should not be terminated, otherwise the tunnel will be closed as well. | ||
| + | |||
| + | Now you can start and connect to the webapp as described in step 4 and 5. | ||
| + | |||
| + | ===== First Steps with 4C ===== | ||
| + | |||
| + | After you have installed and startet //4C//, the window depicted in Fig. 2 will open. | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | ==== Menu Bar ==== | ||
| + | On top of the window you see the menu bar with the menus //TKN//, //File//, //CC1200// and the //Mode// menu: | ||
| + | |||
| + | === TKN Menu === | ||
| + | |||
| + | The //TKN// menu contains only one item (//About// item) that provides some information about the tool. | ||
| + | |||
| + | === File Menu === | ||
| + | |||
| + | The //File// Menu contains the Items //Load Register//, //Save Register// and //Export Register to C//. | ||
| + | |||
| + | == Save Register == | ||
| + | |||
| + | Selecting the //Save Register// item opens a dialog, asking for a '' | ||
| + | |||
| + | == Load Register == | ||
| + | |||
| + | Selecting the //Load Register// item opens a dialog, asking for a '' | ||
| + | |||
| + | == Export Register | ||
| + | With this menu item you can provide a filename to the opening dialog box, where all the registers arg stored in a C style. Optionally you can automatically include a mein routine in the C-file. | ||
| + | |||
| + | === CC1200 Menu === | ||
| + | |||
| + | The //CC1200 Menu// contains the items //Init SPI//, //Read Register// and //Write Register//. | ||
| + | |||
| + | == Init SPI == | ||
| + | Selecting the //Init SPI// item you can reinitialize the SPI interface. Doing this resets the CC1200. | ||
| + | |||
| + | == Read Register == | ||
| + | Selecting //Read Register// item a dialog opens that asks you for the address of a specific register to read. The value of the registers is updated every time you press the '' | ||
| + | |||
| + | == Write Register == | ||
| + | Selecting //Write Register// item a dialog opens that asks you for the address of a specific register to write. The value of the registers is transferred to CC1200 every time you press the '' | ||
| + | |||
| + | === Mode Menu === | ||
| + | In the //Mode Menu// you will select which configuration is shown in the //Testing Window// | ||
| + | ==== HF Configuration Window ==== | ||
| + | |||
| + | In the //HF Configuration Window// you can change HF chip parameters like carrier frequency, modulation, bit rate etc. without modification of the registers. 4C will set the corresponding bits in the registers (look at the //register window//) automatically. This is useful to determine the correct register values without knowing the calculation behind. E.g. just change the carrier frequency to a specific value. You will see that Registers '' | ||
| + | |||
| + | Currently only changing the carrier frequency has some effect. Other parameters will follow. | ||
| + | |||
| + | |||
| + | ==== Register Window ==== | ||
| + | |||
| + | The //Register Window// contains all CC1200 registers. After der register name, its address (in parenthesis) and the current value of the register is shown. The address and the value is in hexadecimal presentation. By changing a register value, you change the value directly in the chip. To receive the current register values, you habe to press the '' | ||
| + | |||
| + | ==== Testing Window ==== | ||
| + | |||
| + | The //Testing Window// contains the current configuration for tests. The test configuration is chosen by the //Mode// menu of the menu bar. There are for configurations available: | ||
| + | |||
| + | * Transmission in // | ||
| + | * Reception in // | ||
| + | * Transmission in //FIFO Mode// data Communication mode and | ||
| + | * Reception in //FIFO Mode// data Communication mode. | ||
| + | |||
| + | The data communications modes are explained in the //CC1200 User Guide//. | ||
| + | |||
| + | For all data communication modes the following parameters are configured: | ||
| + | |||
| + | carrier frequency: 868 MHz,\\ | ||
| + | Modulation: 2-GFSK,\\ | ||
| + | Bitrate: 38.4 kBit/s\\ | ||
| + | Deviation: | ||
| + | Rx filter bandwidth: 104.166667 kHz,\\ | ||
| + | Transmission Power: 14 dBm | ||
| + | |||
| + | ==== Status Window ==== | ||
| + | In the //Status Window// the current status of the CC1200 is shown. The status will be updated every second and corresponds to the values explained in //CC1200 User Guide// | ||
| + | |||
| + | ==== Strobe Window ==== | ||
| + | The Strobe Window will be used to change the operation of CC1200. Each button activates the depicted command (e.g. the RX button will bring CC1200 in receive operation). The command strobes are described in //CC1200 User Guide//. | ||
| + | |||
| + | ===== First Test with 4C ===== | ||
| + | |||
| + | First, take a BeagleBone Black equipped with a CC1200 evaluation module and perform the installation of 4C. Now open 4C and the main window appears. | ||
| + | |||
| + | Go to the Register Window and find the registers FREQ0, FREQ1 and FREQ2. The values school be 0x56, 0xcc and 0xcc respectively. | ||
| + | Now change the carrier frequency to 855 MHz. You will recognize that the frequency habe been changes, meaning the CC1200 will now operate at 855 MHz and not at 868 MHz. | ||
| + | |||
| + | In the next step choose //RX Synchronous Serial Mode// of the //Mode// menu. You will recognize that there has been change not much. But looking deeper, you will see, that the carrier frequency hat been reset to the default value. Now press the //RSSI on// button. CC1200 will start measuring the RSSI. You will see the the RSSI oscillates around 20 that corresponds to the noise floor. If you have measured enough press the //RSSI off// button. | ||
| + | |||
| + | You habe found a configuration of the register settings for measuring the RSSI value in synchronous serial mode. Now, it is time to write your own program to measure the RSSI. To do that select the menu item //Export Register to C// of the file menu and export all register values. The register values will be the basis to write your own programs. For more go to the lessons section. | ||
