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 12:21] – [First Tests with SmartRF Studio] 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 104: Line 113:
 ===== First Test with 4C ===== ===== First Test with 4C =====
  
-First, take a BeagleBone Black equipped with a CC1200 evaluation board. +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.
- +
-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. +
-  +
-<imgcaption 7 | Texas Instruments Main Window with 2 Board>{{:network_protocol_programming_lab:SmartRFStudio_test_firstWindow.png?600%}}</imgcaption> +
- +
-Now, start SmartRF Studio as shown in Fig. 7. Double-click the first board in the device list. The device window for that board will open (see Fig. 8) +
- +
-<imgcaption 8 | Texas Instruments Continuous RX Mode >{{:network_protocol_programming_lab:SmartRFStudio_test_RX.png?600%}}</imgcaption> +
- +
-Select the setting "Symbolrate 38.4kbps, 2-GFSK, RX BW 100kHz, ETSI Standard (868MHz)" in the "Typical Settings" window. +
-In the lower window, select the menu "Continuous RX". +
- +
-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.  +
-9. +
- +
-<imgcaption 9 | Texas Instruments Continuous TX Mode >{{:network_protocol_programming_lab:SmartRFStudio_test_TX.png?600%}}</imgcaption>+
  
-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.1617963687.txt.gz · Last modified: 2021/04/09 12:21 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0