Difference between revisions of "Jetson Nano"

From BATC Wiki
Jump to navigation Jump to search
 
(61 intermediate revisions by 7 users not shown)
Line 1: Line 1:
This page is a starting point for resources for using the Jetson Nano to drive a LimeSDR to transmit DATV.
+
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.
  
===G8GKQ's Installation Procedure===
+
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.
  
To start with, you need a Jetson Nano, 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.
+
This page now describes the simpler configuration.  The LKV373 configuration is described here [[Jetson Nano LKV373]]
  
Download the Jetson Nano disk image to a PC and unzip it.  Use Win32 Disk Imager or Etcher to write it to your SD Card.
+
Supported sources include:
  
Fit the jumper link to the Nano PCB to select the use of the 2.1mm power socket, insert the SD Card, connect the monitor, keyboard and mouse.  Connect the Nano to your home network and then connect the power and turn it on.  Go through the NVIDIA start up routine so that you have a working Nano connected to your network.  I used the username "nano" and the password "jetson".  These are weak and obvious and should only be used on private networks, but make scripting easy.
+
* ATEM Mini Pro and ATEM Mini
 +
* EagleEye Mini USB Camera with (standard Portsdown) USB Mic dongle
 +
* Elgato Camlink 4K HDMI Dongle
 +
* Raspberry Pi Camera Version 2 connected to the Jetson through a CSI ribbon with (standard Portsdown) USB Mic dongle
  
Note that the process may seem to freeze on "waiting for unattended-upgr to exit" for around 30 minutes, this is expected, the system is automatically updating software in the background.
+
[[File:Simple Nano.jpg|800px]]
  
Right-click on the desktop and open a terminal window.  Run the following commands.  You will need to enter the password occasionally.
+
===Software Build for the Jetson Nano (updated 3 Feb 23)===
  
  sudo apt-get update
+
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.
sudo apt-get -y dist-upgrade
 
sudo apt-get -y install git htop nano vlc v4l-utils
 
  
You are now ready to install the DATV software.
+
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.
  
