Difference between revisions of "Jetson Nano"

From BATC Wiki
Jump to navigation Jump to search
Line 98: Line 98:
  
 
* H265 Test Card with no audio
 
* H265 Test Card with no audio
* H265 ATEM Mini Pro USB video and audio (select audio "Auto")
+
* H265 ATEM Mini Pro USB video and audio (select Source HDMI and Audio "Auto")
* H265 ATEM Mini Pro USB Video with Audio from USB Mic dongle
+
* H265 ATEM Mini Pro USB Video with Audio from USB Mic dongle (select Source HDMI and Audio "USB Mic")
  
 
===Performance===
 
===Performance===

Revision as of 19:56, 29 January 2023

This page details the procedure (valid in January 2023) for using a Jetson Nano with a LimeSDR Mini all controlled by a Portsdown (2020 or 4) for H265 DATV transmissions.

There are 2 supported configurations:

  • As first described in CQ-TV 265 (2019) using an LKV373 for HDMI input and a network router to isolate the external LAN from the broadcast UDP used by the LKV373.
  • A simpler configuration using USB-connected input devices, controlled by a Portsdown 4 or Portsdown 2020.

This page now describes the simpler configuration. The LKV373 configuration is described here Jetson Nano LKV373

Supported sources include:

  • ATEM Mini Pro
  • EagleEye Mini USB Camera with (standard Portsdown) USB Mic dongle
  • Elgato Camlink 4K HDMI Dongle

Simple Nano.jpg

Software Build for the Jetson Nano (updated 29 Jan 23)

To start with, you need a Jetson Nano 4GB, a 32 GB SD Card (Sandisk Ultra 10 recommended), a 4A 5V PSU with a 2.1mm power plug, a 0.1 inch jumper, an HDMI monitor, a USB Mouse and a USB keyboard. The 2 GB Jetson Nano might work (and will need a different SD Card Image) but has not been tested.

Fit the jumper link to the Nano PCB at J48 to select the use of the 2.1mm power socket, and connect the HDMI monitor, keyboard and mouse. and also a wired network connection with internet access. The monitor, keyboard and mouse are only required during the set-up phase.

On another computer, download the Jetson Nano Disk image from the links just under "JETSON NANO DEVELOPER KITS" on this page Jetpack SDK 4.6.3. The direct link for the download is here. You should download a 6.4 GB file called jetson-nano-jp461-sd-card-image.zip. Later versions of the "Jetpack" may or may not work.

Unzip the file (resulting in a 13.4 GB file called sd-blob-b01.img) and use Win32 Disk Imager or Etcher to write it to your SD Card. No additional files are required on the card - simply insert it into the Jetson and boot up.

On boot, first accept the licence agreement, then select your language, then you keyboard layout and timezone. Then fill in the following fields:

Your name:             Your first name
Your computer's name:  jetson-nano
Pick a username:       nano
Choose a password:     jetson
Confirm your password: jetson

and select "Log in automatically"

Then accept the default APP Partition Size (30422) and the default Nvpmodel Mode. The system will reconfigure and reboot.

After the reboot, close the keyboard shortcuts, then go through the gnome-initial-setup, selecting "No, dont send system info".

Click on "System Settings" (the cogwheel and spanner) in the left hand sidebar, then select "Security and Privacy" and in the Security tab untick "Waking from Suspend" and Returning from blank screen". Close the window with the orange cross in the top left corner.

Next, open a terminal window (right click on the desktop and click terminal)) to check the Jetson IP address:

ifconfig eth0

You will see the IP address in the second line of the response after the word inet. Make a note of it for later. Then download the install script, make it executable and run it:

wget https://github.com/davecrump/portsdown4/raw/master/install_for_nano.sh
chmod +x install_for_nano.sh
./install_for_nano.sh

If prompted to install a new version of any file, select Y. Also, select Yes to automatically restart the Docker daemon.

Eventually, the Jetson will reboot. You can then disconnect the HDMI monotor, keyboard and mouse.

Setting Up the Portsdown

Set the Jetson Ip address in the Portsdown by selecting Menu3, Jetson/LKV Config, Set Jetson IP Address. Correct connection can be observed by the "Shutdown Jetson" and "Reboot Jetson" buttons being Blue, not Grey.

