You are reading a single comment by @IgorKandaurov and its replies. Click here to read the full conversation.
  • I use the library by the simple code:

    var crc8 = require("crc8").connect();
    
    var dt = '{"ab":22}';
    var codeddt = crc8.encode(dt);
    // > {"ab":22}212#135
    
    var decdt = crc8.decode(codeddt);
    console.log("crc8 Report = ", decdt);
    // > crc8 Report =  {"ab":22}
    if (decdt.indexOf("CRC") > 0 ){
        return;
    }
    else {
        // yours code 
    }
    
About