0
Under review

Telnet autorization

Ekaterina (head of support) 6 years ago in iRidium Script / AV and Driver scripts updated 5 years ago 12

The user authorization at connection to Telnet looks as follows:

Connecting to 192.168.10.10 ...
Connected to 192.168.10.10
Login Please
Username: user
Password: password
Welcome to TELNET.

In the dialog window for connection login and password are sent in the open format. The login should be sent after receiving the "Username:" string, the password – after receiving the "Password:" string.

To perform the Telnet authorization in iRidium you should use the AV & Custom Systems (TCP) driver for which we create the following script:


IR.AddListener(IR.EVENT_RECEIVE_TEXT, IR.GetDevice('AV_Driver'), function(text)
{
  IR.Log("text = "+text);
 
  if (text.indexOf('Username') != -1)
  {
    IR.Log("login")
    IR.GetDevice('AV_Driver').Send(['Login',13,10]);
  } else if (text.indexOf('Password') != -1)
  {
    IR.Log("password")
    IR.GetDevice('AV_Driver').Send(['Password',13,10]);
  }
})

where

  • 'AV_Driver' – the name of the AV & Custom Systems (TCP) driver in the project device tree.
  • Send(['Login',13,10]) - Login – the user name
  • Send(['Password',13,10]) - Password – the password for  the indicated user.   


The script performs authorization after which (Welcome to TELNET.) you can send commands to equipment and receive feedback from it via Telnet.


PS: Your equipment might have a slightly different authorization dialog window. In this case modify the script so it could identify the strings after which you need to enter the login and password correctly. It will be enough for the correct work of the script.


Telnet_authorization.irpz
If its needed to sent command, how to trigger the function from a button?
You can Call the function by the button click using "ScriptCall(functionName)" command in macros editor.



The text returns blank.
The device is IBoot from www.dataprobe.com
Port is set 23
The Telnet result is this:

Microsoft Telnet>open 192.68.1.200
iBoot-G2+ v1.21.80
User>admin
Password>admin
iBoot>set main off

Ok
iBoot>set main on

Ok
iBoot>


I think I missed out on some formatting or use of the function above
Please send the Telnet log as a snapshot.

This script is only for authorization. Your device asking for "User" and "Password", it will look like:

IR.AddListener(IR.EVENT_RECEIVE_TEXT, IR.GetDevice('AV_Driver'), function(text)
{
IR.Log("text = "+text);

if (text.indexOf('User') != -1)
{
IR.Log("User >")
IR.GetDevice('AV_Driver').Send(['admin',13,10]);
} else if (text.indexOf('Password') != -1)
{
IR.Log("Password >")
IR.GetDevice('AV_Driver').Send(['admin',13,10]);
}
})

Then you have to send commands from a simple buttons as it shown in instruction:
http://wiki2.iridiummobile.net/AV_%26_Custom_Systems_%28TCP%29

ScreenHunter_02 Jun. 04 18.17.jpg

ScreenHunter_01 Jun. 04 18.00.jpg

Not send... Telnet works!!! Also the log file shows nothing ??

Scripts as follow from forst set
ScreenHunter_03 Jun. 04 18.18.jpg
This is how it looks in iRidium when Telnet asking for authorization (the same script as u use):


But in your log there is no data.
What license u use in Editor > Tools > Options > License Path: [..]?
Check the log of Client upper the "loader" part - is there any errors or exceptions?
Authorization wasn't finished because u didn't get data. You have to find a reason why.
Hi, thanks for showing me what I should see.
Thats the strange thing. I dont see authorization. I am using a Trial version.
My licence is already deployed onto Client's IPAD . I bought an additional Site Pro plus Global Cache and then realise I cant activate it because it need Global Cache so I have no full licence now.
So will I need a AV Systems licence to Telnet??
It's enough if you have a Trial license. Trial supports all the needed functions.
If you cannot see the data it could mean the session wasn't opened. Did you add a Trial to Editor > Tools > Options > License Path: [..]? Don't u activated a Demo mode in Editor (it should be turned off). Don't u see the red messages when u start the emulator?
Please let me check your license file.
Everything should be ok.
If it possible, please make a remote access to your device from internet (forward the TCP port 23 and send your External IP). We'll check the connection.
Ok. Thanks. I started checking if I need to have some services and realise I have Telnet client already but not Telnet Server, but installing that did not help the return.
I also install Iridium on another PC with new install thinking maybe there was some issues with this laptop, but that PC has the same outcome. This other laptop have both Telnet Client and Server.

Am I missing some Windows feature to allow the Telnet to come back? I have try Telnet into both laptop from each other and they work!
I will setup this laptop today and drop you an email. I can also start Teamviewer so you can log in to see what about the system.
I have been able to telnet into all the Laptop but not into the IBoot device. so maybe the issue is the IBoot security.

I am not able to put a small terminal app to control the IBoot device. Although a Windows Iridium can exec this file, what is the syntax for executing bat file from an Android/IOS to a PC on same network and known IP?
Hi Simon

You have to install remiote controll app to your PC to boot the file on PC from remote device. Something like MCE Controller http://mcec.codeplex.com/
You can connect to this app via TCP and send a command to load file (pls see MCE docs)