Home AMX User Forum NetLinx Studio

m2m problem?

Hi, have a strange problem where the main master (NI-700) would not see the other NXI-ME260 sub-masters (used for port expansion only; no code running). The main-master shows in its telnet console the others being connected, and also only the sub-masters have the main-masters IP in their url list. All they are different systems (IP .35 main-master is system 35; IP .36 is system 36 and so on), however I only see the main-master system 35 in Studio despite refreshing, etc.

Any hints? Thanks a lot!

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    bob wrote: »
    I only see the main-master system 35 in Studio despite refreshing, etc.
    Any hints? Thanks a lot!
    Are you doing a refresh system or refresh network? You need to do a refresh network to see other masters in a m2m setup.
  • bobbob Posts: 296
    Both, refresh network and refresh system. Tried also rebooting everything... All sub-masters are running an empty program...
  • bobbob Posts: 296
    Found this one in the log on the main master (IPs .36 and .39 are the sub-masters):

    3: 11-01-2010 MON 21:36:42 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.39 has been closed locally or by peer
    4: 11-01-2010 MON 21:36:41 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.36 has been closed locally or by peer
    5: 11-01-2010 MON 21:35:56 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.39 has been closed locally or by peer
    6: 11-01-2010 MON 21:35:55 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.36 has been closed locally or by peer
    7: 11-01-2010 MON 21:35:10 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.39 has been closed locally or by peer
    8: 11-01-2010 MON 21:35:09 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.36 has been closed locally or by peer


    some more info from the main-master's (telnet) console:

    >show route
    Show Route Data

    Route Data:

    System Route Metric PhyAddress
    1 1 Dead None
    -> 35 35 0 Axlink
    36 36 Dead None
    37 37 Dead None
    38 38 Dead None
    39 39 Dead None

    >route mode
    Command unknown. Route Mode remains Normal Mode

    >ping 192.168.50.36
    192.168.50.36 is alive.

    >ping 192.168.50.39
    192.168.50.39 is alive.

    >show url
    No URLs in the URL connection list


    on the sub-masters:

    >url list
    The following URLs exist in the URL connection list
    ->Entry 0-192.168.50.35:1319 IP=192.168.50.35 State=Connected

    >show log

    Message Log for System 36 Version: v2.31.139
    Entry Date/Time Object
    Text
    1: 11-01-2010 MON 20:22:54 Interpreter
    CIpEvent::OffLine 0:1:35
    2: 11-01-2010 MON 20:22:54 RouteManager
    Offlining Indirect Routes for from System 35 - Complete
    3: 11-01-2010 MON 20:22:54 RouteManager
    Remote System 39 Offline
    4: 11-01-2010 MON 20:22:54 RouteManager
    Offlining Indirect Routes for from System 35 - Begin...
    5: 11-01-2010 MON 20:22:54 RouteManager
    Remote System 35 Offline
    6: 11-01-2010 MON 20:22:19 RouteManager
    Remote System 39 Online: Route 35 Metric 2
    7: 11-01-2010 MON 20:22:07 Interpreter
    CIpEvent::OnLine 0:1:35
    8: 11-01-2010 MON 20:22:07 RouteManager
    Remote System 35 Online: Route 35 Metric 1
    9: 11-01-2010 MON 20:19:05 ConnectionManager
    Memory Available = 10547624 <12920>

    >show route

    Route Data:

    System Route Metric PhyAddress
    35 35 Dead None
    -> 36 36 0 Axlink

    >ping 192.168.50.35
    192.168.50.35 is alive.
  • bobbob Posts: 296
    See this constantly in the log of the main-master NI-700, what might be the cause? -- IP's .35 and .36 are the sub-masters NXI-ME260...

    >show log

    Message Log for System 35 Version: v3.50.439
    Entry Date/Time Object
    Text
    2: 11-02-2010 TUE 01:39:40 ICSPTCP
    ICSPTCPRx1::CloseSocket: Closing Socket
    3: 11-02-2010 TUE 01:39:40 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.36 has been closed locally or by peer
    4: 11-02-2010 TUE 01:39:24 ICSPTCP
    ICSPTCPRx0::CloseSocket: Closing Socket
    5: 11-02-2010 TUE 01:39:24 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.39 has been closed locally or by peer
    6: 11-02-2010 TUE 01:38:55 ICSPTCP
    ICSPTCPRx1::CloseSocket: Closing Socket
    7: 11-02-2010 TUE 01:38:55 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.36 has been closed locally or by peer
    8: 11-02-2010 TUE 01:38:39 ICSPTCP
    ICSPTCPRx0::CloseSocket: Closing Socket
    9: 11-02-2010 TUE 01:38:39 ICSPTCP
    CICSPTCP Rx connection to 192.168.50.39 has been closed locally or by peer
  • bobbob Posts: 296
    Some more tests showed that I may initiate a connection from the main-master to the sub-masters, but only if I define the url as Temporary!! Then I am able to set the username and password for the connection. If I continue with a permanent connection, no user/password is asked and after hitting Enter and "show url", the connection list remains empty!!
  • bobbob Posts: 296
    When I disable security on both masters, then the sub-master is able to connect to the main master. With security turned on, there is no way inputing username/password on the sub-masters for the connection to the master.

    Nobody uses m2m with security enabled? Looks strange to me...
  • glr-ftiglr-fti Posts: 286
    If I understand your problem you are stating there is no place to enter the user/password for the 2nd system?

    If so that is incorrect. When you go to place a master in the URL and you either listen or manually add there is a place to add the user and password right on that screen. You need to check the authentication required box.
  • bobbob Posts: 296
    Gary, thank you - I get this option on the command line only when I define a Temporary connection. When I try adding a permanent one there is no username/password asked for it.

    I removed security from ICSP port 1319 on the main master and now the sub-masters are able to connect... Not very satisfactory however.
  • glr-ftiglr-fti Posts: 286
    What is a temporary connection?

    The only way I know of to add an entry to the URL is to go to Diagnostics and then URL Listing. Then either Add manually or Listen and then Select to Add. You get the authentication box for either of those.

    What do you do?
  • bobbob Posts: 296
    On the console (when you telnet to the master) you can set an url and define the connection to be permanent or temporary (active until reboot).

    Within the Diagnostics - Enter URL menu (on the sub-master) I can enter the URL and set login/password, however the connection is always being terminated (by the main-master but being shown as active on the sub-master). If I set the URL on the main-master then it works, however I want it the other way round.

    If I uncheck security for ICSP port 1319 on the main-master, then the sub-master can connect to it and everything works again.
  • Joe HebertJoe Hebert Posts: 2,159
    I don't know if this will work for your situation but what happens if you use ADD_URL_ENTRY in code?
    The struct has user and password members.
  • bobbob Posts: 296
    Joe, good idea to try! Thanks!

    PS:

    Looking at the Netlinx ref manual, page 113, it seems that there is no entry for user/password when calling ADD_URL_ENTRY:
    SLONG ADD_URL_ENTRY (DEV Device, URL_STRUCT Url)

    Page 105 lists the URL_STRUCT as follows:

    STRUCTURE URL_STRUCT {
    CHAR Flags // Connection Type (normally 1)
    INTEGER Port // TCP port (normally 1319)
    CHAR URL[128] // string: URL or IP address
    }
  • Try looking at the NetLiinx.axi file, usually located at C:\Program Files\Common Files\AMXShare\AXIs.
    
    (*------------------------------------------------------------------------------------------------*)
    (* URL Manipulation structure *)
    (*------------------------------------------------------------------------------------------------*)
    STRUCTURE URL_STRUCT
    {
      CHAR     Flags;           // Connection Type (normally 1)
      INTEGER  Port;            // TCP port (normally 1319)
      CHAR     URL[128];        // string: URL or IP address
      CHAR     User[20];        // optional account info for ICSPS Added v1.21
      CHAR     Password[20];    // optional account info for ICSPS Added v1.21
    }
    

    Looks like you found a typo on the Telnet Session code. The message:

    Enter Type (Enter for permanent or T for temporary) ->

    should read:

    Enter Type (Enter P for permanent or T for temporary) ->

    If you enter a P instead of just selecting Enter, you will be asked to add account info on the permanent connection.
    This is only an issue on Telnet/Terminal interface. As others have shown, there are multiple ways to enter a URL, but I'll get a bug ticket added for the telnet/terminal code. I'll also have tech pubs check the reference manual.
  • bobbob Posts: 296
    Thanks much, highly appreciated!
  • bobbob Posts: 296
    Tried entering a permanent connection again on the command line in a telnet session. Entered P as described above, as soon as I type P, the connection is being performed, gets Connected and again no question for entering login/password info!
  • Joe HebertJoe Hebert Posts: 2,159
    Did you try to you use ADD_URL_ENTRY in code? The struct does accept a user and a password. Just curious if it works.
  • bobbob Posts: 296
    Just tried connecting from within the code, set the User and Password within the URL_STRUCT, no connect either. As soon as I disable security on ICSP port 1319 on the main master and everything works again!

    Looks like a bug to me, not only in the manual or telnet console, but within firmware too (using the latest for NI-700 and NXI-ME260 sub-masters).
  • Joe HebertJoe Hebert Posts: 2,159
    What value did you use for the Flags property?

    Try setting the Flags property of the URL_STRUCT to $03 (URL_Flg_TCP + URL_Flg_AcctInfoPresent)

    If that doesn’t work try setting the flag to just $02.

    (*
    *)
    (* URL Manipulation structure *)
    (*
    *)
    STRUCTURE URL_STRUCT
    {
    CHAR Flags; // Connection Type (normally 1)
    INTEGER Port; // TCP port (normally 1319)
    CHAR URL[128]; // string: URL or IP address
    CHAR User[20]; // optional account info for ICSPS Added v1.21
    CHAR Password[20]; // optional account info for ICSPS Added v1.21
    }
    (*
    *)
    DEFINE_CONSTANT
    (*-- NetLinx.axi version
    *)
    CHAR NETLINX_AXI_VERSION[6] = '1.43'
    (*-- URL Constants
    *)
    CHAR URL_Flg_TCP = 1; // TCP connection
    CHAR URL_Flg_AcctInfoPresent = $02; // Added v1.21 - If set, the User and Password fields are valid

    CHAR URL_Flg_Temp = $10; // Temp Connection
    CHAR URL_Flg_Stat_PrgNetLinx = $20; // URL set by NetLinx Set_URL_List
    CHAR URL_Flg_Stat_Mask = $C0; // status mask upper 2 bits
    CHAR URL_Flg_Stat_Lookup = $00; // Looking up IP
    CHAR URL_Flg_Stat_Connecting = $40; // connecting
    CHAR URL_Flg_Stat_Waiting = $80; // waiting
    CHAR URL_Flg_Stat_Connected = $C0; // connected
  • bobbob Posts: 296
    I used 1 and 3 without luck, same result. Tried right now $02 and the sub-masters stay forever at the "Looking up IP" message:

    >show url
    The following URLs exist in the URL connection list
    ->Entry 0-192.168.50.35:1319 IP= State=Looking up IP
  • Joe HebertJoe Hebert Posts: 2,159
    I assume all user and passwords are correct?

    Did you try a value of 2 for the flags property?

    Did you clear out the URL lists before running the code?

    What did the ADD_URL_ENTRY function return?
    help file wrote:
    Result:
    0: Success
    -1: Specified device is invalid or is not online
    -2: Time out occurred
    -3: Function is already actively adding a URL entry (i.e. busy)
    -4: Add failed
  • Please double check ME260 feature set
    bob wrote: »
    See this constantly in the log of the main-master NI-700, what might be the cause? -- IP's .35 and .36 are the sub-masters NXI-ME260...
    I don't have the reference documents handy right right now so I could be wrong, but I suspect the old ME260 processor does not support ICSP security.
Sign In or Register to comment.