diff --git a/pyscrlink/scratch_link.py b/pyscrlink/scratch_link.py index a208979..607e1c2 100755 --- a/pyscrlink/scratch_link.py +++ b/pyscrlink/scratch_link.py @@ -170,6 +170,9 @@ def device_discovered(self, address, device_class, rssi, name): logger.debug(f"Found device {name} addr={address} class={device_class} rssi={rssi}") major_class = (device_class & 0x1F00) >> 8 minor_class = (device_class & 0xFF) >> 2 + if "LEGO Hub" in name: + minor_class = 1 + logger.info(f"Pretend to be LEGO EV3 with LEGO Hub: class={major_class/minor_class}") if major_class == self.major_class and minor_class == self.minor_class: self.found_devices[address] = (name, device_class, rssi)