Next, the SSH connection to the Jetson needs to be checked. Log in to your Portsdown by SSH and go to the command line. Then enter

ssh nano@<Jetson IP address>

for example

ssh nano@192.168.2.139

If you see a "WARNING REMOTE HOST IDENTIFICATION HAS CHANGED", enter

ssh-keygen -f "/home/pi/.ssh/known_hosts" -R "<Jetson IP address>"

for example

ssh-keygen -f "/home/pi/.ssh/known_hosts" -R "192.168.2.139"

now try again

ssh nano@<Jetson IP address>

you should get a prompt "Are you sure you want to continue connecting (yes/no)?". Type yes and press enter. Now enter the password (jetson). After the cionnection is established, type exit and press enter to close it.

If, on initially typing

ssh nano@<Jetson IP address>

you get a prompt for the password, all is well and you can press ctrl-c to cancel it and continue.

These 2 steps need to be repeated for each Portsdown that you use to control the Jetson.

Control from the Portsdown Touchscreen

Use the touchscreen to select:

  • Output to: Jetson Lime
  • Encoder: H265
  • Source:
  1. HDMI for ATEM Mini Pro or Elgato Camlink 4K (only one should be connected at a time)
  2. Webcam for EagleEye Mini webcam
  • Audio: Auto for HDMI Audio, USB Mic for USB Audio Dongle

Then you can select other settings (Modulation, Frequency, Symbol Rate, FEC and Lime Gain) as required. Testing has only been conducted over a narrow range of SRs and FECs. 500KS, FEC 1/2 is a good starting point.

When you shut down your Portsdown using the touchscreen ShutDown button, it will send a ShutDown signal to the Jetson as well, allowing a graceful shutdown of the Jetson without the use of a screen and keyboard.

The GPIO pin 40 on the Jetson can be used to key PAs as it is programmed to go high 15 seconds after TX selection and go low at the end of the transmission. However, please see the warning about GPIO behaviour below.

Working Configurations

Due to limited time only a few configurations ahve been developed and tested for this build version:

  • H265 Test Card with no audio
  • H265 ATEM Mini Pro USB video and audio (select Source HDMI and Audio "Auto")
  • H265 ATEM Mini Pro USB Video with Audio from USB Mic dongle (select Source HDMI and Audio "USB Mic")

Performance

Sadly, the Jetson is now 4 years old, and its performance has been eclipsed by modern PC cards. The practical resolution limit for H265 333 kS FEC 2/3 is 720x1280 (720p). For 1080p, 1 MS FEC 2/3 is required.

Hardware

Power Draw

Measured at a supply of 5.1V into the DC barrel jack connector. >5V measured on the GPIO header.

  • CPU Frequencies at default: 0.3 - 0.6A depending on CPU & Network load
  • CPU Frequencies at max: 0.45 - 0.9A depending on CPU & Network load
  • CPU at max, LimeSDR Mini & C920 at 1MS 1080p H.265 DVB-S2 transmit: 1.8 - 1.9A

GPIO

The GPIO pinout of the Jetson Nano can be found here: https://www.jetsonhacks.com/nvidia-jetson-nano-j41-header-pinout/

Note that when not initialised in sysfs (ie. straight after power-on), the GPIO pins appear to be able to be latched up from their default 0V state to a 3.3V high, or an unstable ~1.4V state by simply touching a scope or multimeter probe to the pin. The exact characteristic of this behaviour isn't yet understood but it is worrying for PA PTT control and similar applications.

Fan

PWM fans are available however the use of a non-PWM 5V fan will cause the fan to simply run all the time (including when the Jetson is shutdown), removing the requirement for the fan to be manually started in software after boot. When using PWM, set a value where the fan runs slowly but reliably to minimise noise. There is some code here https://github.com/Pyrestone/jetson-fan-ctl or here https://github.com/hooperbill/fan-daemon for automatic fan speed control. Manually:

sudo sh -c 'echo XXX > /sys/devices/pwm-fan/target_pwm' where XXX is a number between 0 and 255 setting the PWM speed.

The holes in the heatsink can be tapped for M3 bolts, or can be drilled out. Note that the fins below the holes prevent more than ~3mm of the bolt from protruding below.