...

Signature
Andrew Thompson
http://www.physci.org/
> ..
>> This can be repeated, which does detect the newly appeared COM port, but
[quoted text clipped - 7 lines]
> start a thread that regularly checks for new COM connections,
> and update a list(?/whatever) accordingly?
You're right, I was being unclear - sorry. The problem is that each
reinitialization *adds* *all* ports to the list of available ports. So at
first there's, say, "COM1 COM2 LPT1". After calling initialize()
"manually" for the first time (i.e. for the second time in total), there's
"COM1 COM2 LPT1 COM1 COM2 LPT1". And so on, so after n calls to
initialize, each port is listed n+1 times.
-Jörg
Andrew Thompson - 24 Nov 2007 04:52 GMT
>> ..
>>> This can be repeated, which does detect the newly appeared COM port, but
[quoted text clipped - 4 lines]
>You're right, I was being unclear - sorry. The problem is that each
>reinitialization *adds* *all* ports to the list of available ports.
Oh right - I get you now. That is less optimal.
>...So at
>first there's, say, "COM1 COM2 LPT1". After calling initialize()
>"manually" for the first time (i.e. for the second time in total), there's
>"COM1 COM2 LPT1 COM1 COM2 LPT1". And so on, so after n calls to
>initialize, each port is listed n+1 times.
..mmm. That suggestion of mine just does not sound 'right'
anymore. I better bow out of this thread and hope one of the
'Java comm' experts can identify the best strategy.

Signature
Andrew Thompson
http://www.physci.org/