(2023-06-29, 06:49 PM)TVR Wrote: Assume I have 2 identical devices - device A in USB port 1 "remember by device id", and Device B in USB port 2 "remember by port".
Obviously you could swap the devices around between ports 1 and 2, and OpenPlotter wouldn't know anything about it (since both devices are identical).
But what if I unplug both devices and then plug one device into port 3? OpenPlotter won't know which of the two devices has been plugged in. Will it ignore it (since Device B was set to "remember by port")? Or will it assume Device A was plugged in, and move it from port 1 to port 3?
Maybe I'm overthinking it - its an extreme edge case so probably nothing to worry about?
Yes, I think you are right. The conclusion would be that if you have 2 identical devices it does not make sense remember one of them by device and the other one by port, you need to remember both of them by port. This way you know that on port 1 there will be always the GPS and in port 2 there will be always wind.
At this point you may think "OK then, if I can not move my devices why I need to remember them?". The answer is because even if your device A is in port 1 with the virtual port /dev/ttyUSB0 assigned by linux, maybe on the next reboot the system has assigned to the device A the virtual port /dev/USB1 and then you will have a problem because you could treat that device as wind but it is GPS. Virtual ports assignations are not fix in linux and they are often reassigned. With this system of alias and remembered devices/ports you will be sure that what you have in port 1 will be always the GPS even when the system reassign the virtual port. Actually this is the main goal of the openplotter-seriial app, not that you can move devices but that devices are always treated as what they are even when linux assigns them another virtual port.
funny right?
![Smile Smile](https://forum.openmarine.net/images/smilies/smile.png)