Devices not added, password wrong, but it is correct!

Posted on
Sun Mar 18, 2018 6:30 am
patrikhson offline
Posts: 8
Joined: Aug 12, 2017

Devices not added, password wrong, but it is correct!

I am using version 1.7.12.101 of the plugin, 7.1.1 of the Indigo software.

When I log into an access point myself manually, it works:

Code: Select all
$ ssh paf@192.165.72.91
paf@192.165.72.91's password:


BusyBox v1.11.2 (2016-04-01 14:55:04 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.3.20#


It seems to also work when I look in the logs, but as you see it still believe IP/password or something is broken. To me that implies a bug in the expect script.

Code: Select all
===========192.165.72.94  ==> spawn ssh paf@192.165.72.94
paf@192.165.72.94's password:
exit


BusyBox v1.11.2 (2016-04-01 14:55:04 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.3.20# exit
Connection to 192.165.72.94 closed.


   getMessages                     

================================================
 FATAL error connecting to ip#: 192.165.72.94 wrong ip/ password ...?
================================================n


No devices are added, so something is clearly broken. Maybe it is me? :-)

Patrik

Posted on
Sun Mar 18, 2018 6:38 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Devices not added, password wrong, but it is correct!

Can you do the following on the indigo server box :
open terminal
ssh userid@ipnumber
Enter password



A) does it work
B) how long does it take>15 secs? ==> timeout??
C) what is the prompt

Karl





Sent from my iPhone using Tapatalk

Posted on
Sat Mar 31, 2018 4:11 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Devices not added, password wrong, but it is correct!

Hi Karl.

I'm getting similar to the above.

I've only just got my head around your Unify plugin and the fact I need the Controller software running all the time - I normally only fire it up when I need to change something on my single AP.

Code: Select all
23:02:53 START                    -AP Thread # 0  192.168.3.45
23:02:53 START                    -launching 192.168.3.45
23:02:53 KILL                     -killing request: ps -ef | grep uniFiAP | grep '192.168.3.45 ' | grep /usr/bin/expect | grep execLog.exp | grep -v grep
23:02:53 EXPECT                   -/usr/bin/expect  '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/test.exp' Administrator PASSWORD 192.168.3.45
23:02:53 START                    -launching 192.168.3.45
23:02:53 KILL                     -killing request: ps -ef | grep uniFiAP | grep '192.168.3.45 ' | grep /usr/bin/expect | grep dictLoop.exp | grep -v grep
23:02:53 EXPECT                   -/usr/bin/expect  '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/test.exp' Administrator PASSWORD 192.168.3.45
23:03:00 testConnection           -
===========192.168.3.45  ==> spawn ssh Administrator@192.168.3.45
Administrator@192.168.3.45's password:


BusyBox v1.11.2 (2017-05-08 09:43:54 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.7.58#
23:03:00 getMessages              -

================================================
 FATAL error connecting to ip#: 192.168.3.45 wrong ip/ password ...?
================================================n
23:03:00 testConnection           -
===========192.168.3.45  ==> spawn ssh Administrator@192.168.3.45
Administrator@192.168.3.45's password:


BusyBox v1.11.2 (2017-05-08 09:43:54 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.7.58#
23:03:00 getMessages              -

================================================
 FATAL error connecting to ip#: 192.168.3.45 wrong ip/ password ...?
================================================n


A) Yes, it works.
B) Instant
C) BZ.v3.7.58#

Code: Select all
BZ.v3.7.58# info

Model:       UAP
Version:     3.7.58.6385
MAC Address: 44:d9:e7:d6:b4:21
IP Address:  192.168.3.45
Hostname:    HallAP
Uptime:      960 seconds

Status:      Connected (http://192.168.3.6:8080/inform)
BZ.v3.7.58#


Peter

Posted on
Sat Mar 31, 2018 4:15 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Devices not added, password wrong, but it is correct!

ps, I can run mca-dump using the startDictToken from your plugin and that works.

It just doesn't seem to be seeing the prompt in expect and thus not continuing.

Peter

Posted on
Sat Mar 31, 2018 4:32 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Devices not added, password wrong, but it is correct!

Ah....

In testServerIfOK, you are looking for "Welcome" in the banner prompt after logging in, which doesn't exist.

I just changed it to "BusyBox" temporarily and it immediately found and created my devices.

Peter

Posted on
Sat Mar 31, 2018 11:52 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Devices not added, password wrong, but it is correct!

Thanks for testing. Will check when I am home.


Sent from my iPhone using Tapatalk

Posted on
Mon Apr 02, 2018 4:00 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Devices not added, password wrong, but it is correct!

this is what I see for switches, AP, cloudkey, gateway.. mine all have "Welcome"
Code: Select all
BusyBox v1.23.2 (2018-01-19 23:57:52 MST) built-in shell (ash)


  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2018
 |   |  |   |  \  ||  \   |  |   Ubiquiti Networks, Inc.
 |______|___|  /__||__/   |__|
            |_/                  http://www.ubnt.com

      Welcome to UniFi USW-24P-250!

US.v3.9.21#



====



BusyBox v1.19.4 (2018-02-13 10:32:51 MST) built-in shell (ash)
Enter 'help' for a list of built-in commands.


  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2018
 |   |  |   |  \  ||  \   |  |   Ubiquiti Networks, Inc.
 |______|___|  /__||__/   |__|
            |_/                  http://www.ubnt.com

      Welcome to UniFi UAP-AC-Pro-Gen2!

AP-1-Server-BZ.v3.9.24#

====

  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2013-2017
 |   |  |   |  \  ||  \   |  |   Ubiquiti Networks, Inc.
 |______|___|  /__||__/   |__|
            |_/                  http://www.ubnt.com

      Welcome to UniFi CloudKey!

Last login: Sun Mar 18 12:17:42 2018 from 192.168.1.53
root@UniFi-CloudKey:~#

===========
Linux ubnt 3.10.20-UBNT #1 SMP Fri Nov 3 15:45:37 MDT 2017 mips64

  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2017
 |   |  |   |  \  ||  \   |  |   Ubiquiti Networks, Inc.
 |______|___|  /__||__/   |__|
            |_/                  http://www.ubnt.com

      Welcome to EdgeOS on UniFi Security Gateway!

*NOTE*: Configuration changes made here are not persistent.
They will be overwritten by the controller on next provision.

Last login: Sun Apr  1 22:20:04 2018 from 192.168.1.50
karlwachs@GW:~$


what are your prompts.. and what are your versions ?

Karl

Posted on
Mon Apr 02, 2018 8:31 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Devices not added, password wrong, but it is correct!

I will add:
If xx.find(“Welcome”)>-1: return True
If xx.find(“UniFi”) > -1: return True
If xx.find(“Edge”)>-1: return True
If xx.find(“busy”)> -1: return True
That should cover all variations
Any other?

The purpose of this check is to see if the box answers.




Sent from my iPhone using Tapatalk

Posted on
Mon Apr 02, 2018 9:40 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Devices not added, password wrong, but it is correct!

— moved to plugin store —-

if someone could test this version.
have added several options for checking the login prompt:
Welcome, UniFi, Edge, BusyBox,...

I am still not at home and can not test

Karl

Posted on
Mon Apr 02, 2018 1:03 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Devices not added, password wrong, but it is correct!

I'll test shortly.


Sent from my iPad using Tapatalk Pro

Posted on
Mon Apr 02, 2018 2:37 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Devices not added, password wrong, but it is correct!

Download Moved to plugin store. ——

had the filename wrong

please use this one.

Karl


doing things remotely is not that easy

Posted on
Mon Apr 02, 2018 3:00 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Devices not added, password wrong, but it is correct!

Thanks, that's working.

My welcome message is:

BusyBox v1.11.2 (2017-05-08 09:43:54 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.7.58#

As you can see, I don't get the funny ASCII art or the "Welcome..." message.

Peter

Posted on
Mon Apr 02, 2018 3:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Devices not added, password wrong, but it is correct!

Looks like an older version.


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron