Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_protocol_programming_lab:8_smartrf [2021/04/09 11:40] – [HF] adminnetwork_protocol_programming_lab:8_smartrf [2022/04/29 08:43] (current) – [4C Installation] fangenoorth
Line 8: Line 8:
  
 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 can also be used to perform some performance test, like continuously sending an receiving a bit stream or transmitting and receiving data packets.
- 
-<imgcaption 1 | Texas Instruments Evaluation Board>{{:network_protocol_programming_lab:Evaluation_Bord.png?500%}}</imgcaption> 
 ===== 4C Installation ===== ===== 4C Installation =====
  
Line 16: Line 14:
 To install //4C// several steps have to be done: To install //4C// several steps have to be done:
  
-  - Login as root to the BeagleBone Black and download the //cc1200d// from [[https://kn-pr.tkn.tu-berlin.de/ppl/cc1200d.tar|here]]. Unpack ''cc1200d.tar''. Copy the library file <code bash>cp libcc1200.so /usr/lib/.</code> and the file ''libcc1200.conf'' <code bash>cp libcc1200.conf /etc/ld.so.conf.d/.</code> To activate the library execute <code bash> ldconfig</code> and finally start cc1200d by entering: <code bash>./cc1200d</code> //cc1200d// will create a log-file. Look if there is some output. +  - Download the //cc1200 daemon// from [[https://kn-pr.tkn.tu-berlin.de/ppl/cc1200d.tar|here]]. Unpack ''cc1200d.tar''. Copy the library file <code bash>sudo cp libcc1200.so /usr/local/lib/</code> To regenerate the dynamic linker cache execute <code bash> sudo ldconfig</code> and finally start cc1200d by entering: <code bash>./cc1200d</code> //cc1200d// will create a log-file. Look if there is some output. 
-  - Go back to your PC or laptop. Download Version v14.16.0 of [[https://nodejs.org/en/|Node.js]] for your operating system (Linux, MS Windows or Mac OS X) and install //Node.js//+  - Go back to your PC or laptop. Download Version v14.16.0 of [[https://nodejs.org/en/|Node.js]] for your operating system (Linux, MS Windows or Mac OS X) and install //Node.js//. Newer versions of NodeJS should also work
-  - Download //4C// as a ZIP-File from [[https://kn-pr.tkn.tu-berlin.de/ppl/CC1200-Control-Center.zip|here]] and uncompress it to your favorite location. Edit the file ''4C.js'' in directory ''CC1200-Control-Center''. Find in file ''4C.js'' the line: <code bash>var BeagleBone = '192.168.178.37';</code> and change the IP address to the dress of your BeagleBone Black. Save ''4C.js'' and exit.+  - Download //4C// as a ZIP-File from [[https://kn-pr.tkn.tu-berlin.de/ppl/CC1200-Control-Center.zip|here]] and uncompress it to your favorite location. Edit the file ''4C.js'' in directory ''CC1200-Control-Center''. Find in file ''4C.js'' the line: <code bash>var BeagleBone = '192.168.178.37';</code> and change the IP address to the address of your BeagleBone Black. Save ''4C.js'' and exit.
   - 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 ''CC1200-Control-Center''. Start //4C-Web// by entering: <code bash>node 4C.js</code> //4C-Web// will output: <code bash>listenig on *:3000</code>   - 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 ''CC1200-Control-Center''. Start //4C-Web// by entering: <code bash>node 4C.js</code> //4C-Web// will output: <code bash>listenig on *:3000</code>
   - Now open your Browser (remember: Chrome, Firefox or Safari) and go to the url: <code bash>http://localhost:3000</code> Now you will see the //4C// window.   - Now open your Browser (remember: Chrome, Firefox or Safari) and go to the url: <code bash>http://localhost:3000</code> Now you will see the //4C// window.
 +
 +**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//. This allows us to forward traffic for a certain port from your local machine to a (possibly different) port on another machine, tunneling the traffic through a third host.
 +
 +Luckily the command to set this up is quite easy. First execute steps 1 to 3 from the above. However in step 3 enter ''localhost'' instead of the BeagleBone's IP address. Then on your host enter the following into a terminal:
 +<code bash>
 +ssh -N t27@inna.tkn.tu-berlin.de -L 4711:<IP of BBB>:4711
 +</code>
 +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 ===== ===== First Steps with 4C =====
  
Line 29: Line 38:
  
 ==== Menu Bar ==== ==== Menu Bar ====
-On top of the window you see the menu bar with the menus //TKN//, //File//, //CC1200// and the //Mode// Menü:+On top of the window you see the menu bar with the menus //TKN//, //File//, //CC1200// and the //Mode// menu:
  
 === TKN Menu === === TKN Menu ===
Line 63: Line 72:
 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 ''Write''-Button. If you press the ''Close''-button the dialog disappears. 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 ''Write''-Button. If you press the ''Close''-button the dialog disappears.
  
 +=== Mode Menu ===
 +In the //Mode Menu// you will select which configuration is shown in the //Testing Window//
 ==== HF Configuration 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 ''FREQ0'' to ''FREQ2'' (look at the register window) has been changed without knowing the calculation behind.+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 ''FREQ0'' to ''FREQ2'' (look at the register window) has been changed without knowing the calculation behind.
  
 Currently only changing the carrier frequency has some effect. Other parameters will follow. Currently only changing the carrier frequency has some effect. Other parameters will follow.
  
  
 +==== Register Window ====
  
-==== Device Control Panel ==== +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 presentationBy changing a register value, you change the value directly in the chipTo receive the current register values, you habe to press the ''Refresh''-Button.
- +
-<imgcaption 3 | Texas Instruments Easy Mode>{{:network_protocol_programming_lab:SmartRFStudio_easyMode.png?700%}}</imgcaption> +
- +
- +
-As you can see in Fig. 3, the window is divided into three parts. +
- +
-=== Connected Evaluation Boards Window === +
-  * The upper part contains some useful control, that are used very frequently. E.g. can set the device either in "Packet TX"- or "Packet RX"-Mode, "Start" packet transmission or packet reception or you can reset the device. +
- +
-=== Predefined Configurations Window === +
-  * The middle part of the window contains predefined configurations - called settings.  +
- +
-=== Test Configurations Window === +
-  * In lower part of the window you can configure and start predefined tests, e.g. "Packet TX". +
- +
-==== Expert Mode Window ==== +
-We are not using the easy mode. Therefore switch to expert mode (see Fig. 3) after you have enabled "Register View" and "RF Parameters" in the upper part of the window. +
- +
-<imgcaption 4 | Texas Instruments Expert Mode>{{:network_protocol_programming_lab:SmartRFStudio_expertmode.png?700%}}</imgcaption> +
- +
-After entering expert mode, you will recognize (see Fig.4), that the number of predefined configurations has been increased and the number of options for the predefined tests also has been increased. Beside that, two more windows are now visible: +
- +
-  * //The registers of the chip are now accessible in the "Register View"// \\ In the register window all the internal registers of the CC1200 are listed. If you change the value of a register, this value will be written directly to the chip. You have two options changing a register: Either you can modify the whole content of the register or some parts. After register has been written, its content is read back and shown. For some reasons, you trigger the reading of all registers, if you push re "Refresh"-button. +
-  * //You can chose the RF parameters of the chip.// \\ In this window, you change the RF parameters of the chip, without touching the registers. SmartRF Studio will do that for you. E.g. if you change the symbol rate, SmartRF Studio will modify the affected registers. To test, which register has been changed, press the "Refresh Button" in the register window. All the register that are change to bold text are effected. This is very useful, to determine which registers must be modified in your own source code. +
- +
-==== Register Export ==== +
- +
-After changing all registers to your needs, it is time to export the value of all registers and include the the register values in your own source code. Afterwards the register values will be written by about program. +
- +
-To export the register values, press the "Register Export"-button as shown in Fig. 4. A new window pops up as shown in Fig. 5. +
- +
-<imgcaption 5 | Texas Instruments Export Register Window>{{:network_protocol_programming_lab:SmartRFStudio_registerexport.png?600%}}</imgcaption> +
- +
-On the left side of the window, a list of predefined templates are shown. This list can be extended by new templates. Below the template window, the structure of a selected template is depicted: +
- +
-First, there is a header, followed by the register section and ended by a footer. The result is shown in the right side of the window. +
- +
-E.g., if you select the "//SimpleTI setting//" template, the register values are exported in C language header file. The header section opens the possibility to provide a meaningful naming. The register section will be applied to each register. , For each register a new line will create, starting with a C "#define" statement, followed by the string "SMARTRF_SETTING_@RN@". "@RN" will be replaced ba the register name in large capitalsAfter the register name tabulator will follow ("@<<@" is the tav´bulator sign) and finally the string "0x@VH@" follows. In this string the placeholder "@VH@" will be replayed by the register value in hexadezimal presentation. In the footer sectionthe "#ifndef" C statement opened in the header section will be closed. +
- +
-If you do not like this style, you can modify it with the placeholder "RN, rn, RD rd ..." depicted in the "Temple ViewThe meaning of each placeholder can be obtained by pressing the "Help.." button. You also can create a new template. +
- +
-If you are satisfied with you template, you will export the register values into a file by pressing "Export to File ..." button. Butby careful. Up to now, we habe not selected the registers, that need to be exported. The selection will be done be pressing the "Select..." button. A new window will be opened as shown in Fig. 6.+
  
-<imgcaption 6 | Texas Instruments Export Register Selection Window>{{:network_protocol_programming_lab:SmartRFStudio_registerselection.png?600%}}</imgcaption>+==== Testing Window ====
  
-On the left side in Fig. 6, all the available registers are shown. The CC1200 has 165 registers. On the right side, the exported registers are shownIf you want to remove a register, highlight it in the left window and click the left arrow. If you want to add a register highlight it in the right window and press right arrow. If you want to include all registers, then press the three right arrows and so on. If you are not sure, which registers to include, just include all registers.+The //Testing Window// contains the current configuration for tests. The test configuration is chosen by the //Mode// menu of the menu barThere are for configurations available:
  
-===== First Tests with SmartRF Studio =====+  * Transmission in //Synchronous Serial Mode// data Communication mode, 
 +  * Reception in //Synchronous Serial Mode// data Communication mode, 
 +  * Transmission in //FIFO Mode// data Communication mode and 
 +  * Reception in //FIFO Mode// data Communication mode.
  
-In section, we are using two evaluation boards. The CC1200 of the first board will act as a transmitter and the CC1200 of the second board will act as a receiver. The receiver will measure the intensity of the transmitted bits by plotting the "Receiver Signal Strength Indicator (RSSI)" value. If the RSSI value is high, the signal is strong and if it is low, the signal is weak.+The data communications modes are explained in the //CC1200 User Guide//.
  
-First leave SmartRF Studio, if no already done. Now prepare two evaluation boards a described in section [[network_protocol_programming_lab:8_smartrf#first_steps_with_smartrf_studio]] und connect the boards into the USB plugs of your computer. +For all data communication modes the following parameters are configured:
-  +
-<imgcaption 7 | Texas Instruments Main Window with 2 Board>{{:network_protocol_programming_lab:SmartRFStudio_test_firstWindow.png?600%}}</imgcaption>+
  
-Nowstart SmartRF Studio as shown in Fig. 7. Double-click the first board in the device listThe device window for that board will open (see Fig8)+carrier frequency: 868 MHz,\\ 
 +Modulation: 2-GFSK,\\ 
 +Bitrate: 38.4 kBit/s\\ 
 +Deviation:  19.989014 kHz,\\ 
 +Rx filter bandwidth: 104.166667 kHz,\\ 
 +Transmission Power: 14 dBm
  
-<imgcaption 8 | Texas Instruments Continuous RX Mode >{{:network_protocol_programming_lab:SmartRFStudio_test_RX.png?600%}}</imgcaption>+==== Status Window ==== 
 +In the //Status Window// the current status of the CC1200 is shownThe status will be updated every second and corresponds to the values explained in //CC1200 User Guide//
  
-Select the setting "Symbolrate 38.4kbps, 2-GFSK, RX BW 100kHz, ETSI Standard (868MHz)" in the "Typical Settings" window. +==== Strobe Window ==== 
-In the lower window, select the menu "Continuous RX".+The Strobe Window will be used to change the operation of CC1200Each 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//.
  
-Now, go back to the main window of SmartRF Studio" and double-click the second evaluation board. Chose the same setting for this board in the "Typical Settings" window ("Symbolrate 38.4kbps, 2-GFSK, RX BW 100kHz, ETSI Standard (868MHz)"). But bring this board in to transmit mode, by pressing the menu "Continuous TX" in the lower window. The configuration ist shown in Fig.  +===== First Test with 4C =====
-9.+
  
-<imgcaption 9 | Texas Instruments Continuous TX Mode >{{:network_protocol_programming_lab:SmartRFStudio_test_TX.png?600%}}</imgcaption>+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.
  
-Now, go back to the receiver board and press the start button. You will see a curve representing the RSSI value. Nowselect the window of the transmitter board and press also the start buttonIf you now look at the window of the receiveryou will see a jump in the RSSI curveThe jump occurs at the time, the sender starts transmittingIf you switch off the sender, the RSSI curve will drop. This behavior ist shown in Fig. 10.+Go to the Register Window and find the registers FREQ0FREQ1 and FREQ2The values school be 0x560xcc and 0xcc respectively. 
 +Now change the carrier frequency to 855 MHzYou will recognize that the frequency habe been changesmeaning the CC1200 will now operate at 855 MHz and not at 868 MHz.
  
-<imgcaption 10 | Texas Instruments Continuous TX Mode >{{:network_protocol_programming_lab:SmartRFStudio_test_RX_result.png?600%}}</imgcaption>+In the next step choose //RX Synchronous Serial Mode// of the //Mode// menuYou 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.
  
-This simple example should demonstrate the use of SmartRF Studio. Try other settings, perhaps use the packet modes and modify some RF parametersTo get familiar with SmartRF Studioplay around with it. +You habe found a configuration of the register settings for measuring the RSSI value in synchronous serial modeNow, 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.
network_protocol_programming_lab/8_smartrf.1617961236.txt.gz · Last modified: 2021/04/09 11:40 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0