def crc16_is_OK(hex_string):
    """Returns True if the hex_string ending in two CRC16 bytes passes
    the Dallas 1-wire CRC16 check.
    Code adapted from:  http://forum.arduino.cc/index.php?topic=37648.0;wap2
    """
    # break the Hex string into a list of bytes
    byte_list = [int(hex_string[i:i+2], 16) for i in range(0, len(hex_string), 2)]
    crc = 0
    for inbyte in byte_list:
        for j in range(8):
            mix = (crc ^ inbyte) & 0x01
            crc = crc >> 1
            if mix:
                crc = crc ^ 0xA001
            inbyte = inbyte >> 1;

    return crc==0xB001