SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
769 stars 97 forks source link

Shakeit Motors problems since 9.1.13 #1508

Closed RipperGOT closed 8 months ago

RipperGOT commented 8 months ago

Describe the bug Since update 9.1.13, it disconnects after 5 or 10 minutes on the Arduino Uno board. I have tested all the updates, and it only works properly with version 9.1.12. I have also tried the Fake Chip drivers, etc. I have tried different Arduinos, and it still happens. The only way to prevent the board from disconnecting is to downgrade to version 9.1.12.

Simhub version 9.1.1X

Third party plugins None

To Reproduce Steps to reproduce the behavior:

  1. Connect Shakeit Motors
  2. Play for a while
  3. The board disconnects
  4. Remove the USB cable and plug it back in
  5. The board works again.

Log files 21:03 07/01/2024 INFO New valid lap detected : 00:00:55.0610000, (LapId :b506fafb-c33a-4d23-9c16-1f80372cbed0) INFO Storing lap consumption : 0.89, lap start : 29.62, lap end : 28.73 ERROR Closing arduino Pedalera-Vibracion@COM6 : reason System.IO.IOException: Uno de los dispositivos conectados al sistema no funciona.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str) at System.IO.Ports.SerialStream.EndWrite(IAsyncResult asyncResult) at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout) at System.IO.Ports.SerialPort.Write(Byte[] buffer, Int32 offset, Int32 count) at ArqSerialLib.ArqSerial.SerialWrite(Byte[] data) at ArqSerialLib.ArqSerial.FlushOutcoming(Boolean all) at SerialDash.SerialDashController.Send(Byte[] customMessage, Boolean capture) INFO Arduino performance report for Pedalera-Vibracion@COM6 : Packetsize= 16, Packetbuffer = 1, SentDatagramsCount = 45462, FailedCount = 0, ReemitedCount = 0, ReemitedDuetoWait = 0, Current ahead = 1 INFO Arduino performance report for Pedalera-Vibracion@COM6 : Packetsize= 16, Packetbuffer = 1, SentDatagramsCount = 45462, FailedCount = 0, ReemitedCount = 0, ReemitedDuetoWait = 0, Current ahead = 1 INFO New fuel stat aggregated 0.67/lap INFO CurrentLap invalidated for Fuel stats INFO Game disconnected INFO Game not focused : disabling 'no activate' mode for simhub window INFO AC process exited INFO AC UDP data lost INFO Disconnecting from AC UDP data

SHWotever commented 8 months ago

Hi !

This error is an hardware error, it's not software, it means that the usb chip is failing. The only change about shakeit since 9.1.12 is about some effects content scale, they scale differently and can be more contrasted. https://github.com/SHWotever/SimHub/releases/tag/9.1.13 and might leverage some wiring/board weaknesses

If you have such failures I would recommend to check the power source as well as the wiring. And eventually lower the output gain as a quick workaround.

Could you also join the full log files as requested in the template?

SHWotever commented 8 months ago

Nb : the fact that you have to unplug and plug back the board proves that the usb chip has failed as the log is showing. In case of basic software issue simhub would simply reconnect after a few seconds automatically. But since the chip has failed it's impossible to do it on your case.

RipperGOT commented 8 months ago

I think it's a software issue. 3 'bad' boards? I ran a test by resetting the PC while independently powering the Arduino board (to prevent it from resetting), and it worked. It's like the USB port is freezing. It only happens with versions later than 9.1.12. With that version, it never disconnects.

SHWotever commented 8 months ago

Hi ! It's indeed the usb to ttl chip which is freezing/crashing. But this chip only acts as a "bridge" between the Arduino chip and the computer. It's not programmed or controlled by the software.

My opinion is that the "reinforced" effects are stressing a little more the Arduino/power source. There have been absolutely no changes about how simhub communicates with the Arduino with this version and later one, that's why I'm completely confident it's not software. (And the errors also shows it : " a device attached to the system is not functioning" is an hardware error pretty common when the hardware is "giving up")

Have you tried to lower the gain as recommended to check that ?

RipperGOT commented 8 months ago

Yes, I have also tried lowering the gain, and the same issue persists with all three Arduino boards. The only thing that prevents the disruptions is downgrading to version 9.1.12.

SHWotever commented 8 months ago

Hi ! Thats really strange I double checked all the changes since 9.1.12 (which was quite long as there were more than 600 files to review :D ) but I've not found a single change about the arduino. Only effect responsiveness and scaling.

To quickly orient the research : could you try to simply unplug the motors from the board and run it as usual. It's an easy test and it will allow to quickly see if it's an hardware issue. If the board still disconnect, that would mean that indeed the code is somehow at fault.

If it still disconnect, I would need to have a better overview to orient my investigations, could you join ;

RipperGOT commented 8 months ago

Ok mate! As soon as I have all the information, I will upload it.