Search code examples
javascriptnode.jssocketshardwaretelnet

I am trying to connect to Converge Pro 2 by Clearone using NodeJS node-telnet-client but I am still not able to connect


I am using following configurations for connecting:

{
  host: '192.168.10.28',
  port: 23,
  shellPrompt: '=>',
  timeout: 1500,
  loginPrompt: '/Username[: ]*$/i',
  passwordPrompt: '/Password: /i',
  username: 'clearone',
  password: 'converge'
}

When I am trying to connect from Telnet in Windows/PuTTY, it's working fine and the output of the connection is as follows:

Telnet connection string

enter image description here

I think I am missing a configuration/parameter. Here is the link of the library I am using: https://www.npmjs.com/package/telnet-client.


Solution

  • In your configurations add this:

    "ors":"\r\n"
    

    Explaination: In telnet-client node library the default Output Record Separator is \n which is not working out in your case as your telnet server seems to be accepting a \r\n i.e. Windows style new line character after every command you issue.