Giter VIP home page Giter VIP logo

wineftd2xx's Introduction

This is a Linux Wine dll.so that substitutes for FTDI's D2XX version 1 drivers. It is effectively a shim layer between the FTDI's Linux D2XX drivers and Microsoft Windows applicatons running under Wine. Almost all calls are emulated, except those that have no meaning under Unix.

FTDI's D2xx version 2 drivers are not supported. Unfortunately, most recent software requires FTDI's version 2 libraries.

Note that wine version >= 7.0 is recommended. The wine*-dev package is required to compile this shim library

To install, after cloning this repository locally:

  1. confirm that you have a functioning wine version >= 7.0 You must configure it such that the desired wine executable and tools are in your $PATH.

  2. at the top level directory of the repository, type:

$ make

This will fetch the required libraries from FTDI's website and build 
ftd2xx.dll.so and libftd2xx.def
  1. To add these files in your wine installation:

$ sudo make install

  1. Ensure that your users have permission to access to the USB FTDI devices. If you use udev, this will likely involve adding rules in /etc/udev/rules.d

    For example, the Intronix LogicPort might be made accessible to all users in the plugdev group by:

    sudo cp etc/udev/rules.d/81-logicport.rules /etc/udev/rules.d

    Use 81-logicport.rules as a template if you have a different device.

  2. ftd2xx.dll.so requires that the FTDID variable be set to indicate the USB Vendor and Product ID of the FTD2xx device your Windows application controls. The syntax of the FTDID variable is either:

    FTDID=

    or:

    FTDID=:

    Product and Vendor ID are in hexidecimal. If omitted, the Vendor is assumed to be 0403 (hex).

    For example, to start the windows application controlling Intronix LogicPort:

    $ FTDID=DC48 wine ~/.wine/drive_c/Program\ Files/LogicPort/LogicPort.exe

The only issue I see with LogicPort.exe running under Wine is that the command shortcut buttons do not render until one hovers the cursor over them. Thus, at most one is visible at any time. This is not really much of an issue, as the buttons do work when clicked and all their functions are also available on dropdown menus.

IMPORTANT: If running on a X68_64 system, only the 64-bit version of the library will be generated. The 64-bit library will not be recognized by 32-bit Windows applications! To generate the 32-bit library for use with 32-bit Windows apps:

make clean   #remove the 64-bit objects
make ARCH=i386   #build the 32-bit library
sudo make ARCH=i386 install   #install the 32-bit library

Note: Compiling this may require installing the gcc-multilib package

wineftd2xx's People

Contributors

benpicco avatar brentr avatar dforsi avatar rkeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wineftd2xx's Issues

Problems with build

I'm trying this with wine-1.7.46 (Staging) but I get an error:

WinTypes.h:5:20: fatal error: windef.h: No such file or directory
 #include "windef.h"

Do I need more env vars than this? make WINEDLLPATH="/opt/wine-staging/lib/wine"

Maybe I'll try with wine from ubuntu ppa first.

Running 64bits executable

Hello,

When running this wrapper with an executable compiled on Windows with Mingw 32bits gcc, the calls are executed as expected.

However, when the same executable is compiled with 64bits gcc, I do not get the expected behavior. The calls are failing, probably because there is a mismatch with pointers.

For instance, FT_CreateDeviceInfoList(&num_device) should just return the number of connected devices in the int pointer. The first case is OK, but in the second one, my variable is not updated.

I checked with strace what is happening, and I can see the system calls dealing with /sys/bus/usb occuring and been identical in both cases... but it looks like some mess occurs at the moment the code write the result in the variable designated by the given pointer.

Do you have any idea how I can correct this problem?

wineftd2xx doesn't recognise my instrument

Hi

Thanks for the software.

I am trying to make your library work with my SignalHound Spectrum analyser SA44B
and the tracking generator TG44A.

The instruments are not recognized. The group is plugdev and I did try
to run the programs
FTID=0403:6001 wine TGStandalone.exe
FTID=0403:6010 wine Spike.exe
The programs startup but don't find the instruments.

How can I debug the system? I do have a few FTDI to serial converters FT232 and
FT245. Do you know of any simple procedure that I can use to verify your
library?

ftdi_sio and usbserial are not installed.

Regards
Gudjon

FTDI URLs have changed

The FTDIchip URLs have changed in three ways:

  1. The base URL has changed:
    Old: https://www.ftdichip.com/Drivers/D2XX/Linux/
    New: https://ftdichip.com/wp-content/uploads/2022/07/

  2. The library version has been updated:
    Old: 1.4.22
    New: 1.4.27

  3. The architecture name for the 32-bit library has changed:
    Old: i386
    New: x86_32

