-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Enhancement: Better Resource info #416
Comments
I’ve been considering this as well, since it is quite useful. The issue I stopped at is that getting this info is inconsistent per transport. GPIB and TCP/LXI won’t give us anything without issuing commands, USB might but very much dependent on vendor, ditto for serial. Trying to connect to each device and |
USB should not be dependent on vendor. Device ID, Manufacturer etc. is, afaik, part of USB protocol. Sending *IDN? blindly should work for USB-TMC devices, where is good level of certainty of response/not breaking things. That's why I would like to know better beforehand, yes this is the device I am looking for, by mainly manufacturer/device/serial_number combo. |
By “dependent on vendor” I meant quality of data provided — unfortunately, not all give good info. Agreed that spamming I’ll try to poke at it later this week to see how bad it is. |
Bad quality info is better than no info. As far as I can tell, I had no issue with incorrect vendor/device/serial info on USB, even with Chinese devices. As I have written, pyvisa with dll have less issues with this. According to bug: pyvisa/pyvisa#597 |
Yup, agreed on something over nothing. Thank you for pointing out the APIs on VISA side, that’s helpful. |
I would like to have better info about resources, without opening them, if the info is available, I know it's not possible for raw tcpip.
Like manufacture, model, serial ...
I see some of it is supported when using pyvisa with visa library, but not with pyvisa-py backend.
Not that I know how to do it properly, there is plenty magic required to work.
At Windows pywin32 is needed unless ctypes magic, what pyserial does.
At linux, wrapping lsusb output or pyudev, or again, pyserial walks through sysfs to get info.
Interesting implementation is pyserial.list_ports https://github.com/pyserial/pyserial/tree/master/serial/tools
which works pretty well, there is description, manufacturer even serial number of FT232 USB UART, which could be used as serial number of USBTMC device, convenient to properly open same device regardless what com_port/tty was assigned.
Same issue with USBTMC, pyvisa gives me usb id and serial, but not manufacturer and product, which is known by OS.
It's not a small task, I am aware.
The text was updated successfully, but these errors were encountered: