Elevator-tool to preconfigure before you Elevate

Hi

I've made the attached script which uses the Elevator script from:-

https://github.com/m0sia/elevator

It adds a it in a GUI, and allows multiple IP address to be used, and can edit the JSON file to the IP address of the radio.

If you don't add a password and or JSON file it will not perform  that step.

Enjoy

1 Like

Hi NGL_Connection,

You have to specify firmware version with "-n" parameter if you are using elevator.py

I believe you have to use only first two digits(eg 3.4, not 3.4.1).

Dmitry

1 Like

Not sure what I'm doing wrong. I tried repeatedly to get this to elevate a radio with just enough settings for it to connect to the ePMP AP and have an IP address so I can reach it and configure it.  

I'm using the GUI tool.

A Nanostation M2 XM 6.0.3 

Elevate firmware 3.2.2 and tried 3.4.1

I just uploaded the elevate firmware to a NS M2 , configured it with just most basic settings, bridge, IP,  and SSID. I then save the config as test.json   I get another NS M2 that is configured like  one of my ubiquiti customer radios and I connect to it via ethernet (not doing this to a live radio on a tower)

I start the GUI via the batch file that comes with it. I enter the username/password for the radio, the version I just enter 3.2  (tried 3.2.2 and when using 3.4.1 I tried 3.4.1 and just 3.4)  I select the test.json I created with the elevated NS I select the elevated firmware and enter the IP of the radio.   The upgrade reports every setp via the command window and everything goes as expected. 

However when I'm done the the radio has been updated to the elevate firmware but all settings are at default... it can also only be accessed using the 192.168.0.2  the  169.254.1.1  doesn't work  (not sure if that is relevant)

Also of note, when I revert the firmware on the NS to the Ubiquiti 6.0.3 the radio has the customer settings back, it's not defaulted.

What am I doing wrong ?

2ghz devices are only supported on 3.4.1 3.2.2 wont stsrt the wireless interface. And xm devices are slow as mud, give it 15 minutes


2ghz devices are only supported on 3.4.1 3.2.2


Well that's good because that was the two versions I said I tried.




give it 15 minutes


15 minutes to do what ? The xm radio accepts the firmware, starts up just fine and tries to connect to the ePMP AP here by my office just like any defaulted ePMP radio will do it just can't actually connect because it's running on default settings. I just can't get the settings from the json file to take when it's being elevated.

3.4.1 should work just fine, however you'll need to specify the version number with -n 3.4 on the elevator.py command line.

I Elevated a radio with that configuration just yesterday. If you have a spare radio and test AP on-hand (and it sounds like you do) you can follow the manual steps to configure/retrieve the configuration file from the device as per this post's 2nd half

http://community.cambiumnetworks.com/t5/ePMP-FAQ/ePMP-Elevate-ePMP-Elevator-Tool-Configuration/m-p/72538

When you retrieve the config from the downgrade d device filesystem, it'll be called .configured_3.4 or similar - the number after .configured_ is what you need to pass to Elevator to make it work.

Hi!

That is right. Please specify version 3.4 instead of 3.4.1 for settings to be apllied.

Thanks,

Dmitry

Figured it out, I was using a json file I created with an elevated radio. I used the json file that came with the tool and just changed what I needed to in it and now at least the radio took the settings from the json file. 

I have had no luck using the Python version of the elevator.py script due to a bug in the Paramiko SSH client library. I've tried numerous versions of Python on Mac OS, Linux and Windows. All yield the same result and fail to connect via SSH due to some host_key error. I am sure others will probably experience this as well.

I have ported the elevator.py script into a shell script and have everything working except my pre-configuration file is not being applied. I could really use some help. I am using the correct format and uploading it to /etc/persistent/mnt/config/.configured_3.4

I know that the JSON format for the .configured_3.4 file is correct because I have managed to pass it into the elevator.exe that I did successfully get to work on Windows. The problem is that elevator.exe does not suit my needs. In fact, it fails to allow a custom SSH port be passed to it. It is an important pre-requisite that we can pass in our non-standard SSH port to connect to our UBNT radios for elevation.

If we can get some assistance to take this to the finish line, we will post the shell script back to this forum as I'm sure others will benefit from it.

Hi!


@mattorola wrote:

I have had no luck using the Python version of the elevator.py script due to a bug in the Paramiko SSH client library. I've tried numerous versions of Python on Mac OS, Linux and Windows. All yield the same result and fail to connect via SSH due to some host_key error. I am sure others will probably experience this as well.


Do you mind sharing the error you've got from paramiko?


I have ported the elevator.py script into a shell script and have everything working except my pre-configuration file is not being applied. I could really use some help. I am using the correct format and uploading it to /etc/persistent/mnt/config/.configured_3.4



Can you please check that you are uploading passwd as well?


I know that the JSON format for the .configured_3.4 file is correct because I have managed to pass it into the elevator.exe that I did successfully get to work on Windows. The problem is that elevator.exe does not suit my needs. In fact, it fails to allow a custom SSH port be passed to it. It is an important pre-requisite that we can pass in our non-standard SSH port to connect to our UBNT radios for elevation.


 

In the newest version available on github I've added support for the port option(-P/--port). You can download windows executable using the following link:

https://www.dropbox.com/s/w5twm9zfwy8pwwk/elevator-win32-0.3.2.zip?dl=0

1 Like

Dmitry, thank you! My failure to copy /etc/passwd to to /etc/persistent/mnt/config/passwd seems to fix the issue. I am able to successfully elevate now using my shell script port of elevator.py. I will clean up the script a little bit and will share it back to this thread.

For your reference, here is the error I received below. I researched all known workarounds and the documented workaround already seems to be in place on line 57: client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

python3.6 elevator.py -u ubnt -p ubnt -P 22 -n 3.4 -v 192.168.1.20

Connecting to device 192.168.1.20

Username: ubnt

Password: ubnt

Traceback (most recent call last):

  File "elevator.py", line 62, in <module>

    password=password, port=port

  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/paramiko/client.py", line 348, in connect

    server_hostkey_name = "[%s]:%d" % (hostname, port)

TypeError: %d format: a number is required, not str

Hi!

I am glad to hear it works for you.

In the meanwhile i fixed the paramiko issue. It was caused by a typo and lack of testing on my side.

Dmitry

We seem to have found another error following what appears as a successful elevation using elevatory.py. Unfortunately, the SSH or telnet no longer works. I enabled telnet so that I could get the following error message to display: 

Password:
: No such file or directoryclish

I then tried upgrading the elevate firmware again using the UBNTXM-v3.4.1.tar.gz file through the elevate GUI in hopes that it might correct the problem. It did not help. I then used the elevate GUI to apply factory default settings, and still could not SSH - receiving the same error "No such file or directoryclish".

Interestingly enough, when I elevate without a pre-configuration sm.json file, I am able to SSH successfully to the device.

Hi,

Please double check you did not modify passwd provided with elevator tool. It is the most probable root cause.

Dmitry

Thank you for the tip - it was a problem with the passwd file, although they appeared identical to the naked eye. I have been testing everything from both a Windows PC and my Mac (since Python runtime is available for either platform). It was the Windows setup where I had the problem with the SSH error on the Nanostation M2 following a test elevation. So I moved all the scripts to a Dropbox folder that is sync'd to my Mac and my Windows PC. I then compared the passwd file with the one on my Windows PC, and while the Compare It program showed the files were identical, the one causing problems on my Windows PC had different CR/LF line endings.

This also might explain why I had some problems with my shell script when my .configured_3.4 file was uploaded via scp. I believe scp transfers the file as binary and it was being uploaded as a UTF-8 unicode file that I had tweaked in the Sublime Text Editor. When I opened the file in vi (before proceeding with the elevate firmware update), it was full of ^M characters as the CR/LF.

Do you know what text file encoding type should be expected for the .configured_3.4 configuration file?

It is better to have unix encoding for all files(only "\n" for line termination), but as far as I remeber JSON should tolerate windows encoding("\r\n" line endings).

Sublime allows you to choose the line ending when you edit files:

Check line ending

Dmitry

Trying to get this tool to work is starting to put me off using Elevate.I'mby no means a coder or Python expert, and I'm very nervous to do try this on a live customer, and I dont really want to risk 'bricking' fresh UBNT radios in an effort to figure it out.

There seems to be two versions of the Windows exe with the GUI available, so which should we use? This one here https://app.box.com/s/fc2qzgk2l0azejvg2q5m8u9enmo3roid  or this one here https://app.box.com/s/fc2qzgk2l0azejvg2q5m8u9enmo3roid  One is elevator-win32-V0.2, the other is elevator-win32-0.3.2

Also I could do with clear step by step instructions telling me if I have to install Python first etc, do we run the BAT file or the executible etc.

Thanks

Hi!

Let me address all your concerns.

First of all to elevate the radio it is not required to use any tool. You can just flash elevate firmware using standard web interface. Elevator is only needed in case you want to preconfigure unit with non-default configuration file.

I encourage you to try Elevate on your lab device first before doing real customer to get more confidence in it. You can always recover unit using tftp recovery precedure that is built in all third party radios.

You also don't need to be a coder by any means and you don't need python. The tool for windows is provided in compiled binary form and is ready for use. No additiona dependencies needed.

Please use the latest verion available(0.3.2) using the following link:

https://www.dropbox.com/sh/2ja5jwsids1p9k8/AAAFMn_Us8qlnMBaMbM5FFWLa?dl=0

You also might find useful other community created elevator GUI:

http://community.cambiumnetworks.com/t5/ePMP-Elevate/PPPoE-clients-Elevator-a-powerful-tool-for-your-network-lifting/m-p/75871#M529

Please don't hesitate to post any questions you have. We are here to help you.

Thanks,

Dmitry

Hi Dmitry

Thanks for the quick answer.

SO you just install and run the exe?

I am familiar with the standard Elevate procedure when we initially converted abunch of UBNT clients using the default SSID "Cambium-AP" ,

This tower site had 2 sectors in the same direction, so we converted one to ePmp and left the other as UBNT (for comparison but now that the AP is up and we have changed the SSID and WPA2 password, we have a few more clients that we want to convert to Cambium

I tried to install it but all that happens is the CMD box flashes up for a second and nothing else. (this was on a 32 bit machine. - I tried it on a 64bit but same happened) On both machines I had trouble unzipping one file (see screenshot)

Hi!

I think dropbox messed something up. Try downloading download "elevator-win32-0.3.2-GUI.zip" that contains the simple GUI wizard by pressing "Download" button.

After downloading it you can extract it. Start "elevatorGUI.bat" as administrator and it will provide you the wizard to go through.

Before that you might want to create custom sm.json. The following documentation is useful that describes howto create it:

http://community.cambiumnetworks.com/t5/ePMP-FAQ/ePMP-Elevate-ePMP-Elevator-Tool-Configuration/m-p/72538

Thanks,

Dmitry

1 Like