===Installing DATV Software===
+
On another computer, download the Jetson Nano Disk image from the links just under "JETSON NANO DEVELOPER KITS" on this page [https://developer.nvidia.com/jetpack-sdk-463 Jetpack SDK].  The direct link for the download is [https://developer.nvidia.com/embedded/l4t/r32_release_v7.1/jp_4.6.1_b110_sd_card/jeston_nano/jetson-nano-jp461-sd-card-image.zip here]; the latest version for the Jetson Nano is 4.6.1.  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.
  
Download and install the software from F5OEO's repository:
+
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.
  
  git clone https://github.com/F5OEO/dvbsdr
+
On boot, first accept the licence agreement, then select your language, then you keyboard layout and timezone. Then fill in the following fields:
cd dvbsdr
 
./install.sh
 
  
===Current Limitations===
+
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.  If asked whether you want to minimise the installation, say no.
  
The only input devices that work with this script are the LKV373A, and the Pi Cam when connected to the Jetson board.  The PiCam will not work without a USB microphone dongle connected to the Jetson board - without this it never transmits a picture.
+
Eventually, the Jetson will reboot.  You can then disconnect the HDMI monitor, keyboard and mouse.  Connect the LimeSDR Mini to the Jetson (and the ATEM or webcam).
  
The C920, although referenced in some of the code, does not work with this configuration.
+
===Setting Up the Portsdown===
  
===Preparing the LKV373A HDMI Device===
+
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.
  
This is probably the most difficult part of the installationMore details to follow, but I upgraded the firmware (not encoder) to 20160427 using the instructions here: https://www.yodeck.com/docs/display/YO/Creating+a+Video-Wall+with+Yodeck#CreatingaVideo-WallwithYodeck-J.ConfiguringtheLKV373ASenderunit I also set the unit to factory defaults, but did not change any other settings.
+
Next, the SSH connection to the Jetson needs to be checkedLog 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.
  
After the firmware upgrade, the username and password for the LKV373A is admin/123456.
+
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.
  
If you have issues with the firmware upgrade, recovery might be possible using the IPV Tools application found here: https://drive.google.com/drive/u/0/folders/0B3mWuDyxrXyKSTZZZlRESlpBZmM.
+
These 2 steps need to be repeated for each Portsdown that you use to control the Jetson.
  
At various times during the LKV373A set-up, it had the following IP addresses: 192.168.1.238, 10.1.0.99, 10.1.2.99, and 169.254.113.227.
+
===Control from the Portsdown Touchscreen===
  
The address for the stream is almost always udp://@239.255.42.42:5004 (you can paste this into VLC on a PC and watch the stream).  Note that you cannot view the stream using VLC on the Jetson Nano - for some reason it does not work.
+
Use the touchscreen to select:
 +
* Output to: Jetson Lime
 +
* Encoder: H265
 +
* Source:
 +
# HDMI for ATEM Mini Pro or Elgato Camlink 4K (only one should be connected at a time)
 +
# Webcam for EagleEye Mini webcam connected to the Jetson
 +
# Pi Cam for a Raspberry Pi Camera V2 connected to the Jetson
 +
* Audio: Auto for HDMI Audio, USB Mic for USB Audio Dongle
  
===Modifying the Scripts===
+
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.  333 kS, FEC 2/3 is a good starting point.  You may find that some selections you want to make are greyed-out; select them anyway - the combinations above are valid.
  
To transmit using the Nano, you will need to plug a LimeSDR Mini into it.  You will also need to modify the script ~/dvbsdr/scripts/jetson_nano.sh. The working script is here:
+
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.
  
#!/bin/bash
+
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 transmissionHowever, please see the warning about GPIO behaviour below.
+
 
# *********************************************************************
+
===Working Configurations===
# ************** ENCODE AND MODULATE FOR JETSON NANO ******************
+
 
# ************** (c)F5OEO April 2019                ******************
+
Due to limited time only a few specific configurations have been developed and tested so far:
# *********************************************************************
 
 
CALL=G8GKQ
 
# ------- MODULATION PARAMETERS --------
 
# 1/4,1/3,2/5,1/2,3/5,2/3,3/4,4/5,5/6,8/9,9/10 for DVB-S2 QPSK.
 
# 3/5,2/3,3/4,5/6,8/9,9/10 for DVB-S2 8PSK
 
source ./include/modulateparam.sh
 
FREQ=2409.25
 
SYMBOLRATE=500
 
FECNUM=1
 
FECDEN=2
 
#DVBS,DVBS2
 
MODE=DVBS2
 
#QPSK,8PSK,16APSK,32APSK
 
CONSTELLATION=QPSK
 
GAIN=0.8
 
# $LONG_FRAME,$SHORT_FRAME
 
TYPE_FRAME=$LONG_FRAME
 
# $WITH_PILOTS,WITHOUT_PILOTS
 
PILOTS=$WITHOUT_PILOTS
 
# Upsample 1,2 or 4 : 4 delivers the best quality but should not be up to 500KS
 
UPSAMPLE=2
 
 
# ------- ENCODER PARAMETERS --------
 
 
VIDEO_RESX=1280
 
# 16:9 or 4:3
 
RATIO=16:9
 
case "$RATIO" in
 
"16:9")
 
let VIDEO_RESY=VIDEO_RESX*9/16 ;;
 
"4:3")
 
let VIDEO_RESY=VIDEO_RESX*3/4 ;;
 
esac
 
 
#Uncomment if don't want to use ratio calculation
 
#VIDEO_RESY=1080
 
 
#Only 25 is working well with audio
 
VIDEO_FPS=25
 
#Gop Size 1..400 (in frame)
 
VIDEO_GOP=100
 
PCR_PTS=200000
 
#VIDEO INPUT
 
 
#Could be VIDEOSOURCE_PICAMERA, VIDEOSOURCE_USB_CAM , VIDEOSOURCE_IP
 
VIDEOSOURCE=VIDEOSOURCE_IP
 
#VIDEOSOURCE=VIDEOSOURCE_PICAMERA
 
