First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

How to get value of attributes from tshark

Hi Team,

I am facing issue in retrieving values corresponding to attributes in zigbee zcl layer. I am not sure how to traverse through attributes to get their values in report: For example: From below mentioned data, I need to get values corresponding to attributes. Value is in form of Uint24,uint48,uint32 etc

Attribute Field, Uint: 1087943
    **Attribute**: Client: Functional Notification Flags / Server: Current Summation Delivered (0x0000)
    Data Type: 48-Bit Unsigned Integer (0x25)
    **Uint48**: 1087943 (0x00000000001099c7)

Attribute Field, Enum8: 1
    **Attribute**: Unit of Measure (0x0300)
    Data Type: 8-Bit Enumeration (0x30)
    **Uint48**: 1 (0x01)

Attribute Field, Uint24: 2126776
    **Attribute**: Current Day Alternative Consumption Delivered (0x0c01)
    Data Type: 24-Bit Unsigned Integer (0x22)
    **Uint24**: 2126776 (0x2073b8)

I need to get attribute and their corresponding value(uint24/uint48) & export to csv file.

Please assist.

Thanks & Regards, Neha Malhotra

Neha malhotra's avatar
1
Neha malhotra
asked 2020-02-13 16:16:33 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

I think you will have to post process the tshark output with a shell script or python program.
https://wiki.wireshark.org/SampleCapt... - sample_control4_2012-03-24.pcap ZigBee protocol traffic.

This is from the sample capture and shows that the data can be not consistent so program needs some intelligence:

Command: Write Attributes No Response (0x05)
Attribute Field, Uint8: 1
    Attribute: Unknown (0x0003)
    Data Type: 8-Bit Unsigned Integer (0x20)
    Uint8: 1 (0x01)
Attribute Field, Uint16: 300
    Attribute: Unknown (0x0002)
    Data Type: 16-Bit Unsigned Integer (0x21)
    Uint16: 300 (0x012c)
Attribute Field
    Attribute: Mains Frequency (0x0001)
    Data Type: 16-Bit Unsigned Integer (0x21)
    Measured Mains Frequency: 70 [Hz]
Attribute Field
    Attribute: Unknown (0x0c01)
    Data Type: No Data (0x00)
Attribute Field
    Attribute: Unknown (0x1620)

[Malformed Packet: ZigBee ZCL] [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)] [Malformed Packet (Exception occurred)] [Severity level: Error]

Chuckc's avatar
3k
Chuckc
answered 2020-02-13 20:17:11 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer