florentbr / OWON-VDS1022

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

Bug on eeepc 32bits #71

Open cirezolleg opened 1 year ago

cirezolleg commented 1 year ago

USB is not visible when I run "owon-vds-tiny" on an eeepc PROC = N2600 intel 32bits, linuxMint 19 lsusb OK we see the VDS1022 , but a java error appears endlessly . Do you have a direction for a debug THANKS


env: Linux, Java 11.0.3 i386 app dir: /opt/owon-vds-tiny user dir: /home/eg/.owon-vds-tiny locale: en, fr_FR, false ch.ntb.usb.USBException: LibusbJava.usb_open: Resource temporarily unavailable (-1753889856) at com.owon.uppersoft.vds.core.usb.CDevice.open(CDevice.java:86) at com.owon.uppersoft.vds.core.usb.CDevice.getDevices(CDevice.java:300) at com.owon.uppersoft.dso.source.usb.USBSourceManager.refreshUSBPort(USBSourceManager.java:79) at com.owon.uppersoft.dso.source.comm.detect.USBLoopChecker.checkUSBDevice(USBLoopChecker.java:74) at com.owon.uppersoft.dso.source.comm.USBDaemonHelper.onNotConnecting(USBDaemonHelper.java:35) at com.owon.uppersoft.vds.machine.InfiniteDaemonTiny0.onNotConnecting(InfiniteDaemonTiny0.java:37) at com.owon.uppersoft.dso.source.comm.Flow.run(Flow.java:79) at com.owon.uppersoft.dso.global.ControlAppsTiny$1.run(ControlAppsTiny.java:38) ch.ntb.usb.USBException: LibusbJava.usb_open: Resource temporarily unavailable (-1753881632)

florentbr commented 1 year ago

I've never seen this error before. It's raised by the underlying libusb library. Try to call the python API to see if the native jni library wrapping libusb is the cause:

from vds1022 import *

dev = VDS1022(debug=True)
dev.set_channel(CH1, range='10v', offset=1/10, probe='x10')
dev.fetch().ch1.rms()

I would also try to run the app from a live linux like Linux MX with java 1.8 (8).

cirezolleg commented 1 year ago

1st try:: i saw in vds1022.py that it was python 3 i made the file "vds1022_bug.py" as follows, which I made executable


!/usr/bin/env python3

-- coding: utf-8 --

from vds1022 import *

dev = VDS1022(debug=True) dev.set_channel(CH1, range='10v', offset=1/10, probe='x10') dev.fetch().ch1.rms()


I have the ENV variable: $PYTHONPATH = ..../OWON-VDS1022-1.1.5-cf19/api/python/vds1022


After launch, I have a Python error: from .vds1022 import File "../OWON-VDS1022-1.1.5-cf19/api/python/vds1022/vds1022.py", line 954 return self.x(), ( f.y() for f in self ) ^ SyntaxError: invalid syntax


I do not know this type of declaration "*(f.y()...... my knowledge in python is limited.

I'm trying to find a java 18.(8) to continue this DEBUG .

The VDS1022 is running fine on your script's test machine so far.

Anyway thanks for everything...

florentbr commented 1 year ago

I do not know this type of declaration "*(f.y()...... my knowledge in python is limited.

Asterisk is used to iterate/unpack the list comprehension. It's available since python3. Your code is likely executed by python2. Try to run your code directly with python3 vds1022_bug.py or run python3 and execute each line.

cirezolleg commented 1 year ago

Yes, I saw that it was python3, and that's why I put at the top of the script: "#!/usr/bin/env python3" . I still executed the lines directly in the interpreter See attached my terminal.

I had, before, launched "python3 vds1022_bug.py" with the same error.

I tried running the initial command: "java -cp "/opt/owon-vds-tiny/lib/*" com.owon.vds.tiny.Main" by replacing "java" by the java of revision 1.8 of the openJDK which I installed (/usr/lib/jvm/java..1.8../jre/bin/java)::: same results, same error.

VDS1022_python3_step_by_step

florentbr commented 1 year ago

Update python, your have an old version which is no longer supported. According to pep-0448 , unpacking iterators was introduced in v3.5 . You are likely just just a few iterations before that.

cirezolleg commented 1 year ago

I'm sorry but I just tried with version 3.6.8 and it's exactly the same (image attached)

I isolated the vds1022.py file to test but without success.

We stop there, I think I'm going to buy another more modern PC I try to do the manipulation on several other PCs (64 bits) to see if I find this PB.

Thanks for the help, I don't want to occupy your time with this.

By Eric Gelloz (france)

python3 6_test

florentbr commented 1 year ago

There's something wrong with your install/setup, python shouldn't fail on this line/syntax.

Anyway, if you manage to connect the device with python without the USB error, it would indicate that the wrapping library libusbJava.so is the culprit and needs to be recompiled for Atom processors. The sources to recompile are present in libusbJava-src.zip