Skip to content

Any progress on the wire protocol / checksum? #1

@itpeters

Description

@itpeters

Hi,

I stumbled across your work while trying to understand the Navien RS485 wire protocol. I have an ESP32 with TTL-RS485 converter connected to my Navien, and I've been watching some of the packets going back and forth.

From reading your work, it sounds like you believe the checksum to be CRC-8 of the entire packet (from the 0xF7 frame start through the end of the data), with the initial value dictated by the byte at offset 0x02 (either 0x62 or 0x4B) and (I'm assuming) polynomial 0x07.

I'm able to reproduce the first example you list:

>>> hex(crc.crc_poly(bytes.fromhex("F7 05 50 50 90 22 42 00 00 25 49 5C 5B 53 00 00 00 00 00 00 88 C2 00 20 02 00 00 00 21 03 99 08 00 02 00 00 00 00 00 00"), 8, poly=0x07, crc=0x62))
'0x87'

I'm not having the same success with your second example:

>>> hex(crc.crc_poly(bytes.fromhex("F7 05 50 50 90 22 42 00 00 25 14 5F 4C 4C 00 00 00 00 00 00 88 C2 00 20 02 00 00 00 21 03 9A 08 00 02 00 00 00 00 00 00"), 8, poly=0x07, crc=0x62))
'0xf3'

Your work showed this with a checksum of 0xD8.

I'm also not having any luck with the packets that I captured coming from my water heater. For example, I grabbed F7 05 50 50 90 22 42 00 08 25 47 62 62 3E 00 00 00 00 00 00 08 9D 00 20 02 02 00 00 07 00 28 00 00 02 00 00 00 00 00 00 8A but when I try to recreate the checksum I get something different:

>>> hex(crc.crc_poly(bytes.fromhex("F7 05 50 50 90 22 42 00 08 25 47 62 62 3E 00 00 00 00 00 00 08 9D 00 20 02 02 00 00 07 00 28 00 00 02 00 00 00 00 00 00"), 8, poly=0x07, crc=0x62))
'0x4d'

I was just curious if you see anything I'm doing wrong or misunderstanding, or if you have any more insights since you last put this up.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions