Connecting to the internet using solo CLI

Joined
May 6, 2015
Messages
400
Reaction score
226
Age
60
Wow, that's a whole lot "newer" version than either I am using or that solo-cli was written for.
Just a quick comparison between the 2 client.py modules and they are very different.
As a first step I'd try uninstalling 2.3.1 and installing 1.15.0 or 1.16.0.
This may effect the operation of your PC so proceed with caution.
You might also review the versions of the remaining libs in requirements.txt
such as:
docopt>=0.6.0
paramiko>=1.15.0
scp>=0.10.0
requests>=2.5.0
We are getting closer - thanks!
My versions:
docopt 0.6.2
paramiko 2.3.1
scp 0.10.2
requests 2.18.4
asn1crypto 0.23
bcrypt 3.1.4
cryptography 2.1.2

I uninstalled paramiko and tried to install pip install paramiko==1.15.0

The build fails with the following error:

710D4EC2-3C73-4CBA-BFBF-7502B62D003E.jpeg

6AD30E2E-0637-42A6-8BE9-D8971132255C.jpeg

What version is your crypto lib and how can I install it?
Thanks!
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
docopt 0.6.2 --> 0.6.2
paramiko 2.3.1 --> 1.16.0
scp 0.10.2 --> 0.10.2
requests 2.18.4 --> 2.9.1
asn1crypto 0.23 --> NONE
bcrypt 3.1.4 --> NONE
cryptography 2.1.2 --> 1.2.3

Hmmm, what version of windows are you running?
How did you install python 2.7? was it part of your windows distribution or did you install it by hand?

Your build failure is probably due to the above packages being so very much newer and paramiko not fulfilling their needs.

One thing I'd be interested in is this:
1) boot up Solo, Artoo, and laptop. connect to Artoo's wifi, then ssh into Artoo.
2) run "cat /var/log/auth.log on Artoo
3) then run "solo info" from the laptop then ^C after a while after it hangs (at least 10-15 seconds)
4) run "cat /var/log/auth.log" on Artoo
5) post results of both cat commands.

This should tell us what Artoo saw in terms of your laptop trying to log in. #2 will tell us where to start looking, #4 should tell why Artoo didn't like the login. If it gets that far.

Do the above with your standard python & windows setup.
 
  • Like
Reactions: Saijin_Naib
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
OOps, don't bother with the cat /var/log/auth.log, the Solo's Yocto dist doesn't log that info. Sorry.

But it does put that info in messages, so do the above but with "cat /var/log/messages" instead
;>))

Only post the last 25 lines or so. Looking for something like "...Accepted password for root from..."
 
Joined
May 6, 2015
Messages
400
Reaction score
226
Age
60
The issue seems to be with the newer versions of the crypto stuff in my python setup which prevent Solo CLI to establish a SSH connection to the Solo controller.
I am running 2.7.14 which is the current version of Python 2.7. With this come the latest libraries including paramiko2.x with significantly revised crypto libraries.
According to the paramiko release notes, “Paramiko 1.x (specifically, 1.13 and up). Users are strongly encouraged to upgrade to 2.0 when possible; PyCrypto (which is needed for the SSH protocol implementation), is no longer maintained and contains security vulnerabilities.”
And further: “Note 1.x will eventually be entirely end-of-lifed.”

So long story short, I likely would need to go 2+ years back in the release history of Python 2.7 on Windows to find a package with matching versions of the cryptography to what is used in Solo.

I stop here, since I don’t have a use case and a need for CLI at the moment in my projects.
Thanks everyone here for their help and support to track down the issue.
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
Since I don't have a windows box to try this on, I probably won't be able to help much more.
I think that the issue is that the solo-cli was written for and debugged on a far older version of python2.7 AND the dependant libs. It is going to take a windows/python expert to re code some of solo-cli to make it work properly.
IMHO the problem is not solo-cli (it works as described with its' dependencies) but with "evolution" as the python code it depends on has evolved (improved) over time and things don't quite work as they used to..... for better, and sometimes worse...
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
I had a thought about how to test the theory that "newer" versions of the python dependencies are the problem, without me having to get a windows box. I'll just update all that python code to your versions and try and run the solo-cli commands.
If I get some time later this week, I'll give it a try.
What could possibly go wrong ;>))
 
  • Like
Reactions: Saijin_Naib
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
I installed VirtualBox and Win 10 on a Linux Mint 18.2 laptop. I was then able to install Python2.7, cryptography, paramiko , etc and solo-cli.
I was able to repeat fpvsteve's problem. Now I can poke at the solo-cli python code and see if I can come up with a solution. Not being an expert in python or windows will no doubt hamper my efforts...no promises.
 
  • Like
Reactions: fpvsteve
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
fpvsteve,
Could you try the following on your windows box using the standard python 2.7 + cryptography + paramiko + etc. install that you did.
Use the __init__.py from my previous post as well (assuming that you have updated your controller & solo to OpenSolo).

In a command prompt window, cd to the the Python27 directory, then type "python" to bring up the python interperter, you should see something like "Python 2.7.?? ...." followed by the >>> prompt.
Then type "import soloutils"
Then type "soloutils.info.main('info')"
and post the results.

I think I have a clue as to the problem, but I want to be sure that what I am seeing is what you are as well.
Thanks...

Of course you need to be connected to Artoo & Solo as well.
 
Joined
May 6, 2015
Messages
400
Reaction score
226
Age
60
Progress! with entering that I can connect and soloutils delivers the right result
Any idea why solo info on the command line fails? Could be a path issue somewhere...
72FFC600-B73B-4B92-8198-8953248F47EB.jpeg

I am not on OpenSolo btw.
 
  • Like
Reactions: Saijin_Naib
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
Definitely progress!!
The problem is windows. I've no clue how to fix it, but it seems there is either a permissions problem when the code is run from the command line, or there is a path issue with the path to the host keys not being correct. When run from the python interpreter, things seem to work. It may also have to do with admin rights. Here I am way out of my depth with windows. I struggled for hours as the last time I used windows for anything useful was over 15 years ago.

Next, you might try the same procedure as above but with --> soloutils.wifi.main('--name=ssid --password=password')

If you are not on OpenSolo, the need for my __init__.py is moot. But it works with either. The issue is with OpenSolo, Matt added some additional lines in the /VERSION file on Artoo which the original __init__.py can't parse.
 
Joined
May 6, 2015
Messages
400
Reaction score
226
Age
60
I tried several things, but no success. Do you know where to find the source for the solo.exe file?
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
No, I think that gets created by setup.py during the installation of solo-cli.
I haven't tried running solo wifi on my virtual box so I'll give it a try tomorrow.
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
Just tried it on my VirtualBox setup andif I edit wifi.py, I can hard code my SSID and password and bypass the input args and I can connect Artoo to the internet, don't even have to have Solo turned on.
Did you get a "Type Error" when trying the wifi command? That's what I got which leads me to believe that running that from the python interpreter has some argument passing issues, as in I don't know what I'm doing. ;>))
But, I believe that if I can figure out the argument passing that it can at least work from the interpreter.
 
Joined
May 6, 2015
Messages
400
Reaction score
226
Age
60
I am getting a type error as well.
By hard coding your SSID, would it be then possible to install eg Runit?
That was the main reason for me to install CLI..
 
Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
73
I think, after looking at install_runit.py, that all you should need to do is:
>>> import soloutils
>>> soloutils.install_runit.main('runit')

Yes you would first need to connect to the internet with a hard coded ssid & password.
 

New Threads

Members online

No members online now.

Forum statistics

Threads
12,828
Messages
146,200
Members
15,236
Latest member
simondh1