2

I have the SDK for a USB device which works on windows. I can compile my code without problems. However, the SDK is using DLL's, and there is no support for the device on Linux.

Can I compile the code on Linux with the DLL's? I've been looking at Wine to do so, but I have no clue where to even start.

Is it even possible?

EDIT:

Output from dmesg:

[ 430.699883] usb 3-2: new high-speed USB device number 4 using xhci_hcd

[ 430.829091] usb 3-2: New USB device found, idVendor=132b, idProduct=210b

[ 430.829100] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 430.829106] usb 3-2: Product: Illuminance Spectrophotometer CL-500A

[ 430.829111] usb 3-2: Manufacturer: KONICA MINOLTA, INC.

[ 430.829115] usb 3-2: SerialNumber: 10001991

[ 430.830678] hid-generic 0003:132B:210B.0002: hiddev0,hidraw1: USB HID v1.11 Device [KONICA MINOLTA, INC. Illuminance Spectrophotometer CL-500A] on usb-0000:00:14.0-2/input0

[ 430.831732] hid-generic 0003:132B:210B.0003: hiddev0,hidraw2: USB HID v1.11 Device [KONICA MINOLTA, INC. Illuminance Spectrophotometer CL-500A] on usb-0000:00:14.0-2/input1

[ 1153.052833] systemd-hostnamed[3663]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!

Anders
  • 301
  • 5
  • 12

2 Answers2

2

Generally, no. Device drivers are OS-specific as they have hooks where the operating system calls the driver, so you can't use a windows driver under wine, because linux is not windows and doesn't work like windows internally.

Now, there's a few exceptions, namely TWAIN scanners and CAPI telephony devices, which don't really come with OS-mode drivers, but correspond to a userland API, and hence there are Wine wrappers for those.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • Ok, that's too bad... Guess I have to research how to make my own drivers instead then. Thanks for the quick answer. – Anders Jun 25 '15 at 12:50
  • How hard this is going to be depends on what kind of USB device you have. What is it? – Marcus Müller Jun 25 '15 at 12:52
  • It is a Konica Minolta CL500a. – Anders Jun 25 '15 at 13:19
  • Oh! Photometry! That's going to be interesting! Sniff around the USB bus under windows. It's *probably* (if I built that) just a bulk transfer protocol that can be relatively easily recreated under linux (and windows) using libUSB without writing kernel drivers. – Marcus Müller Jun 25 '15 at 14:07
  • oh, by the way, this is rather professional measurement equipment, so chances are that the interface is compatible with some standard software for that specific field. Connect the device, and have a look at what `dmesg` says. Maybe it's just a USB-to-serial adapter, or something similar, making things even easier. Good luck! – Marcus Müller Jun 25 '15 at 14:11
  • @Anders: ah, and by the way 2, professional equipment manufacturers tend to have professional technical support. Ask them about the interface; download the software for the CL-500A; if you're lucky, it contains information or free and open source code, so you can get the source code from minolta. I don't think this device really needs much of a driver, but windows' USB model is just so terrible that every single standard bulk or even serial device needs its own driver... – Marcus Müller Jun 25 '15 at 14:19
  • Thank you for your good advice! I am currently looking into libUSB. I have some of their other products as well, but as far as I can tell they are not using the same protocol. I have emailed them about the source code, but I am still awaiting answers there. I would be a happy man if I could avoid building a device driver, so I am definitively going to try out some of the things you are recommending. :) – Anders Jun 26 '15 at 06:15
  • what does `dmesg` say after you plug in your device under linux? – Marcus Müller Jun 26 '15 at 06:54
-2

DLL are libraries meant for Windows, you cannot use those for compilation on Linux. Wine is a software which help install executable's on Linux, but its also has limitations. Not all software's can be install as these standard libraries provided by windows doesn't exists.

unbesiegbar
  • 471
  • 2
  • 7
  • 19
  • That is wrong. Wine has nothing to do with helping installation. It's a Windows API environment, so you can actually use general purpose programs under Linux that were compiled for windows, but not drivers. – Marcus Müller Jun 25 '15 at 12:43