Closed kuff closed 1 year ago
A permanent fix could likely be closing all identified valid serial ports as the first thing when the app starts, before establishing connection with the stimulator. I think we also talked about this at a meeting sometime, but it seemed like there was not a straightforward solution on how to implement this. But I assume it should be possible.
Entire console output for first connection attempt:
Entire second console output from second (successful) connection attempt:
On the surface, this doesn't tell us a lot other than there being a series of erroneous connection attempts in the first attempt, which are not present in the second one.
A permanent fix could likely be closing all identified valid serial ports as the first thing when the app starts, before establishing connection with the stimulator. I think we also talked about this at a meeting sometime, but it seemed like there was not a straightforward solution on how to implement this. But I assume it should be possible.
Will definitely try this.
When you start the app in the
CalibrationScene
, type in the correct port number and click connect, the connection attempt always fails the first attempt after the stimulator has been started. This means the app must be restarted to make another attempt at a connection, which then succeeds. After this, the app can be restarted and a new connection can be made every time until the stimulator is turned off and on again, after which two attempts are again needed to establish a connect the first time.This may be because the stimulator (or Ardity) for some reason only accepts a reconnection attempt, instead of a new connection attempt. This has been occurring ever since the port to Ardity. The no-questions-asked solution to this would be to just programmatically make two connection attempts every time the app starts, deliberately ignoring the first attempt. There should exist a more elegant fix to this, and it might be a simple oversight on my part, but I need to investigate further to confirm.
Once I'm able, I'll expand on this issue with the console logs from Unity....