Auto-reconnect BLE feature request
Hey Chris,
We are still unsure what is causing the bluetooth disconnection issues. Until then, would it be possible to add in a behavior that stops the task when a Bluetooth firmata IO device disconnects; constantly attempts to reconnect (e.g. with exponential backoff); and if successfully reconnects, resumes the task from where it was?
It would be useful if these events threw warnings/errors messages on the client console, and if these events were loggable in the .mwk2 file.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Christopher Sta... on 02 Mar, 2020 07:58 PM
Hi Michael,
I've added two new parameters, connected and reconnect_interval, which enable this behavior.
connected
should be set to the name of a variable. The variable will be set to true when the device is connected, false when it disconnects. By monitoring the value of the variable (e.g. at the beginning of each trial or via attached actions), your experiment can take appropriate action (e.g. pause or resume the experiment) when the connection state changes.The device does log messages upon disconnection and reconnection, and these messages (like all MWorks messages) will be saved in the event file. Also, the value of the
connected
variable (like all variables) will be stored in the event file.I can update your iPad(s) whenever you like.
Cheers,
Chris
Christopher Stawarz closed this discussion on 17 Mar, 2020 12:44 PM.