for me the CRC=$(python -c "import crc8;h=crc8.crc8();h.update('$ID'.decode('hex'));print(h.hexdigest())") command only works with python2 while python3 throws AttributeError: 'str' object has no attribute 'decode'. i think there might be some people out there whose python points to python3, not python2. maybe specify this to avoid confusion?
for me the
CRC=$(python -c "import crc8;h=crc8.crc8();h.update('$ID'.decode('hex'));print(h.hexdigest())")
command only works with python2 while python3 throwsAttributeError: 'str' object has no attribute 'decode'
. i think there might be some people out there whosepython
points to python3, not python2. maybe specify this to avoid confusion?