Difference between revisions of "Testing a HamTV Receiver using the Portsdown"

From BATC Wiki
Jump to navigation Jump to search
 
(14 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
* A wired network connection for the Raspberry Pi during setup.
 
* A wired network connection for the Raspberry Pi during setup.
  
[[File:SD Cards.jpg|100px]]
+
[[File:01 RPi 4.jpg|200px]] [[File:SD Cards.jpg|200px]] [[File:3 Pluto.jpg|200px]]
  
 
===Setup Activities===
 
===Setup Activities===
Line 107: Line 107:
  
 
===Running the Build Script===
 
===Running the Build Script===
 +
 +
Put the card into the Raspberry Pi 4, connect the LAN and the Power Supply.  Turn on the Power, and let the Raspberry pi boot-up.  It will restart at least once on this first occasion.
 +
 +
The first task is to determine the IP address of the Raspberry Pi on oyur LAN.  You can use an application like Fing on your smartphone, or the PC program such as Advanced IP Scanner http://filehippo.com/download_advanced_ip_scanner/
 +
 +
Make a note of the IP address and connect to it using KiTTY or your SSH application.  The username is pi and the password is raspberry.
 +
 +
Cut and paste the following commands in, one line at a time
 +
 +
wget https://raw.githubusercontent.com/BritishAmateurTelevisionClub/portsdown4/master/install_portsdown.sh
 +
chmod +x install_portsdown.sh
 +
./install_portsdown.sh
 +
 +
The initial build can take between 45 minutes and one hour, however it does not need any user input, so go and make a cup of coffee. When the build is finished the Pi will reboot.
 +
 +
When the build has finished, put the Raspberry Pi's IP address into a browser on the PC like this:
 +
 +
http://192.168.0.237
 +
 +
The actual numbers will be different in every case.  You should get a screen like this:
 +
 +
[[File:New Menu.png|400px]]
  
 
===Configuring for automatic transmission on 2395 MHz===
 
===Configuring for automatic transmission on 2395 MHz===
 +
 +
First, connect the Pluto SDR.  Then, using the PC mouse to press the "buttons" on the web browser, make the following selections:
 +
 +
# Modulation: DVB-S QPSK
 +
# Encoder: H264
 +
# Output to: Pluto
 +
# Format: 4:3
 +
# Source: Test card
 +
# Freq: 2395 MHz.  Use thwe Keyboard button, press clear, then 2395, enter.
 +
# Sym Rate: 2000
 +
# FEC: 1/2
 +
# Store Preset (goes red), Preset 1, New Label, press clear, HAMTV 2395 enter
 +
# M3 (brings up the Configuration Menu), System Config, Start-up App, Boot to Transmit, Exit
 +
 +
When correctly configured, the screen should look like this:
 +
 +
[[File:Configured Menu.png|400px]]
 +
 +
Note that the screen olnly refreshes once a second, so there may seem to be a delay after each button press.
 +
 +
If you select the TX button, the button will go red and then the top left of a test card will be displayed.  This is normal for web view; the transmitted image will be complete.  It takes about 10 seconds for the transmitter to produce RF after transmit is selected.
 +
 +
You can stop the transmission by clicking within the image, and it should return to the menu.  Selecting M2 shows the shutdown and reboot buttons in the bottom left.  Try a reboot, and make sure that the unit starts transmitting once it has started up.
 +
 +
Ideally, the Raspberry Pi should be cleanly shutdown using the "Shutdown" button on Menu 2, but experience has shown that it it is very rare for a simple power-off while transmitting to cause any corruption on the SD card.
 +
 +
===Advanced Notes===
 +
 +
The video encoding on the transmission from the Pluto is H264, whereas HamTV is MPEG-2.  This sdoes not make any difference for testing as the MiniTioune, Portsdown and Ryde receivers handle both standards.
 +
 +
The power output of the Pluto as configured is 1 mW (0 dBm).  This power can be reduced by entering a negative number using the "Pluto Pwr" button.  In this configuration, the "Pluto Pwr" setting is approximately the power output in dBm.  This is not the case at lower frequencies, where the power output is higher.
 +
 +
If your LAN is configured to use the 192.168.2.* subnet, this conflicts with the IP address used in the Pluto.  Whilst configuring the Pluto you should set it's IP address to 192.168.3.1 using the procedure here: https://wiki.analog.com/university/tools/pluto/users/customizing Then, when configuring the Portsdown, you should select M3, Pluto Config, Set Pluto IP for Portsdown and enter 192.168.3.1.
 +
 +
The Pluto SDR does not like too high a supply voltage from the Raspberry Pi USB port.  If possible, the Raspberry Pi power supply should be adjusted to give 4.9 v on the Pluto USB port.  Voltages above 5.1 v can cause the Pluto USB connection to drop out; this is the first thing that should be investigated if the Pluto fails to produce RF. 
 +
 +
It is possible to use a LimeSDR Mini or a LimeSDR USB instead of the Pluto.  Simply connect it by USB, and select Output To, Lime USB or Lime Mini.

Latest revision as of 18:56, 5 July 2024

The Portsdown 4 system can be set to transmit a near-HamTV specification signal from a Pluto SDR on boot-up.

Equipment Required

  • Raspberry Pi 4 with 1, 2 or 4 GB of memory. Not any other Raspberry Pi version.
  • A power supply for the Raspberry Pi.
  • A fast MicroSD Card of 8 GB or more capacity. SanDisk Ultra UHS-1 card recommended (the red one).
  • A genuine Analog Devices Pluto SDR with USB lead.
  • A PC for use during the set-up phase, with a MicroSD card reader and a network and internet connection. The PC will need to be loaded with an SSH client such as KiTTY (free download from https://www.fosshub.com/KiTTY.html ) and a web browser.
  • A wired network connection for the Raspberry Pi during setup.

01 RPi 4.jpg SD Cards.jpg 3 Pluto.jpg

Setup Activities

  1. Configure the Pluto
  2. Load the operating system on the SD Card
  3. Run the automated build script on the SD Card
  4. Use a web browser to configure the Portsdown software to the correct settings

After these steps, the Pluto will start transmitting a 2 MS DVB-S signal on 2395 MHz every time the system is started up.

Configuring the Pluto

The Pluto needs to have the frequency range extending (even though we are operating inside the designed frequency range), AND it needs special firmware to be loaded.

First install the Pluto Drivers on the PC. Download the .exe from here: https://github.com/analogdevicesinc/plutosdr-m2k-drivers-win/releases Run the .exe and when finished connect the Pluto to the PC by USB.

Once the Pluto has booted (it has an internal Linux processor) open the SSH Client (KiTTY). Connect to the Pluto by SSH at the IP address: 192.168.2.1. Accept the security alert.

login as user: root
password: analog

For more details on the connection to Pluto see the article: https://f1atb.fr/sdr-adalm-pluto-setup/

To extend the frequency range, type the commands below:

fw_setenv attr_name compatible
fw_setenv attr_val “ad9364”

Note that the more recent Revision C (outside label) (marked as Revision D on the PCB) Plutos need an extra environment variable setting for the frequency extension. In addition to the other commands, at the command line of the Pluto enter

fw_setenv compatible ad9364

You can check that the commands have been entered correctly by typing:

fw_printenv

At the end of the text produced, you should see something like this:

attr_name=compatible
attr_val=ad9364
fit_size=1AB13A3
hostname=pluto
ipaddr=192.168.2.1
ipaddr_host=192.168.2.10
netmask=255.255.255.0
xo_correction=40000001
udc_handle_suspend=0
netmask_eth=255.255.255.0
gateway_eth=192.168.0.254

Then type

reboot

The Pluto will disconnect from the PC and reconnect with the new settings.


The special firmware is F5OEO's "for the brave" Pluto firmware (FIRM2101RC of 5 February 2020). Extract the firmware from this zip file File:FIRM2101RC.zip. Then follow the instructions on this web page VERY CAREFULLY Analog Devices Firmware Upgrade Instructions.

You can check that you have the correct Firmware loaded by logging into the Pluto again by ssh. The first line after the Pluto logo should read v0.31-4-g9ceb-dirty

Now disconnect the Pluto from your PC.

Loading the Operating System on the SD Card

The Portsdown 4 uses an older version of the operating system than is currently supported by the Raspberry Pi foundation. This is because the Portsdown software makes use of (video encoding) features that have been removed from more recent versions of the software.

First, download the 2023-05-03 release of Raspberry Pi OS Lite (Legacy, Buster) on to your PC from here https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-05-03/2023-05-03-raspios-buster-armhf-lite.img.xz

Then, unzip the image (using 7zip as it is a .xz compressed file).

Download the Raspberry Pi Imager from here: https://www.raspberrypi.com/software/

Insert your SD Card into a card reader and connect it to the PC, Then open the Raspberry Pi Imager and accept the security warning.

Click Choose Device.  Select Raspberry Pi 4

Click Choose OS.  Scroll down to "Use custom", click and then browse to the image file that you just unzipped (2023-05-03-raspios-buster-armhf-lite.img).  Open it.

Click Choose Storage.  Select your SD card.

Click Next.

On the OS Customisation screen, select Edit Settings.

In the General tab, tick "Set username and password".  Enter the username "pi", and the password "raspberry".

In the Services Tab, tick Enable SSH and seelct "Use password authentication".  Then click SAVE.

On the OS Customisation screen (again), select YES.  At the warning, select YES.

The SD card will take a few minutes to build and verify. If asked about formatting by your PC, DO NOT FORMAT the card.

Running the Build Script

Put the card into the Raspberry Pi 4, connect the LAN and the Power Supply. Turn on the Power, and let the Raspberry pi boot-up. It will restart at least once on this first occasion.

The first task is to determine the IP address of the Raspberry Pi on oyur LAN. You can use an application like Fing on your smartphone, or the PC program such as Advanced IP Scanner http://filehippo.com/download_advanced_ip_scanner/

Make a note of the IP address and connect to it using KiTTY or your SSH application. The username is pi and the password is raspberry.

Cut and paste the following commands in, one line at a time

wget https://raw.githubusercontent.com/BritishAmateurTelevisionClub/portsdown4/master/install_portsdown.sh
chmod +x install_portsdown.sh
./install_portsdown.sh

The initial build can take between 45 minutes and one hour, however it does not need any user input, so go and make a cup of coffee. When the build is finished the Pi will reboot.

When the build has finished, put the Raspberry Pi's IP address into a browser on the PC like this:

http://192.168.0.237

The actual numbers will be different in every case. You should get a screen like this:

New Menu.png

Configuring for automatic transmission on 2395 MHz

First, connect the Pluto SDR. Then, using the PC mouse to press the "buttons" on the web browser, make the following selections:

  1. Modulation: DVB-S QPSK
  2. Encoder: H264
  3. Output to: Pluto
  4. Format: 4:3
  5. Source: Test card
  6. Freq: 2395 MHz. Use thwe Keyboard button, press clear, then 2395, enter.
  7. Sym Rate: 2000
  8. FEC: 1/2
  9. Store Preset (goes red), Preset 1, New Label, press clear, HAMTV 2395 enter
  10. M3 (brings up the Configuration Menu), System Config, Start-up App, Boot to Transmit, Exit

When correctly configured, the screen should look like this:

Configured Menu.png

Note that the screen olnly refreshes once a second, so there may seem to be a delay after each button press.

If you select the TX button, the button will go red and then the top left of a test card will be displayed. This is normal for web view; the transmitted image will be complete. It takes about 10 seconds for the transmitter to produce RF after transmit is selected.

You can stop the transmission by clicking within the image, and it should return to the menu. Selecting M2 shows the shutdown and reboot buttons in the bottom left. Try a reboot, and make sure that the unit starts transmitting once it has started up.

Ideally, the Raspberry Pi should be cleanly shutdown using the "Shutdown" button on Menu 2, but experience has shown that it it is very rare for a simple power-off while transmitting to cause any corruption on the SD card.

Advanced Notes

The video encoding on the transmission from the Pluto is H264, whereas HamTV is MPEG-2. This sdoes not make any difference for testing as the MiniTioune, Portsdown and Ryde receivers handle both standards.

The power output of the Pluto as configured is 1 mW (0 dBm). This power can be reduced by entering a negative number using the "Pluto Pwr" button. In this configuration, the "Pluto Pwr" setting is approximately the power output in dBm. This is not the case at lower frequencies, where the power output is higher.

If your LAN is configured to use the 192.168.2.* subnet, this conflicts with the IP address used in the Pluto. Whilst configuring the Pluto you should set it's IP address to 192.168.3.1 using the procedure here: https://wiki.analog.com/university/tools/pluto/users/customizing Then, when configuring the Portsdown, you should select M3, Pluto Config, Set Pluto IP for Portsdown and enter 192.168.3.1.

The Pluto SDR does not like too high a supply voltage from the Raspberry Pi USB port. If possible, the Raspberry Pi power supply should be adjusted to give 4.9 v on the Pluto USB port. Voltages above 5.1 v can cause the Pluto USB connection to drop out; this is the first thing that should be investigated if the Pluto fails to produce RF.

It is possible to use a LimeSDR Mini or a LimeSDR USB instead of the Pluto. Simply connect it by USB, and select Output To, Lime USB or Lime Mini.