VIDEOSOURCE_IP_ADRESS=239.255.42.42
 
VIDEOSOURCE_IP_PORT=5004
 
 
# H264 or H265
 
CODEC=H265
 
 
#AUDIO INPUT
 
 
# NO_AUDIO,USB_AUDIO,FILE_WAV,BEEP
 
AUDIOSOURCE=USB_AUDIO
 
AUDIO_BITRATE=20000
 
 
# Bitrate
 
source ./include/getbitrate.sh
 
let TS_AUDIO_BITRATE=AUDIO_BITRATE*14/10
 
let VIDEOBITRATE=(BITRATE_TS-12000-TS_AUDIO_BITRATE)*650/1000
 
let VIDEOPEAKBITRATE=VIDEOBITRATE*110/100
 
#OUTPUT TYPE LIME or IP
 
OUTPUT=LIME
 
OUTPUT_NETWORK="230.0.0.10:10000"
 
# Launch processes
 
echo
 
echo VideoBitrate = $VIDEOBITRATE
 
echo VideoPeakBitrate = $VIDEOPEAKBITRATE
 
 
case "$OUTPUT" in
 
"LIME")
 
source ./include/nanoencode.sh | source ./include/limerf.sh
 
;;
 
"IP")
 
source ./include/nanoencode.sh
 
;;
 
esac
 
 
  
+
* H265 Test Card with no audio (select Source TestCard)
 +
* H265 Elgato Camlink 4K HDMI Capture USB video and audio (select Source HDMI and Audio "Auto")
 +
* H265 Elgato Camlink 4K HDMI Capture USB Video with audio from USB Mic dongle (select Source HDMI and Audio "USB Mic")
 +
* 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")
 +
* H265 Polycom EagleEye Mini USB Webcam with Audio from USB Mic dongle (select Source Webcam)
 +
* H265 Raspberry Pi Camera V2 connected to Jetson by CSI with Audio from USB Mic dongle (select Source Pi Cam)
  
Most of this is self-explanatoryNote that "short frames" do not work.
+
Note that if both the Elgato CamLink 4K capture device and the ATEM Mini Pro are connected by USB, the Elgato is used as first preference when HDMI is selected as a sourceBoth these devices need a USB 3.1 cable for connection.
  
===Transmitting===
+
Both the LimeSDR Mini V1 and LimeSDR Mini V2 are supported.
  
cd ~/dvbsdr/scripts
+
===Performance===
./jetson_nano.sh
 
  
To stop transmitting, simply press ctrl-c.
+
Sadly, the Jetson is 2019 technology, 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.  The Jetson/Lime combination struggles to transmit at more than 2 MS.
  
 +
===PTT Switching===
  
===Update - Control from Portsdown Touchscreen===
+
The Jetson GPIO pin 40 is set high when it is safe to energise the PA (after the LimeSDR calibration spike).  This occurs about 15 seconds after the transmit selection.  The controlling Portsdown GPIO pin 40 is also set high at about the same time.  There is no PTT signal (or band switching signal) on the LimeSDR Mini GPIO connector.
  
Version 201905070 of the Portsdown Software (currently only available as a Development Release) introduces Control of a Jetson Nano set up as above from the Portsdown touchscreen in H265 HDMI mode ONLY.
+
Note that the Jetson GPIO interface is not as robust as the Raspberry Pi GPIO and tends to latch-up if abused.  It is recommended that an opto-isolator is used for isolation.
  
To set this up, load the development release, and then edit the file
+
===Problem Solving===
/home/pi/rpidatv/scripts/jetson_config.txt
 
with your settings:
 
jetsonip=192.168.2.113
 
jetsonuser=nano
 
jetsonpw=jetson
 
jetsonrootpw=jetson
 
lkvudp=239.255.42.42
 
lkvport=5004
 
tsoutip=192.168.2.177
 
tsoutport=10000
 
You will probably only need to change the 4 jetson lines.  After you have done this, use the touchscreen to select:
 
* Output to: Jetson Lime
 
* Encoder: H265
 
* Source: HDMI
 
