florentbr / OWON-VDS1022

Unofficial release for the OWON VDS1022/I Oscilloscope
259 stars 45 forks source link

Interface not detected on linux after software restart #24

Closed User-McUserface closed 2 years ago

User-McUserface commented 3 years ago

Basically when I have everything up and running and from the upper left corner I disconnect from the scope, software still recognizes that it's there and allows me to reconnect to it, but if I then close the software completely and restart it, it no longer recognizes that the scope is connected until I physically disconnect and reconnect it.

florentbr commented 3 years ago

What is the status of the led on the scope before closing the app and after reopening ? Do you get an exception in the console before closing the app and after? My device reconnects automatically as soon as I reopen the app on either Windows or Linux. Since I have an Intel USB controller, I guess it's related to your USB ASMedia controller. Check in your bios if there are settings related to your USB controller.

User-McUserface commented 3 years ago

What is the status of the led on the scope before closing the app and after reopening?

It's green with occasional red flashes before closing and just green after that, including when app is reopened.

Do you get an exception in the console before closing the app and after?

Nope, no exceptions at any point.

I guess it's related to your USB ASMedia controller.

Since I figured out which ports were controlled by ASMedia controller, I started using the ones which are controlled by Intel controller and everything's been working fine, except for this issue with restarting.

km-linux commented 3 years ago

The oscilloscope has an USB 1.1 port. You MUST connect it to an USB 2.0 port. On USB 3.0 port you will have no chance for running.

User-McUserface commented 3 years ago

On USB 3.0 port you will have no chance for running.

It does though, I just got done prototyping for today and it's been working through USB 3.0 port all this time. Since my motherboard doesn't have any USB 2.0 ports.

In fact it works in both, Windows 10 and Linux.

florentbr commented 3 years ago

It should be fixed in release 1.0.33-cf12. Feel free to reopen this ticket if it's not the case.

User-McUserface commented 3 years ago

Thanks for keeping up with improvements, I really appreciate it.

As for this issues specifically, I tried the new build and it's still the same.

I don't seem to be able to reopen the issue so I hope you still get the notification.

florentbr commented 3 years ago

I can't reproduce your issue. Can you at least provide the full logs from the first and second launch?

Run owon-vds-tiny &>> launch1.log Disconnect and close the software Run owon-vds-tiny &>> launch2.log Post the files launch1.log and launch2.log

User-McUserface commented 3 years ago

Can you at least provide the full logs from the first and second launch?

I've done everything else you've requested so far have't I? :)

Here you go.

During launch1 I connected and disconnected the scope from software button, then started launch2 session and as expected, it was not detected by software.

launch1.log launch2.log

florentbr commented 3 years ago

I've done everything else you've requested so far have't I? :)

Sorry my native language is not English, is my writing offensive somehow ?

User-McUserface commented 3 years ago

Sorry my native language is not English, is my writing offensive somehow?

Not offesive, don't worry about it, it's just that inclusion of "at least" can be interpreted to imply an unsaid part, like "if not X, then at least Y". All I said was that there was no X that I didn't provide for there to be "Y that I could at least provide" :)

florentbr commented 3 years ago

Not offesive, don't worry about it, it's just that inclusion of "at least" can be interpreted to imply an unsaid part, like "if not X, then at least Y". All I said was that there was no X that I didn't provide for there to be "Y that I could at least provide" :)

Thank you for the explanation, it wasn't my intention to imply anything.

During launch1 I connected and disconnected the scope from software button, then started launch2 session and as expected, it was not detected by software. launch1.log launch2.log

I fixed the Exception present in both of the logs but it may not be the source of your issue. Can you try this release :

OWON-VDS1022-1.0.33-cf12.1.zip

User-McUserface commented 3 years ago

Can you try this release

I tried and the issue is still present. To simplify it further: if the device is plugged in first and software is launched later, it won't be detected. If it's done vice-versa, first software and then device plugged in, it detects and works just fine.

I logged two launches again just in case. Scope was plugged in before launch1 and during launch2.

launch1.log launch2.log

florentbr commented 3 years ago

I don't think this software is the issue here. I've refactored all the code related to libusb. So I'm confident that it's something else. It looks like libusb simply fails to enumerate the ports for some reasons.

If you want to get to the bottom of it, you'll have to dig into the logs and monitor the USB ports. I'd start with lsusb to see if the device is also missing once relaunched.

I'll try to download a live version of Manjaro KDE this weekend just in case it's related to your distro.

User-McUserface commented 3 years ago

I'll try to download a live version of Manjaro KDE this weekend just in case it's related to your distro.

Honestly, it's not such a big problem to warrant a big time investment from you.

When I open an issue, my aim is to bring a problem to the attention in case it's something that might affect significant amount of people.

You took a look at the code and everything seemed in order, plus nobody else seems to be having the same issue.

Of course it's up to you, but I'd rather you concentrate on other issues or improvements which more people could benefit from.

florentbr commented 2 years ago

It should be fixed in release 1.1.1-cf13 Feel free to reopen this issue if it's not the case.