In summary, the new URLs are:
32-bit: https://ftdichip.com/wp-content/uploads/2022/07/libftd2xx-x86_32-1.4.27.tgz
64-bit: https://ftdichip.com/wp-content/uploads/2022/07/libftd2xx-x86_64-1.4.27.tgz

device not found, ubuntu 20.04 (AMD64)

Hello and thanks for you efforts!

I spent a good 45 min trying different things.

I even reinstalled wine

So I have built your lib and put it in the right place (removed the .so):

:/usr/lib/wine$ ll
total 964
drwxr-xr-x   2 root root   4096 May 20 10:37 ./
drwxr-xr-x 135 root root  12288 May 20 10:28 ../
-rwxr-xr-x   1 root root 332984 May 20 10:05 ftd2xx.dll*
-rw-r--r--   1 root root   2217 May 20 09:57 libftd2xx.def
-rwxr-xr-x   1 root root  13692 Apr 20  2020 wine*
-rwxr-xr-x   1 root root    115 Apr 20  2020 wineapploader*
-rwxr-xr-x   1 root root    382 Apr 20  2020 wineserver*
-rwxr-xr-x   1 root root 603804 Apr 20  2020 wineserver32*

my udev rule fires correctly

May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: /etc/udev/rules.d/81-logicport.rules:2 GROUP 46
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: /etc/udev/rules.d/81-logicport.rules:2 MODE 0664
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: Handling device node '/dev/bus/usb/006/107', devnum=c189:746
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: Preserve already existing symlink '/dev/char/189:746' to '../bus/usb/006/107'
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: sd-device: Created db file '/run/udev/data/c189:746' for '/devices/pci0000:00/0000:00:08.1/0000:07:00.4/usb6/6-2'
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: Device (SEQNUM=9468, ACTION=bind) processed
May 20 10:46:10 maxime-ThinkPad-T14-Gen-1 systemd-udevd[760811]: 6-2: sd-device-monitor: Passed 760 byte to netlink monitor

When I fire LogicPort, it says it can't find my device...

Install missing copy to C:\Windows\System32?

Is make install missing cp ftd2xx.dll.so ~/.wine32/drive_c/windows/system32/ftd2xx.dll?
I couldn't get FT_Prog working, and had a look at other drivers (specifically https://github.com/wineasio/wineasio): https://github.com/wineasio/wineasio/blob/master/wineasio-register

I manually copied ftd2xx.dll.so to ~/.wine32/drive_c/windows/system32/ftd2xx.dll, which made everything work just fine.
I didn't have to run regsvr, though.

Is that expected? Did something change with wine 8.x?

Oh, shouldn't wine copy it when it sets up the prefix?

Make requesting winegcc

make requesting winegcc.

WINEDLLPATH=/usr/lib/wine
Link with libftd2xx1.1.12/build/x86_64/libftd2xx.a
wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.1.12.tar.gz
--2022-03-01 16:49:40-- http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.1.12.tar.gz
Resolving www.ftdichip.com (www.ftdichip.com)... 217.160.0.88, 2001:8d8:100f:f000::2e7
Connecting to www.ftdichip.com (www.ftdichip.com)|217.160.0.88|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 950540 (928K) [application/gzip]
Saving to: ‘libftd2xx1.1.12.tar.gz’

libftd2xx1.1.12.tar 100%[===================>] 928.26K 667KB/s in 1.4s

2022-03-01 16:49:42 (667 KB/s) - ‘libftd2xx1.1.12.tar.gz’ saved [950540/950540]

touch -t 1201010000 libftd2xx1.1.12.tar.gz
tar xzf libftd2xx1.1.12.tar.gz
rm -rf libftd2xx1.1.12
mv release libftd2xx1.1.12
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.1.12/ftd2xx.h >xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -g -O0 -Wall -m64
-Ilibftd2xx1.1.12 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
make: winegcc: Command not found
make: *** [Makefile:62: ftd2xx.o] Error 127

My Wine version is

dipto@dipto-VirtualBox:~/Desktop/Cortex_M4/wineftd2xx-master$ wine --version
wine-5.0 (Ubuntu 5.0-3ubuntu1)

Wine with ATDH1150USB Atmel CPLD Programming Cable

Hi,

Trying to get this to work with a programming adapter which is a pretty basic FTDI adapter on Ubuntu 22.04.2 LTS with Wine.

FTDID=0403:6010 wine ~/.wine/drive_c/ATMISP7/ATMISP.exe
0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\ATMISP7\ATMISP.exe") failed (error c000012f).
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\ATMISP7\ATMISP.exe" failed, status c0000135

It's very possible I'm missing something basic, however, "make" and "make install" seemed to be successful.

I'm running a 64-bit Distribution, however, the software is 32-bit executable. Do I need to do anything special in these circumstances, or is it possible the problem I am experiencing is elsewhere?

Any help would be greatly appreciated.

Regards,
Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.