Occasional serial connection to Arduino via XP

I posted this as a reply to another thread that had a similar issue but I haven’t seen any replies to that so I think it might have gotten buried. I think it’s a valid enough question to have it’s own thread and might help other people with a similar situation.

I have my arduino connected to a usb hub that is in turn conected to a docking station for a laptop. This laptop is going to have network monitoring software on it that will occasionally retreive the status of a monitor and then take an action on the arduino.

The issue is that I can’t have the com port open all the time - I might dock and undock the laptop multiple times throughout the day. I would like to have the software open a comm port, send a command, and then shutdown to avoid the possibility of leaving a com port in a hung state if I have to undock.

This would lend itself to other projects as well for people who simply need to occasionally establish a connection to the arduino - but would like to avoid the reset issue.

Any help would be greatly appreciated!

The original post:

My setup is:

  • Perl using Win32::SerialPort
  • Windows XP
  • Boarduino with what i suspect is the NG firmware due to a 7 second sketch start delay.

I’ve read on misc threads about shortcutting the reset:

And general perl serial interfacing:

… And I know the Boarduino gives you the option to simply not solder the cap that will tie the reset to the serial but I would prefer to keep that auto reset if I can get away with it via the HUPCL feature I was seeing in some of the linux threads. I suspect that i should be able to do the same thing with the Windows Com Port setup (Set RTS on Close?)

The project I’m looking to create is basically a street light with LED’s that will show the current state of my network / monitored infrastructure. A scheduled task will run occasionally and go and retrieve the state of a monitor, that monitor will return something like, “Normal, Warning, Danger” or whatever to the program. Based on that I want to turn around, open a serial connection on the Boarduino, and change the color of the LED to the appropriate green, yellow, red, and then disconnect since this will most likely be running off of a laptop, which might at anytime be undocked, and I would like the board to simply keep it’s last known state. I saw another project that did it with the OneWire:
but I would like to do the same thing with the Arduino technology. Any help or tips would greatly appreciated.


I believe that under Windows, the board doesn’t reset when you open a connection to it. In other situations, you could also use a serial-to-network proxy (see: http://www.arduino.cc/playground/Interfacing/SerialNet), have the proxy keep the serial port open at all times, and only connect your application to the network side of the proxy when you needed the data. Physically plugging and unplugging the USB cable is a harder circumstance to handle. Alternatively, you should be able to connect a USB-to-serial adapter (like the Mini-USB adapter) to pins 0 and 1 of the Arduino board - that won’t trigger a reset of the board.

Ahh. Yes, I have the USB to serial header cable so I'll try that along with the serialnet idea. Thanks a ton and I'll let the forum know how it goes.