diff --git a/ebpfcat/ebpfcat.py b/ebpfcat/ebpfcat.py index 941a6a73e68fa6410a97c33d8b26a0da13ecbbc2..1754604ddd05953941a2e05a1feeb95105a2d39c 100644 --- a/ebpfcat/ebpfcat.py +++ b/ebpfcat/ebpfcat.py @@ -222,7 +222,7 @@ class EBPFTerminal(Terminal): await super().initialize(relative, absolute) if (self.compatibility is not None and (self.vendorId, self.productCode) not in self.compatibility): - raise RuntimeError(f"Incompatible Terminal: {self.vendorId}:{self.productCode}") + raise RuntimeError(f"Incompatible Terminal: {self.vendorId}:{self.productCode} ({relative}, {absolute})") def allocate(self, packet, readonly): if self.pdo_in_sz: diff --git a/ebpfcat/ethercat.py b/ebpfcat/ethercat.py index 261ee20cb9b9c3ec84728a821d616376c1566b9b..3c69e86a3cc540b26f87709d8c28fd964e0ebdd2 100644 --- a/ebpfcat/ethercat.py +++ b/ebpfcat/ethercat.py @@ -379,6 +379,9 @@ class Terminal: self.mbx_lock = Lock() self.eeprom = await self.read_eeprom() + if 41 not in self.eeprom: + print('no 41 in eeprom') + return await self.write(0x800, data=0x80) # empty out sync manager await self.write(0x800, data=self.eeprom[41]) self.mbx_out_off = self.mbx_out_sz = None