Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to list identity #9

Closed
bafeigum opened this issue Oct 5, 2015 · 3 comments
Closed

Unable to list identity #9

bafeigum opened this issue Oct 5, 2015 · 3 comments

Comments

@bafeigum
Copy link

bafeigum commented Oct 5, 2015

Using the example EthernetIP-server.py code, I am unable to process the ListIdentity command (0x63). Is this command supported? It should be returning the default Logix identity specified in device.py, but I keep getting an EtherNet/IP error.

Here is the log I am getting.

10-05 22:15:17.659        -49088000 enip.srv NORMAL   main       Delaying all responses by 0.0 seconds
10-05 22:15:17.689        -49088000 enip.srv NORMAL   main       Creating tag: TagName=DINT[1]
10-05 22:15:17.735        -49088000 root     NORMAL   main       EtherNet/IP Simulator: ('', 44818)
10-05 22:15:17.767        -49088000 network  NORMAL   server_mai enip_srv server PID [  981] running on ('', 44818)
10-05 22:15:17.784        -49088000 network  NORMAL   server_mai enip_srv server PID [  981] responding to external done/disable signal
10-05 22:15:20.822        -4cc7aba0 enip.srv NORMAL   enip_srv   EtherNet/IP Server enip_44818 begins serving peer ('192.168.1.99', 44818)
10-05 22:15:20.905        -4cc7aba0 enip.srv DETAIL   enip_srv   Transaction begins
10-05 22:15:20.979        -4cc7aba0 enip.srv DETAIL   enip_srv   Transaction receive after   0.072s (   24 bytes in   0.001/  0.100s)
10-05 22:15:21.019        -4cc7aba0 enip.srv DETAIL   enip_srv                      ( enip_44818.( header.((empty)) recv:    24: 'c\x00\x00\x0...0\x00\x00\x00'
10-05 22:15:21.883        -4cc7aba0 enip.srv DETAIL   enip_srv   Transaction parsed  after   0.978s
10-05 22:15:21.915        -4cc7aba0 enip.dev DETAIL   __init__                   Identity, Class ID 0x0001, Instance ID   1 created
10-05 22:15:21.931        -4cc7aba0 enip.dev DETAIL   lookup     Class     1/0x0001, Instance   1, Attribute  None ==> None
10-05 22:15:21.955        -4cc7aba0 enip.dev DETAIL   lookup     Class     1/0x0001, Instance   0, Attribute  None ==> None
10-05 22:15:21.974        -4cc7aba0 enip.dev DETAIL   lookup     Class     1/0x0001, Instance   0, Attribute  None ==> None
10-05 22:15:22.024        -4cc7aba0 enip.dev DETAIL   lookup     Class     1/0x0001, Instance   0, Attribute  None ==> meta-Identity
10-05 22:15:22.223        -4cc7aba0 enip.dev DETAIL   __init__                      Logix, Class ID 0x0002, Instance ID   1 created
10-05 22:15:22.239        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   1, Attribute  None ==> None
10-05 22:15:22.277        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   0, Attribute  None ==> None
10-05 22:15:22.300        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   0, Attribute  None ==> None
10-05 22:15:22.324        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   0, Attribute  None ==> meta-Logix
10-05 22:15:22.363        -4cc7aba0 enip.dev DETAIL   __init__         Connection_Manager, Class ID 0x0006, Instance ID   1 created
10-05 22:15:22.379        -4cc7aba0 enip.dev DETAIL   lookup     Class     6/0x0006, Instance   1, Attribute  None ==> None
10-05 22:15:22.420        -4cc7aba0 enip.dev DETAIL   lookup     Class     6/0x0006, Instance   0, Attribute  None ==> None
10-05 22:15:22.437        -4cc7aba0 enip.dev DETAIL   lookup     Class     6/0x0006, Instance   0, Attribute  None ==> None
10-05 22:15:22.464        -4cc7aba0 enip.dev DETAIL   lookup     Class     6/0x0006, Instance   0, Attribute  None ==> meta-Connection_Manager
10-05 22:15:22.503        -4cc7aba0 enip.dev DETAIL   __init__             Unknown_Object, Class ID 0x0066, Instance ID   1 created
10-05 22:15:22.530        -4cc7aba0 enip.dev DETAIL   lookup     Class   102/0x0066, Instance   1, Attribute  None ==> None
10-05 22:15:22.564        -4cc7aba0 enip.dev DETAIL   lookup     Class   102/0x0066, Instance   0, Attribute  None ==> None
10-05 22:15:22.583        -4cc7aba0 enip.dev DETAIL   lookup     Class   102/0x0066, Instance   0, Attribute  None ==> None
10-05 22:15:22.608        -4cc7aba0 enip.dev DETAIL   lookup     Class   102/0x0066, Instance   0, Attribute  None ==> meta-Unknown_Object
10-05 22:15:22.733        -4cc7aba0 enip.dev DETAIL   __init__                       UCMM, Class ID 0x9999, Instance ID   1 created
10-05 22:15:22.748        -4cc7aba0 enip.dev DETAIL   lookup     Class 39321/0x9999, Instance   1, Attribute  None ==> None
10-05 22:15:22.774        -4cc7aba0 enip.dev DETAIL   lookup     Class 39321/0x9999, Instance   0, Attribute  None ==> None
10-05 22:15:22.810        -4cc7aba0 enip.dev DETAIL   lookup     Class 39321/0x9999, Instance   0, Attribute  None ==> None
10-05 22:15:22.835        -4cc7aba0 enip.dev DETAIL   lookup     Class 39321/0x9999, Instance   0, Attribute  None ==> meta-UCMM
10-05 22:15:22.878        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   1, Attribute  None ==> Logix
10-05 22:15:22.893        -4cc7aba0 enip.lgx NORMAL   setup                         Logix.TagName       DINT[   1] == 0 Attribute   1 added
10-05 22:15:22.940        -4cc7aba0 enip.dev DETAIL   lookup     Class     2/0x0002, Instance   1, Attribute     1 ==> TagName       DINT[   1] == 0
10-05 22:15:23.078        -4cc7aba0 enip.lgx ERROR    process    EtherNet/IP CIP error at 0 total bytes:
''
-^ (byte 0)

10-05 22:15:23.146        -4cc7aba0 enip.srv ERROR    enip_srv   Failed request: {
    "request.enip.status": 0, 
    "request.enip.sender_context.input": "array('c', '\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08')", 
    "request.enip.session_handle": 0, 
    "request.enip.length": 0, 
    "request.enip.command": 99, 
    "request.enip.options": 0, 
    "request.addr": [
        "192.168.1.99", 
        44818
    ]
}
10-05 22:15:23.207        -4cc7aba0 enip.lgx DETAIL   process    EtherNet/IP CIP Request  (Client ('192.168.1.99', 44818)): {
    "addr": [
        "192.168.1.99", 
        44818
    ]
}
10-05 22:15:23.239        -4cc7aba0 enip.dev DETAIL   request    EtherNet/IP (Client ('192.168.1.99', 44818)) Session Terminated: '(Unknown)'
10-05 22:15:23.270        -4cc7aba0 enip.lgx DETAIL   process    EtherNet/IP CIP Response (Client ('192.168.1.99', 44818)): {
    "addr": [
        "192.168.1.99", 
        44818
    ]
}
10-05 22:15:23.331        -4cc7aba0 enip.srv ERROR    enip_srv   EtherNet/IP error at 24 total bytes:
'c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\x00\x00\x00\x00'
----------------------------------------------------------------------------------------------^ (byte 24)

Failed with exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/server/enip/main.py", line 657, in enip_srv
    if enip_process( addr, data=data, **kwds ):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/server/enip/logix.py", line 695, in process
    for i,(m,s) in enumerate( machine.run( path='request.enip', source=source, data=data )):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/automata.py", line 655, in run
    source=source, machine=machine, path=path, data=data, ending=ending ):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/automata.py", line 1300, in delegate
    raise NonTerminal( "%s sub-machine terminated in a non-terminal state" % ( self ))
NonTerminal: ( CIP.( select.((noop)) ) ) sub-machine terminated in a non-terminal state


10-05 22:15:23.367        -4cc7aba0 enip.srv NORMAL   enip_srv   enip_44818 done; processed   1 request  over    24 bytes/   24 received (0 connections remain)
10-05 22:15:23.398        -4cc7aba0 network  WARNING  run        enip_srv server failure: ( CIP.( select.((noop)) ) ) sub-machine terminated in a non-terminal state
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/server/network.py", line 132, in run
    super( server_thread, self ).run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/cpppo/server/enip/main.py", line 657, in enip_srv
    if enip_process( addr, data=data, **kwds ):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/server/enip/logix.py", line 695, in process
    for i,(m,s) in enumerate( machine.run( path='request.enip', source=source, data=data )):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/automata.py", line 655, in run
    source=source, machine=machine, path=path, data=data, ending=ending ):
  File "/usr/local/lib/python2.7/dist-packages/cpppo/automata.py", line 1300, in delegate
    raise NonTerminal( "%s sub-machine terminated in a non-terminal state" % ( self ))
NonTerminal: ( CIP.( select.((noop)) ) ) sub-machine terminated in a non-terminal state
@pjkundert
Copy link
Owner

Unfortunately, cpppo doesn't (yet) support either the List Identity command, or UDP connections. However, this is something I am working on -- no ETA yet...

@pjkundert
Copy link
Owner

The basic List Identity framework is implemented, in branch feature-list-identity. Comments welcome, as I complete the feature...

@pjkundert
Copy link
Owner

Fixed in branch feature-list-identity. I'll be merging it onto master next week, and pushing Version 3.9.0

pjkundert added a commit that referenced this issue Jan 30, 2018
# This is the 1st commit message:

Initial foray in to support for generic CIP Service Code requests

# This is the commit message #2:

No requirement for existence of .multiple segment in failed responses

# This is the commit message #3:

Correct handling of service_code operations in client connector I/O

# This is the commit message #4:

HART Requests almost working
o Cannot derive HART from Logix; service codes overlap

# This is the commit message #5:

Initial working HART I/O card request

# This is the commit message #6:

Support intermixed Tags and already parsed operation in parse_operations

# This is the commit message #7:

Test and decode the Read primary variable response, however:
o Still broken; the CIP Encapsulation path is still suppsed to be to the
  Connection Manager @0x06/1!  The 0x52 Route Path is Port 1, Address 2,
  and the message path should be to @0x035D/8.

# This is the commit message #8:

Success.  Still needs cleanup

# This is the commit message #9:

Further attempts to refine HART pass-thru.
o HART I/O card is not responding as defined in documentation

# This is the commit message #10:

Cleanups for python3, source analysis, unit tests

# This is the commit message #11:

Attempt to parse Read Dynamic Variables reply; 3 unrecognzied bytes?

# This is the commit message #12:

Update to attempt to parse real HART I/O card response
o Minimal Read Dynamic Variables status response?  Not successful
o Implement minimal simulated pass-thru Init/Query, HART commands 1,2,3
o Minor changes to client.py Send RR Data, to have timeout and ticks
  compatible with RSLogix; no difference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants