Forum > General

[SOLVED] USB connected device- How to access 'Bus Reported Device Description'

<< < (8/8)


--- Quote from: Username on June 28, 2022, 11:17:48 pm ---
--- Quote from: MarkMLl on June 28, 2022, 11:11:22 pm ---I am /so/ glad that @Bobby100 has volunteered to answer that... :-)

--- End quote ---
HA! I don't usually write LOL but I am! Very funny.  ;D

--- End quote ---

The reason I was unhappy is that your question could be read as assuming predictable behaviour on the part of an unknown Modbus slave or other attached device. TBH, for things like this I don't even like assuming that an isolated read of a contact doesn't in some way change the state of a slave (I've seen people do pretty weird things with PLCs... please don't ask).

Even if the question relates strictly to experimentally opening a serial port and immediately closing it without writing data, you never really know- in the general case- if that's visible to attached equipment. For example, does opening a port ackle either DTR or DSR, and is something Arduino-like attached to it that treats a DTR edge as a reset? Alternatively, what is the behaviour if that port is already in use but without exclusive access?

Windows booting used to have a lockup problem since by default it would look at each serial port in case a mouse was attached. Unfortunately all it did was ackle RTS (?) and look for CTS to track it, and if it saw a modem it accepted it as a mouse.

The moral is that if you don't know that it's "your" port, don't touch it. Or at the very least, tell the user what's happening and how to recover. Which is a good argument for using e.g. FTDI device serial numbers (or something equivalent), provided that the OS allows these to be read without opening the port.



[0] Message Index

[*] Previous page

Go to full version