-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deej doesn't reconnect after usb gets unplugged and plugged in again #38
Comments
Hi there @ryanaukes, thank you for the kind words! This is an understandable need, and I intend to do a connection stability pass in the near future that'll hopefully also include this. It will need to be accompanied by better signaling for deej's current connection state, which is challenging to do without a UI - but I'll come up with a solution. I'm leaving the issue open and will update here when this is released. |
Hello @omriharel, please take a look at a comment that I posted on a related but separate issue; I'm wondering if the "can't read line from serial" function might simply be broken, as editing the config while Deej.exe is running recovers from both plug/unplug as well as from loss due to sleep/wake of the computer. The config reload seems to be using similar functions, so I'd think that if the "can't read line" function were to be edited, that'd fix the main issue for both of these. Maybe I'm missing something though. I hope this helps narrow things down. |
I was able to write a file called on_connect.ps1 that fixes this issue through task scheduler: (fork here: master...wildxmxtt:deej:patch-1 ) Steps to do this on WINDOWS:
For the variables in task scheduler use the following:
Hope this helps! Also if your com port tends to change often please change all 3 lines in on_connection.ps1 where it says: $device = Get-WmiObject Win32_SerialPort | Where-Object { $_.DeviceID -eq $arduinoPort } To $ArdunioName = "Arduino NANO Every"
$device = Get-WmiObject Win32_SerialPort | Where-Object { $_.Description -eq $ArdunioName } |
What about "reconnect" button in tray? That would restart the app or a menu with port selection and reload COM button or change the comport in config and back which sort of works as slow workaround. |
I slightly tweaked @marcuswu 's reconnection implementation to attempt reconnections every 1s and send desktop notification when deej loses/re-gains connection at: https://github.com/sin3point14/deej, as I faced the same usb unplugged and plugged problem and felt this approach is better suited |
Maybe a nice addition is to make the Deej hotswappable, so that it automatically connects after you plug in the Deej.
I don't want to keep my Deej on all the time, but also don't like it that I have to start and stop the Deej software everytime I unplug the Deej and plug in it again.
I would prefer to run the Deej software at startup and let it connect to the hardware whenever I plug it in. I hope this could be added in the future. Thanks for the great project!
The text was updated successfully, but these errors were encountered: