Wiki

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
resources:eval:user-guides:circuits-from-the-lab:cn0566:quickstart [27 Apr 2023 16:33] – [Initial Calibration] Jon Kraftresources:eval:user-guides:circuits-from-the-lab:cn0566:quickstart [29 Apr 2023 00:03] – More cleanup. Mark Thoren
Line 26: Line 26:
     * Micro HDMI to HDMI cable (or suitable adapters)     * Micro HDMI to HDMI cable (or suitable adapters)
     * 16GB or larger SD card     * 16GB or larger SD card
-    * USB keyboard and mouse 
-    * Monitor with HDMI display 
     * Tripod     * Tripod
 +    * One of the following:
 +      * Ethernet cable and DHCP-enabled network with internet access
 +      * Wireless network
 +    * One of the following:
 +      * USB keyboard and mouse, HDMI display (if running locally)
 +      * Host computer with SSH client and / or VNC client.
   * **Software**   * **Software**
     * ADI Kuiper Linux image     * ADI Kuiper Linux image
Line 45: Line 49:
 </wrap> </wrap>
 \\ \\
- 
-\\ 
- 
 ---- ----
  
 ===== SD card / Software Setup ===== ===== SD card / Software Setup =====
  
-**The SD card that ships with the first phaser production run MUST be updated with a new image.**\\ +**The SD card that ships with the first phaser production run MUST be updated with a new image.** The Phaser works with Kuiper Linux 2021_R2 (or later)whichin spite of the "2021" in the namewas released in Spring, 2023.\\
-In order to control the CN0566 from the Raspberry Pi, you will need to install ADI Kuiper Linux on an SD card. A summary of the minim steps followswhile complete instructionsincluding where to download the SD card image, how to write it to the SD cardand how to configure the system are provided at **[[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]]**. +
- +
-<WRAP todo> +
-Kuiper 2021_r2 is not documented at  **[[:resources:tools-software:linux-software:kuiper-linux#download_linux_image|Download Linux Image]]** yet. Remove this box once it is. Until then, use this direct link to the file:\\ +
-**[[https://swdownloads.analog.com/cse/kuiper/image_2023-04-02-ADI-Kuiper-full.zip|image_2023-04-02-ADI-Kuiper-full.zip]]**+
 \\ \\
-</WRAP> +In order for the Raspberry Pi to control the Phaser devices, you will need to write the ADI Kuiper Linux image to an SD card and configure it. Complete instructions, including where to download the SD card image, how to write it to the SD card, and how to configure an example system are provided at **[[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]]**.
- +
-Pay particular attention to the localization settingskeyboard settings, etc. if you will be running examples on the Raspberry Pi itself (versus remotely.)+
 \\ \\
-Download the Kuiper Linux SD card image and unzip it to a convenient location, and write the image to the SD card. The Kuiper Linux wiki pages give a few options, but the "official" Raspberry Pi imager is very straightforward:\\+**Hints:** The Kuiper Linux wiki pages give a few options, but the "official" Raspberry Pi imager is very straightforward:\\
 **[[https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/|Raspberry Pi Imager]]** **[[https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/|Raspberry Pi Imager]]**
 \\ \\
Line 70: Line 64:
 </WRAP> </WRAP>
  
-After burning, if a window pops up saying "this card needs to be formatted, would you like to format it now?", the answer is **NO.** Eject the card and insert it into the Raspberry Pi's SD card slot. +After writing the image, if a window pops up saying "this card needs to be formatted, would you like to format it now?", the answer is **NO.** Eject the card and insert it into the Raspberry Pi's SD card slot.
  
 ===== Assembling, Booting and Configuring the System =====  ===== Assembling, Booting and Configuring the System ===== 
 {{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:2-23-2023_4-37-00_pm.png?400 |}} {{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:2-23-2023_4-37-00_pm.png?400 |}}
 <wrap center 50%> <wrap center 50%>
-//<fc #c0c0c0>Figure 3. Test Setup Functional Block Diagram</fc>//+Figure 3. Test Setup Functional Block Diagram
 </wrap> </wrap>
   - Connect ADALM-Pluto's **CENTER** micro-USB port to Raspberry Pi via micro-USB to USB cable.   - Connect ADALM-Pluto's **CENTER** micro-USB port to Raspberry Pi via micro-USB to USB cable.
   - **CAREFULLY** thread the tripod into the tripod mount. Please minmize stress on the tripod mount while plugging in cables and other operations, as it is screwed directly to the PC board.   - **CAREFULLY** thread the tripod into the tripod mount. Please minmize stress on the tripod mount while plugging in cables and other operations, as it is screwed directly to the PC board.
-  - Connect the Raspberry Pi to the monitor via the HDMI cable+  - Verify that the SD card is properly inserted into the slot on the Raspberry Pi. 
-  - Connect the keyboard and mouse to the USB port of Raspberry Pi. +  - EITHER: 
-  Verify that the burned SD card is properly inserted into the slot on the Raspberry Pi.+    - Connect an HDMI display, USB keyboardand USB mouse to the Raspberry pi, OR 
 +    For remote login, connect the Raspberry Pi's Ethernet jack to your wired network, or directly to a host computer's Ethernet jack
   - Power up the setup through the type-C port of the CN0566. Do NOT connect a supply to the Raspberry Pi.   - Power up the setup through the type-C port of the CN0566. Do NOT connect a supply to the Raspberry Pi.
-  - Wait for Raspberry Pi to boot. Upon booting, open a terminal as seen on the taskbar. +  - Wait for Raspberry Pi to boot. (This may take a minute or two, as the filesystem is expanded on first boot.) 
-  - Configure the device tree overlay file. See [[/resources/eval/user-guides/circuits-from-the-lab/cn0566#software_setup | software section]] for detailed instructions.  +  - After booting, if you are using a keyboard and local display open a terminal as seen on the taskbar. If you are logging in over the network connection, you can open a graphical desktop VNC session or command line SSH session to hostname **analog.local**
-  - Make sure to reboot the Raspberry Pi after saving the //config.txt// file. +
-  - Wait for the Raspberry Pi to boot up again+
  
-\\ 
 ---- ----
- 
  
 ==== Configuring the SD Card ==== ==== Configuring the SD Card ====
- +The easiest way to configure the SD card is by running a setup script. This does require a wired or wireless internet connectionbut it is much easier than doing things manuallyA wired connection is fairly straightforward if your network supports DHCP. If you need to use a wireless connection, you'll have to boot to the graphical desktop and connect manually.\\ 
- +Once connected to a network, run the following commands (and take a look at the setup script if you're suspicious, and note that there may be some updates as newer versions of Kuiper Linux are released.) The script is commented if you want a detailed description of what it's doing.
-After burning the image abovelog into the Raspberry Pi and open the Raspberry Pi configuration utility.\\ +
-Set the hostname to "phaser"set the locale, keyboard, and wifi country (if you'll be connecting to your network by wifi.) +
-Next, run the following commands (and take a look at the setup script if you're suspicious, and note that there may be some updates as newer versions of Kuiper Linux are released.)+
 <code> <code>
 wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/phaser_sdcard_setup.sh wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/phaser_sdcard_setup.sh
Line 105: Line 92:
 sudo reboot sudo reboot
 </code> </code>
-(Wait for the system to reboot)+(Wait for the system to reboot)\\ 
 +**Note:** After running the script, the hostname will be **phaser.local** 
 +\\ 
 +If you are going to be running scripts and other software directly on the Raspberry Pi, it's a good idea set a few options using the Raspberry Pi configuration utility. This can be accessed from the Start Menu under Preferences, or by running: 
 +<code> 
 +sudo raspi-config 
 +</code> 
 +from the command line. Set the locale, keyboard, timezone, and wifi country (if you'll be connecting to your network by wifi.) 
 +\\ 
  
 ==== Software Quick Start ==== ==== Software Quick Start ====
Line 135: Line 131:
  
 ==== Initial Calibration ==== ==== Initial Calibration ====
-The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. the cn0566_examples.py script provides a calibration utility that will generate calibration files. Make sure an antenna is attached to J1, and is facing straight at the antenna array from approximately 1.5m away. Then run:+The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. The phaser_examples.py script provides a calibration utility that will generate calibration files. Shut down the GUI if it is running. Place the HB100 directly in front of the array at **[[wp>Antenna_boresight|mechanical boresight]]** , approximately 1.5 m away. Then run:
 <code> <code>
 cd ~/pyadi-iio/examples/phaser cd ~/pyadi-iio/examples/phaser
 python phaser_examples.py cal python phaser_examples.py cal
 </code> </code>
-The script provides debug information and plots as it is running, you may have to close out of each plot for the script to proceed. After running this script, files gain_cal_val.pkl and phase_cal_val.pkl will be placed in the working directory. The GUI program will also load these files automatically.+The script provides debug information and plots as it is running, you may have to close out of each plot for the script to proceed. After running this script, files gain_cal_val.pkl and phase_cal_val.pkl will be placed in the working directory. The GUI program will also load these files automatically when run again.
  
 Refer to **[[resources:eval:user-guides:circuits-from-the-lab:cn0566:calibration|CN0566 Calibration]]** for additional details Refer to **[[resources:eval:user-guides:circuits-from-the-lab:cn0566:calibration|CN0566 Calibration]]** for additional details
Line 196: Line 192:
 ===== Appendix: Configuration Script Notes ===== ===== Appendix: Configuration Script Notes =====
  
-A complete config.txt file is posted for convenience. Enter the following commands from a terminal to download and apply a complete config.txt file with all edits above included: +
-<code> +
-wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/config_phaser.txt +
-rename config_phaser.txt config.txt +
-sudo mv /boot/config.txt /boot/config_original.txt +
-sudo cp config.txt /boot/ +
-</code> +
-\\+
 <WRAP tip> <WRAP tip>
-Or alternativelyfollow the Hardware Configuration procedure under **Preparing the Image: Raspberry Pi** in the [[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]] page, adding the following lines to the very end of **/boot/config.txt**:+To manually edit config.txtadd the following:
 \\ \\
 <code> <code>
Line 239: Line 228:
 git clone https://github.com/analogdevicesinc/pyadi-iio.git git clone https://github.com/analogdevicesinc/pyadi-iio.git
 cd pyadi-iio cd pyadi-iio
-git checkout cn0566_dev +git checkout phaser 
-sudo python3 setup.py install+sudo pip install .
 </code> </code>
 </WRAP> </WRAP>
resources/eval/user-guides/circuits-from-the-lab/cn0566/quickstart.txt · Last modified: 03 Apr 2024 01:29 by Mark Thoren