|
Re: Is FTP going to be available by default on roboRIO
Quote:
Originally Posted by virtuald
That solution has a bootstrapping problem.
[rhetorical question] To access the server, it has to first be on the roboRIO, and it has to be running. How does one get the server on the roboRIO (and get it running) without SSH? [/end]
This question actually comes from my work creating the RobotPy installer. We *could* ask the user to install it on the roboRIO directly via SSH/SCP, but that makes the bar of installing RobotPy just a little bit higher, which is not desirable. In previous years, we had a two step installation process -- install python on your dev machine, run the install script which then automatically copies the right files to the cRio -- and I'd like very much for it to stay that way.
FWIW I've come to terms with the problem and I've devised a way that I can maintain my cross-platform compatibility without too much pain and suffering.
|
The RoboRio comes preloaded with a SSH server, SFTP server, webserver (already in use), and an FTP server.
The recommendation made by Joe to avoid using FTP is predicated on the fact that by default, the FTP only accepts anonymous logins, and as such anything you transfer over will have permissions not set properly.
If you want the permissions of your files to be set to the user running the FRC Robot Code, so that you do not run into file permission issues when reading or writing the files you transferred then use SCP (via SSH) or SFTP and login with the appropriate user.
Could users re-config the FTP server after the fact? Sure.
However, since your questioning is based on running an install script, you should re-write your install script to SSH into the RoboRio and transfer the files to the proper locations. This is exactly how the C++/Java build scripts transfer the binaries from your dev machine to the RoboRio when writing code. You can access the RoboRio by using mDNS and asking the user for their team number, such that you ssh into roborio-TEAM#.local
To make your script more bullet proof, have it fall back to the USB 172.22.11.2 address and check 10.TE.AM.2 address if it can not resolve mDNS.
If you want your script to be cross platform, you can do this in many ways, scp is loaded on Linux and mac by default so you can just use that command line, on windows you can pre-package your script with pscp.exe from putty to run as a command line tool, or you can use something like jsch.jar from jcraft.com project to provide your script scp capabilities on all platforms it is running on.
Hope this helps,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
|