Duemilanove needs Arduino Serial Monitor Running

I am a newbie trying Duemilanove on Mac Pro [dual Nehalem Quad Core running OS X 10.5.6]. I communicate with the Drumilanove via its onboard USB port. I of course installed the appropriate FTDI USB Serial Driver for the Intel Mac.

I use Tod Kurt's Arduino serial communication script from the "instructables" website [I can't give the URL here as this is my first post, but it starts with the usual w w w followed by the word above in quotes followed by dot-com and then /id/ST70QVYFS6PHWCB/] to communicate with the Duemilanove from the Mac, both from within AppleScripts and also from the command line of an X terminal session.

I have no problem uploading sketches such as the standard Arduino PhysicalPixel example to the Duemilanove.

But unless I have the Arduino Environment running and its Serial Monitor enabled, my "H" and "L" characters sent by typing for example "~/Documents/arduino-serial -b 9600 -p /dev/tty.usbserial-A6008cKX -s L" [without the quotes] into a terminal screen don't work.

If I have the Arduino-0015 environement running and the Serial Monitor enabled, all is fine.

This seems awkward, and its hard to believe it is 'normal' behavior. I am suspecting some sort of timing issue, and suspect that running the serial monitor slows things down just enough so that things work. But I could be all wrong.

Any suggestions about where to look for a solution or explanation?

I looked thru the forums here using search and also just browsing, and Googled for a few hours with no luck.

Thanks in advance!

I will answer my own question here.

It turns out that the problem I had was the result of the automatic reset that occurs when the serial port of Duemilanove is opened. Opening the serial monitor of Arduino Environment kept the serial port from closing and thus kept the Deumilanove from resetting, and that is why it allowed my program to work.

I verified this by running these lines of code before running my desired app:

nohup sleep 999 < /dev/tty.usbserial-A6008cKX &
stty -f /dev/tty.usbserial-A6008cKX -hupcl

Then things work OK, till the sleep 999 times out.

There are numerous posts on the web about how to defeat the automatic reset, so I guess I should be “OK”; I just have to decide on the “best” way to keep the Duemilanove from resetting.

My best to all. I hope this helps someone else!

I added a 120 ohm resistor [actually 2 240 ohm in parallel] between the reset and 5 volt sockets on the power header [see http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection ] and all is well. This prevents the Duemilanove from resetting everytime it receives serial data. Everything now works perfectly.