Firmata resetting at reconnect

Hey out there,

I am trying to use Firmata for the first time, and I am a bit confused. It might be very nice if somebody could help me to understand.

In a super simple example, I try to

1 - connect to firmata on the Arduino
2 - enable digital pin 13
3 - disconnect (via software, Arduino is still plugged in)
4 - reconnect
5 - enable pin 12
6 - disconnect again

expectation: pin 12 and 13 are enabled.

My problem is that in step 4 (connect the second time) the Arduino seems to "reset" --> pin 13 is disabled

Is this the standard behavior? And is there a chance to change it?

Or is this a flaw in my setup?

Currently, I am using the "standardFirmata" and the ruby gem "arduino_firmata" to communicate.

I tried to disable the systemResetCallback in the standard firmata, but that does not seem to help.
I tried to find out if my ruby communication library is calling a reset on the Arduino, but that seems not to be the case.

Thank you for reading, have a nice day

Sebastian

My problem is that in step 4 (connect the second time) the Arduino seems to "reset" --> pin 13 is disabled

The Arduino doesn't "seem" to reset. Opening the serial port DOES reset the Arduino.

Is this the standard behavior?

Yep.

And is there a chance to change it?

Lots of ways. Mr. Google knows a few - some temporary, some permanent.

But, the simplest solution is to stop opening and closing the serial port. Your app should open the port ONCE, and leave it open until it ends. When it ends, it can close the port.

Oh so that is a standard Arduino function?

--> Thanks ... never thought about that ... but that might help me.

But, the simplest solution is to stop opening and closing the serial port. Your app should open the port ONCE, and leave it open until it ends. When it ends, it can close the port.

I would like to be able to restart the "host" computer in the meantime. So that is only my "last resort"

I would like to be able to restart the "host" computer in the meantime. So that is only my "last resort"

So, all the other peripherals connected to the computer currently continue operating without interruption while you reboot your computer, and the Arduino should do the same.

I have my doubts about THAT.

So, all the other peripherals connected to the computer currently continue operating without interruption while you reboot your computer, and the Arduino should do the same.

I have my doubts about THAT.

No. But I would like the Arduino to be the only one to do so.

But anyhow ... You have helped me a lot!
Thanks for that!

My solution: 10uF cap beween 5v and rst pin.