Tool/software:
03/25/2025
Dear Forum,
we have sereral USB2ANY Devices here. Our Development Laptops are Windows 11, the technical PCs where they are used, are WIN10.
We also have the Software TICS Pro Software.When installed and first plugged in, the TICSProsuggested a Firmware update which was done on the devices. This is a few days/Months back. The firmware updates were not performed by me but by any colleague. I do not know the actual firmware versions applied therefore.
When plugged in, the tics Pro sw can be started, a server started, for instance on <ip>:11000, on the test machines it is 127.0.0.1:11000. Then we use the python software snippets, that enable us to connect to this server as a client. Then there are some functions we can call, for instance reading out the serial numbers with the GetAllUSB2ANY() function. It returns with no error, by repeating the command and true, but the list with serial numbers of the devices attached is an empty string. NO serial numbers are reported! If we plug two such devices to a pc, where our python snippets run, we get the serial number of one of the two devices attached, i.e. the number of this one that has not been grabbed by the TICS Pro software. I we select the other of the two devices within the TICS Pro software, the game is switched... we get the serial of the first one that is now not being attached to the software. Also we do not see these devices in the device manager (how should they be visoible at all?).
How can we get the serial number read out with the GetAllUSB2ANY() function?
Thanks and warmest regards,
Roland
The "GetAllUSB2ANY()" API is a thin wrapper around the USB2ANY's own APIs, which disclose the available, unconnected devices. Right now, the currently connected interface is not considered. I think in the future, this should be considered, potentially with an argument to the GetAllUSB2ANY API that returns either an empty string or the currently-connected USB2ANY as the first or last entry. For now, I think the only workaround is to use the SelectInterface API with the "DemoMode" interface first, which closes any active USB2ANY connections, and then call GetAllUSB2ANY(). But if this doesn't work for you, e.g. you need the USB2ANY connected in TICS Pro while this is happening for some reason, I can make the modifications on a custom binary specifically for you before pushing it to the main binary.
USB2ANY enumerates as an HID-compliant vendor-defined device with hardware ID = HID\VID_2047&PID0301, owned by a parent USB Input Device with hardware ID USB\VID_2047&PID_0301.
Dear Mr. Payne,
thanks for your reply. Yes, we have the USB2ANY-devices connected to TICSPro, but our query for the serial numbers is to be performed only once in the whole process at the beginning, when we start our software, so it would be possible, to cut the devices off for a short time from TICSPro, perform a call for the presence of all with the reply of the serial numbers, and then after this, again "attach" them safely to the TICSPro again, or even start TICSPro AFTER the call for presence, or whatever similar process would be possible. How would I call the API with the "DemoMode" Interface first, to get all the attached devices? Do you have any code snippets for this?
Other than that, it would be very nice necessary to have a version, that allows the serial scan for all attached devices though. This would be the clean solution.
BTW, on Windows 11, we do see no interfaces at all, neither the connected ones, nor the disconnected. The call to GetAllUSB2ANY returns with true and an empty list of serials... This is only possible on Windows 10 yet, where we can see the serials of the non-connected one....
Thanks and regards,
Roland Schaufler
I went to write the example program, and then it did not work because the API did not free the USB2ANY instance. Oops.
Give me a few hours to make a patch for you to try.
I've attached several debug binaries compiled with a bunch of changes:
[OPTIONS] AUTOCONNECT = FALSE
Because the binaries are debug binaries, they may perform slightly slower than non-debug binaries. However, the debug binaries will give us detailed error messages in case something goes wrong. If nothing goes wrong, I will incorporate the non-debug binaries into a new installer later this week.
Unzip the zip file; copy the dlls, the exe, and the pdb files; paste them into C:\Program Files (x86)\Texas Instruments\TICS Pro (overwriting any existing files). You may want to make a copy of the old files in case the debug binaries have an issue and you are otherwise blocked without the prior versions; or you could just reinstall TICS Pro using the installer from TI.com.
I also included an updated copy of TICSPro_TCP.py in the zip file, which has the new implementations of the GetAllUSB2ANY, ConnectToUSB2ANY, and GetInterface APIs.
Please give these a test, and let me know if you encounter any additional issues.
Thanks a lot, I will test asap and come back with results...
thanks and regards....
... BTW, is it possible, that the GetInterface() function in the TICSPro_TCP.py is empty and contains only comments but no code?
... ok, now I have successfully tested all, GetAllUSB2ANY and GetInterface both work. THANKS A LOT for your outstanding efforts and the solution in absolutely record time! BTW, it is not planned to overtake this into a further release of TICSPro??
I added the following part into the GetInterface(...) Function, then i worked also!
Thanks and regards!
r = self._SEND("getinterface") return r[2], r[3], r[4]
I think the python file I gave you is one save behind the version in my editor, apologies for that. You figured out the missing code though, well done.
With confirmation that this is working, I'll test internally a bit more, and publish a new version of the software and a new version of TICSPro_TCP.py (which will include the body of the GetInterface API) on ti.com later this week. Thanks for your assistance in testing!