Then you can select other settings as required.  Testing has only been conducted over a narrow range of SRs and FECs.  500KS, FEC 1/2 is a good starting point.
 
  
The Jetson settings will be configuarable from the Portsdown touchscreen in a future release.
+
This is a complex configuration to get working. Some pointers if it does not work for you:
  
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.
+
* Make sure that the Jetson 5v power supply and cabling is good quality.  The Jetson can accept 5.25 V, so aim to give it 5.2 V at the barrel connector.  The LimeSDR Mini likes to have at least 5.0v to the LimeSDR Mini during transmit.  Measure this voltage on the edge connections of the LimeSDR Mini.  Lower voltages may not be reliable.
 +
* If the Jetson IP address changes, you will need to change it in the Portsdown settings '''AND''' re-approve the SSH connection from the Portsdown to the Jetson - just like you did in the set-up procedure.  Setting your router to always give the Jetson the same IP address can help prevent this.
 +
* The Pi Cam and EagleEye camera sources will not work unless a compatible USB Audio dongle is connected to the Jetson.
 +
* The ATEM and the Camlink 4K need to be connected to the Jetson with USB 3.1 cables (the blue connectors with the extra pins), not USB 2 cables.
 +
* Sometimes if the transmit selection is cancelled before the Jetson starts transmitting, the ATEM gets de-registered on the USB and is invisible to the Jetson.  This shows as a DVB-S2 lock with no service information or video.  The cure for this is to come out of transmit, recycle the power to the ATEM, pause for a few seconds and then reselect transmit.
  
 
== Hardware ==
 
== Hardware ==
Line 180: Line 137:
 
Measured at a supply of 5.1V into the DC barrel jack connector. >5V measured on the GPIO header.
 
Measured at a supply of 5.1V into the DC barrel jack connector. >5V measured on the GPIO header.
  
* CPU Frequencies at deafult: 0.3 - 0.6A depending on CPU & Network load
+
* 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 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
+
* CPU at max, LimeSDR Mini & webcam at 1MS 1080p H.265 DVB-S2 transmit: 1.8 - 1.9A
  
 
=== GPIO ===
 
=== GPIO ===
Line 188: Line 145:
 
The GPIO pinout of the Jetson Nano can be found here: https://www.jetsonhacks.com/nvidia-jetson-nano-j41-header-pinout/
 
The GPIO pinout of the Jetson Nano can be found here: https://www.jetsonhacks.com/nvidia-jetson-nano-j41-header-pinout/
  
{| class="wikitable"
+
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.
|-
+
 
! GPIO Default State !! GPIO Number or ''function'' !! Header Pin # !! Header Pin # !! GPIO Number or ''function'' !! GPIO Default State
+
=== Fan ===
|-
+
 
| Example || Example || 1 || 2 || Example || Example
+
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:
|-
+
 
| Example || Example || 3 || 4 || Example || Example
+
sudo sh -c 'echo XXX > /sys/devices/pwm-fan/target_pwm'  where XXX is a number between 0 and 255 setting the PWM speed.
|-
+
 
| Example || Example || 5 || 6 || Example || Example
+
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.
|-
 
| Example || Example || 7 || 8 || Example || Example
 
|-
 
| Example || Example || 9 || 10 || Example || Example
 
|-
 
| Example || Example || 11 || 12 || Example || Example
 
|-
 
| Example || Example || 13 || 14 || Example || Example
 
|-
 
| Example || Example || 15 || 16 || Example || Example
 
|-
 
| Example || Example || 17 || 18 || Example || Example
 
|-
 
| Example || Example || 19 || 20 || Example || Example
 
|-
 
| Example || Example || 21 || 22 || Example || Example
 
|-
 
| Example || Example || 23 || 24 || Example || Example
 
|-
 
| Example || Example || 25 || 26 || Example || Example
 
|-
 
| Example || Example || 27 || 28 || Example || Example
 
|-
 
| Example || Example || 29 || 30 || Example || Example
 
|-
 
| Example || Example || 31 || 32 || Example || Example
 
|-
 
| Example || Example || 33 || 34 || Example || Example
 
|-
 
| Example || Example || 35 || 36 || Example || Example
 
|-
 
| Example || Example || 37 || 38 || Example || Example
 
|-
 
| Example || Example || 39 || 40 || Example || Example
 
|}
 

