Auto-reconnect Firmata (bluetooth) I/O device

Hey Chris,

We sometimes need to de-power a Firmata I/O Bluetooth device during an experiment (e.g., to change a battery). We currently have an .mwel file that connects to the Bluetooth device at the beginning of the task. We would like the experiment to be able to reconnect to the device automatically when this happens (as well as logging when the device was connected / reconnected), instead of having to restart the experiment altogether (our current solution).

Do you have a recommended way to implement this Firmata I/O auto-reconnect behavior (e.g. in .mwel code), and if not, would it be possible to add this in to Mworks?

Thanks,
Michael

Hi Michael,

At present, if the Firmata device disconnects, the only way to reconnect is to unload and re-load the experiment (as you’re currently doing).

On-the-fly reconnecting is something we could probably support. The fact that you’re de-powering the device complicates things, as MWorks would have to both reconnect to it and reconfigure it. Let me think about it.

Cheers,
Chris

Hi Michael,

On-the-fly reconnecting is something we could probably support.

As noted elsewhere, this is now supported.

Cheers,
Chris