Categories
Cloudvue Cameras Knowledge Support Cloudvue Support Categories Products

Adding SCP to Illustra Essentials C2C Cameras

Description 

Illustra Essential cameras were manufactured by Topview and do not include scp (Secure Copy Protocol).  As a result, files cannot be easily transferred to or from the device.  The debug.sh script can be used to temporarily install scp onto the device enabling up/downloading of files.  While scp will not survive a reboot the debug script, debug.sh does and can be used to quickly add scp as needed.

Product 

  • Illustra Essential
  • Cloudvue C2C

Prerequisites

  • Confirm the device is a Topview manufactured camera
  • Verify that debug.sh does not already exist in /home/smartvue
  • Download the debug.sh script from the support portal HERE
  • Open the debug script in Notepad++ on your machine
  • Establish an ssh session via the Cloudvue Tunneling server to the camera

Solution

Identifying a Topview Camera

The  most common ways to identify Topview manufactured cameras are: 

  • In Cloudvue Manager (Device Details > Firmware Version) look for “Essentials”
  • Check the architecture, Topview  cameras use the MIPS architecture which can be found using the uname command on the device. 
  • </code># uname -a<br>Linux Essentials4-T10A212700003131 4.1.0 #6 PREEMPT Thu Nov 24 09:54:36 CST 2022 mips GNU/Linux</code>

Creating the Debug Script

Since there is no way to initially transfer the debug script to the device it will need to be manually created.  This is done by cutting and pasting the contents of the script from your machine to a new debug script file on the camera.  Please note the only text editor available on these devices is vi.

  • On the camera launch vi with the name of the script
  • <code># vi debug.sh</code>
  • Paste from Notepad++
    • Within vi
    • Press lowercase letter “o” to insert a line below the current line and go into edit mode
    • Press the up arrow key to move to the 1st line
    • Paste the entire contents of the debug.sh file from notepad++ on your machine to vi
    • Note: It will take some time for the paste to complete and it will occasionally pause.
  • Verify Accuracy
    • When the paste has completed verify that the last lines from Notepad++ match those pasted in vi
    • Failure – Last Line Does Not Match
      • Press the “esc” Escape key to exit “insert Mode”
      • Type “:q!” and press enter to force quit without saving any changes ‘
      • Attempt creating the debug script again
    • Success – Last Lines Match
      • Press the “esc” Escape key to exit “insert Mode”
      • Type “:wq” and press enter to open a vi command prompt, write the changes to file and quit vi

Running debug.sh

Before running the first time debug.sh must be made executable using the chmod command.

<code># chmod +x debug.sh</code>

  • Now Launch the script by proceeding the file name with “./”.  If all went well with the creation process debug.sh will run and a menu of choices will be displayed.
  • <code> # ./debug.sh <br>CHOICES:<br>0. print [h]elp<br>1. debug <br>[m]essaging<br>2. debug [r]ecorder<br>3. [R]estart camera or services<br>4. [i]nstall scp on Essentials<br>5. [q]uery iAPI<br>6. print/update [e]nvironment<br>7. [o]pen firmware logs<br>8. run [v]ideo sync<br>9. pretty-print [j]son<br>10. query camera re[b]oots<br>11. query local [d]atabase<br>12. bundle [l]ogs<br>Please select an option: 4<br>#</code>
  • Select option 4 and press enter to install scp on Essentials.
  • When successful no message is returned and debug.sh will terminate.
  • If scp is already installed the message “”scp already exists in path. Cancelling scp install…”” will be displayed and debug.sh will terminate.
  • Installation of scp can be confirmed using the which command.
  • <code># which scp<br>/bin/scp</code>

scp has now been successfully installed and files can be transferred using scp or other tools such as MobaXterm.

Categories
Knowledge Support Cloudvue Cloudvue Gateway Support Categories Products

Using Rsync to Transfer Files to a Cloudvue Gateway

Description 

At times it may be necessary to move files to a Cloudvue Gateway and while other tools such as SCP or MobaXterm can usually manage the job, rsync can track progress and resume after an interruption which can be particularly useful when transferring large files like the latest Cloudvue software or on slow or unstable connections.

Product

  • Cloudvue Gateway

Solution

The command structure is:

rsync -p -e ‘ssh -p [PORT]’ [PATH/FILENAME] smartvue@[IPADDRESS]:/home/smartvue
  • -P  option will force rsync to show a progress bar and keep partially transferred files. 
  • -e  option allows you to specify a different listening port on the remote host
  • ‘ssh – p [PORT]’  Specifies that ssh be used through a specific port number, use 7627 if local or whatever port was assigned in Cloudvue Manager when setting up the tunnel
  • [PATH/FILENAME]  The local path and  file name to be transferred
  • [IPADDRESS]  The IP address of the Cloudvue Gateway, the LAN IP if local or localhost when tunneling
  • :/home/smartvue  The smartvue home folder on Cloudvue Gateways

Note: When tunneling you must first establish the tunnel. You will then need to open a 2nd instance of WSL or terminal to run the rsync commands.

Examples

In the following examples a file named “22.9.2-smartvue-x64-production.tar.bz2” located in “/home/joakest/tunneling/” is transferred to the gateways smartvue users home folder.

Local Connection

$ rsync -P -e 'ssh -p 7627' /home/joakest/tunneling/22.9.2-smartvue-x64-production.tar.bz2 smartvue@192.168.1.180:/home/smartvue
smartvue@localhost's password:
22.9.2-smartvue-x64-production.tar.bz2
200,493,957 100% 390.99MB/s 0:00:00 (xfr#1, to-chk=0/1)
  • When prompted enter the SSH password found in Cloudvue Manager.
  • The progress of the file transfer will display, and the prompt will return when completed.

Tunnel Connection

$ rsync -P -e 'ssh -p 8346' 22.9.2-smartvue-x64-production.tar.bz2 smartvue@localhost:/home/smartvue
The authenticity of host '[localhost]:8346 ([127.0.0.1]:8346)' can't be established.
ED25519 key fingerprint is SHA256:nw6P03KIwsjiKfy2fkJJjRUSi4dJA6gwLyd7/+0Fz0Y.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added '[localhost]:8346' (ED25519) to the list of known hosts.

smartvue@localhost's password:
22.9.2-smartvue-x64-production.tar.bz2
200,493,957 100% 249.79kB/s 0:13:03 (xfr#1, to-chk=0/1)
  • Since this is the first time a ssh connection has been established to this NVR from the local machine the authenticity warning will appear.
  • Continue by typing in “yes” and pressing enter.