wineftd2xx
wineftd2xx copied to clipboard
trying to use with "lpg gassetting"
Hi, i try to use it with http://lpgtech.pl/wersja/download/LPGTECH%20Gas%20Setting%202.0.45.75%20Setup.exe
I guess it uses ftdi 2.x which is tok recent? Any hints if it could be made to run somehow?
I just updated the README to clarify that only ftdi 1.x is supported. Sorry.
oh. excuse my ignorance, but what are the obstacles to make it compatible with version 2 ftdi?
Study how the existing 1.x shim works and adapt it to work with the newer 2.x FTDI lib. Not conceptually difficult, but it would involve a lot of tedious work to fully understand each library call's arguments and return data.
This effort would probably be best done as a fork or separate project. I'd be happy to provide a link to your work once you're ready.
I assume this is the v2 reference guide? https://www.dlpdesign.com/drivers/D2XXPG21.pdf
It is a bit over my head how exactly wine hijacks the dll function calls of d2xx and how to debug that it happens at all.
Given that the "gassetting" program can work with Bluetooth bridges too and even wifi based devices ("techconnect") i guess it uses the enhanced ftdi functions merely to get the list of devices. If it would be possible to merely inject "fake" data to the function calls, then one could just create "virtual" ftdi port , merely forwarding the serial data from /dev/ttyUSB0 (or any other) instead of passing the functions to real ftdi. The hardware in question uses only rx and tx lines. I really have no idea why gassetting coders did not use VCP interface, saving grey hair to everyone...
I admit it is bit above my head to grasp how to do it though, coding-wise...
From the linked document:
The new version of the D2XX drivers contains many enhanced features and has been divided into four groups for clarity. The Classic Interface Section documents the original D2XX functions that are retained in this new release. The Classic Interface provides a simple, easy to use, set of functions to access these FTDI USB devices.
Using the FT-Win32 API, existing Windows legacy Comms applications can easily be converted to use the D2XX interface simply by replacing the standard Win32 API calls with the equivalent FT-Win32 API calls.
Please Note – the Classic Interface and the FT-Win32 API interface are alternatives. Developers should choose one or the other – the two sets of functions should not be mixed.
AFAIUI this means, D2XX 2.x still provides the old API calls (named "Classic Interface"). As long as the application still uses the old API, it doesn't matter if D2XX 1.x or 2.x is used. One such application is the Realtek RTD Customer tool. While it ships D2XX v2.x, it still uses the old API calls.
Later in the document:
FTDI has included EEPROM programming support in the D2XX library, a and New features include a programmable receive buffer timeout and bit bang mode.
Looks like that is already part of wineftd2xx, so we already have some D2XX v2 support and maybe it just needs a bit tuning here and there to get it working? Tell me if I'm completely wrong, please!
Got RTD Customer Tool working with wineftd2xx :laughing: As I said... it ships with D2XX v2.something, but...