LEGO Wireless Protocol v3 device¶
This is an experimental class. It has not been well tested and may be changed in future.
- class LWP3Device(hub_kind, name=None, timeout=10000)¶
Connects to a hub running official LEGO firmware using the LEGO Wireless Protocol v3
hub_kind (int) – The hub type identifier of the hub to connect to.
name (str) – The name of the hub to connect to or
Noneto connect to any hub.
timeout (int) – The time, in milliseconds, to wait for a connection before raising an exception.
- name() str
Sets or gets the Bluetooth name of the device.
name (str) – New Bluetooth name of the device. If no name is given, this method returns the current name.
Sends a message to the remote hub.
buf (bytes) – The raw binary message to send.