Home AMX Forum AMX Technical Discussion
Options

Login to an IP controlled device from Netlinx

bobbob Independent Programmer
Hi there,

just starting with Netlinx and studying the following example it is not clear to me why the login and password to a controlled IP device is send as "login,password", i.e. with comma inbetween? Shouldn't this be CR or CRLF?


DATA_EVENT[dvCOMPUTER]
{
STRING:
{
SELECT // LOGIN REQUEST
{
ACTIVE (FIND_STRING(DATA.TEXT,'LOGIN:',1)): // REQUEST FOR USER NAME
{
// SEND_STRING dvCOMPUTER, "'login,password', $0D" // SEND USER NAME
}
}
}

Comments

  • DHawthorneDHawthorne Junior Member
    I think this depends on what the receiving device will accept. I know, for example that a Lutron Interactive controller will take it in the "login,password" format, but a telnet session to a NetLinx master will not. This is not really matter of how the NetLinx handles it, but the device you are logging into.
  • travtrav Get off my lawn
    In the case of the Lutron, Mr.Hawthorne had it right, even if you log into it via telnet you still need to enter your login as "Mmmmm,Beer" the login,password style, other devices may be different, but your above code is missing a LF. Most (of the ones I've come across) need a CR and a LF after the command.
    So in your example....
    DATA_EVENT[dvCOMPUTER]
    {
         STRING:
         {
              SELECT // LOGIN REQUEST
              {
                   ACTIVE (FIND_STRING(DATA.TEXT,'LOGIN:',1)): // REQUEST FOR USER NAME
                   {  
                        SEND_STRING dvCOMPUTER, "'login,password',$0D,$0A" // Added a LF, $0A
                   }
              }
         }
    }
    

    With the Added LF you should be ok.

    -Trav
  • bobbob Independent Programmer
Sign In or Register to comment.