Serial device not added correctly - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: Bug Reports (https://forum.openmarine.net/forumdisplay.php?fid=4) +--- Thread: Serial device not added correctly (/showthread.php?tid=4675) |
RE: Serial device not added correctly - TVR - 2023-06-29 All looks good to me, I can successfully remember devices by port and by serial. I only have one device with no serial, so I've been unable to test what happens if you have 2 devices with the same ID and no serial, and try to remember them both by device ID. Immediately after upgrade: After deleting and reconfiguring the devices: Device details (with serial number): Code: CURRENT_TAGS: :systemd: Device details (without serial number): Code: CURRENT_TAGS: :systemd: Maiana device details: Code: CURRENT_TAGS: :systemd: RE: Serial device not added correctly - baltika_no_9 - 2023-06-29 (2023-06-29, 04:03 PM)TVR Wrote: I only have one device with no serial, so I've been unable to test what happens if you have 2 devices with the same ID and no serial, and try to remember them both by device ID. I've tried that and as expected you can't do it. RE: Serial device not added correctly - TVR - 2023-06-29 That doesn't look quite right, if you have 3 x matching devices then it lets you remember the first one by device ID. Shouldn't it stop you assigning any of them by device ID? Thinking about it some more, this might be something we can't guard against. There's nothing to stop a user plugging in one device, remembering it by ID, and then plugging in a duplicate... RE: Serial device not added correctly - Sailoog - 2023-06-29 Exactly TVR. The second one will be always blocked, never the first one. RE: Serial device not added correctly - baltika_no_9 - 2023-06-29 [quote pid="26558" dateline="1688056054"] That doesn't look quite right, if you have 3 x matching devices then it lets you remember the first one by device ID. Shouldn't it stop you assigning any of them by device ID? Thinking about it some more, this might be something we can't guard against. There's nothing to stop a user plugging in one device, remembering it by ID, and then plugging in a duplicate... [/quote] It makes sense to me, the first device is saved with vendor id = X, product id=Y , serial = 0. Just because the Serial appĀ can detect the other connected devices, Openplotter doesn't care unless I try to set them up. I might be using them in a different application. When I try to add the second one it says vendor id =X, product id = Y, serial = 0 - can't do that, I already have that one used. That way there will never be a conflict. RE: Serial device not added correctly - TVR - 2023-06-29 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? RE: Serial device not added correctly - baltika_no_9 - 2023-06-29 Well you've added a device whose attributes match exactly those of a device that is known to OP and that is Device A. There is no further testing or validation; you've plugged Device A into a different port. I can't imagine a different outcome. Your'e matching against a (small) set of attributes, any device exhibiting those attributes passes the test. There is no actual correspondence between something presenting those credentials and any particular physical piece of hardware. I might try it out though! RE: Serial device not added correctly - Sailoog - 2023-06-29 (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". 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? RE: Serial device not added correctly - Sailoog - 2023-06-29 Published OpenPlotter Serial v3.3.0 in production server. I did not want the version using "model" attribute to be online too much. Thanks for your help, great teamwork! RE: Serial device not added correctly - Slin_Slin - 2023-07-04 Thank you all |