Open main menu

Changes

----
<code>uint16_t Landis_crc16 (uint16_t crc, const std::vector<uint8_t> &data, size_t size) {
 
// CoServ CRC = 0x45F8
 
// Oncor CRC = 0x5FD6
 
// Hard coded Poly 0x1021
 
    uint16_t i = 0;
 
    while (size--) {       
 
crc ^= data[i] << 8;
 
i++;
 
for (unsigned k = 0; k < 8; k++)
 
crc = crc & 0x8000 ? (crc << 1) ^ 0x1021 : crc << 1;     
 
    }     
 
return crc;
 
} </code>
----<br />
 
===Captured Meter Data===
There have been two packet types observed thus far, a 0x55 and a 0xD5 packet.