Open idahogray opened 5 years ago
Just a small update...I tried both master and the fix-constructed-default branch with no change.
Hi, I have the same issue... Have you got any solutions ?
I haven't found a solution.
I found that the function decode() of the pyasn1 library has an issue to decode the type "structure" inside the "Data" field in the GOOSE message. It seems that the function can't read in a "recursive way" over the Data field.
So I found a solution for my purpose, but it is very limited. I have to create as many Data classes in the goose_pdu file as the number of structure in the datas of the GOOSE message.
Thanks for your answer, and sorry for my English.
Sorry for it has taken so long to get to this issue!
I've just cloned your repo and run the tests - none of them fail for me. My setup is Python 3.7.1 and:
$ pip freeze
-e git+https://github.com/keith-gray-powereng/goose.git@e3dcdc18976607d41359d36dd41055e8184c0582#egg=goose
pyasn1==0.4.7
scapy==2.4.3
Is this problem already solved?
I found that the function decode() of the pyasn1 library has an issue to decode the type "structure" inside the "Data" field in the GOOSE message. It seems that the function can't read in a "recursive way" over the Data field.
So I found a solution for my purpose, but it is very limited. I have to create as many Data classes in the goose_pdu file as the number of structure in the datas of the GOOSE message.
Thanks for your answer, and sorry for my English.
Can you explain it a little bit? or if you don't mind, can you share the code?
I am having trouble decoding IEC 61850 GOOSE PDU data. This data is encoded using BER. You can find the ASN.1 notation that wireshark uses here: https://github.com/boundary/wireshark/blob/master/asn1/goose/goose.asn. My repository is located on gitub: https://github.com/keith-gray-powereng/goose. The pyasn.1 classes corresponding to the ASN.1 notation live in the https://github.com/keith-gray-powereng/goose/blob/master/goose/goose_pdu.py file.
The last three tests in https://github.com/keith-gray-powereng/goose/blob/master/tests/test_goose.py are generating errors while trying to decode the data. These tests cover decoding larger pieces of the data that make use of "SEQUENCE (OF)".
One example of a failing test is as follows. The encoded_data is taken straight from a captured GOOSE packet.
This is expected to decode into a SEQUENCE OF a boolean, a bit-string, and a utc-time which are all members of Data.
The generated error is:
The following log is also generated:
I would appreciate any help with trying to figure this out. Please let me know if there is any more information I can provide.