def _get_crc(self): data = hl2bs(self.apdu + [ETX]) try: return crc_xmodem16(data) except Exception: print(self.apdu) raise
def _get_crc(self): data = conv.hl2bs(self.apdu + [ETX]) #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data))) try: return crc.crc_xmodem16(data) except: print(self.apdu) raise
def _get_crc(self): data = conv.hl2bs(self.apdu + [ ETX ]) #print "crc for %s => %s" % ([hex(i) for i in self.apdu], hex(crc.crc_xmodem16(data))) try: return crc.crc_xmodem16(data) except: print self.apdu raise
def value(self): return conv.hl2bs(self._data)
def as_bin(self): return conv.hl2bs(self.dump_message())