Latest revision as of 17:10, 6 February 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 and ATEM Mini
  • EagleEye Mini USB Camera with (standard Portsdown) USB Mic dongle
  • Elgato Camlink 4K HDMI Dongle
  • Raspberry Pi Camera Version 2 connected to the Jetson through a CSI ribbon with (standard Portsdown) USB Mic dongle

Simple Nano.jpg

Software Build for the Jetson Nano (updated 3 Feb 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. The direct link for the download is here; the latest version for the Jetson Nano is 4.6.1. 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. If asked whether you want to minimise the installation, say no.

Eventually, the Jetson will reboot. You can then disconnect the HDMI monitor, keyboard and mouse. Connect the LimeSDR Mini to the Jetson (and the ATEM or webcam).

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 connected to the Jetson
  3. Pi Cam for a Raspberry Pi Camera V2 connected to the Jetson
  • 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. 333 kS, FEC 2/3 is a good starting point. You may find that some selections you want to make are greyed-out; select them anyway - the combinations above are valid.

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 specific configurations have been developed and tested so far:

  • H265 Test Card with no audio (select Source TestCard)
  • H265 Elgato Camlink 4K HDMI Capture USB video and audio (select Source HDMI and Audio "Auto")
  • H265 Elgato Camlink 4K HDMI Capture USB Video with audio from USB Mic dongle (select Source HDMI and Audio "USB Mic")
  • 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")
  • H265 Polycom EagleEye Mini USB Webcam with Audio from USB Mic dongle (select Source Webcam)
  • H265 Raspberry Pi Camera V2 connected to Jetson by CSI with Audio from USB Mic dongle (select Source Pi Cam)

Note that if both the Elgato CamLink 4K capture device and the ATEM Mini Pro are connected by USB, the Elgato is used as first preference when HDMI is selected as a source. Both these devices need a USB 3.1 cable for connection.

Both the LimeSDR Mini V1 and LimeSDR Mini V2 are supported.

Performance

Sadly, the Jetson is 2019 technology, 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. The Jetson/Lime combination struggles to transmit at more than 2 MS.

PTT Switching

The Jetson GPIO pin 40 is set high when it is safe to energise the PA (after the LimeSDR calibration spike). This occurs about 15 seconds after the transmit selection. The controlling Portsdown GPIO pin 40 is also set high at about the same time. There is no PTT signal (or band switching signal) on the LimeSDR Mini GPIO connector.

Note that the Jetson GPIO interface is not as robust as the Raspberry Pi GPIO and tends to latch-up if abused. It is recommended that an opto-isolator is used for isolation.

Problem Solving

This is a complex configuration to get working. Some pointers if it does not work for you:

  • Make sure that the Jetson 5v power supply and cabling is good quality. The Jetson can accept 5.25 V, so aim to give it 5.2 V at the barrel connector. The LimeSDR Mini likes to have at least 5.0v to the LimeSDR Mini during transmit. Measure this voltage on the edge connections of the LimeSDR Mini. Lower voltages may not be reliable.
  • If the Jetson IP address changes, you will need to change it in the Portsdown settings AND re-approve the SSH connection from the Portsdown to the Jetson - just like you did in the set-up procedure. Setting your router to always give the Jetson the same IP address can help prevent this.
  • The Pi Cam and EagleEye camera sources will not work unless a compatible USB Audio dongle is connected to the Jetson.
  • The ATEM and the Camlink 4K need to be connected to the Jetson with USB 3.1 cables (the blue connectors with the extra pins), not USB 2 cables.
  • Sometimes if the transmit selection is cancelled before the Jetson starts transmitting, the ATEM gets de-registered on the USB and is invisible to the Jetson. This shows as a DVB-S2 lock with no service information or video. The cure for this is to come out of transmit, recycle the power to the ATEM, pause for a few seconds and then reselect transmit.

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 & webcam 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.