ev3dev / lms2012-compat

lms2012 VM compatibility layer for ev3dev
http://www.ev3dev.org
7 stars 4 forks source link

How to handle serial number? #29

Open dlech opened 8 years ago

dlech commented 8 years ago

The EV3-G desktop software uses the serial number of an EV3 to know that the different connection types (USB/Bluetooth/WiFi) are from the same device. This is how you get the 3 checkboxes for one device.

The EV3 uses the Bluetooth MAC address as the serial number. However, since we are going for hardware agnostic, this isn't going to work. And unfortunately, there is not a hardware agnostic way of getting such a number that I know of.

We could randomly generate a serial number on first use. However, I think that this will be a problem when using bluetooth because the actual mac address is used, which is not generally changeable.

I suppose for devices with bluetooth, we can use the bluetooth mac and something else otherwise. The problem with that is that if we add a bluetooth dongle later, then we have to change the serial number.

dlech commented 8 years ago

I have discovered that the EV3-G desktop software will only list devices that start with the LEGO OUI (00:16:53), so if we generate a serial number, it would be best to begin with that.