Hi, First of all, sorry for my bad English. I have a USB device which doesn' t have a driver in linux, I wrote it as kernel module, but because I want to run windows software under wine which uses this device it seems that I will need to write something like proxy in wine (like audio and video drivers are written) to enable my software to use this device. Right now I am planning to rewite this driver using libusb and implement everything in wine's proxy.
Maybe somebody have some dummy driver for purposes like this or I sould just take audio or some other driver and use it as starting point, maybe you have some useful suggestions to give me before I start?
On Mon, Nov 14, 2005 at 12:58:12PM +0200, Maris Paupe wrote:
Hi, First of all, sorry for my bad English. I have a USB device which doesn' t have a driver in linux, I wrote it as kernel module, but because I want to run windows software under wine which uses this device it seems that I will need to write something like proxy in wine (like audio and video drivers are written) to enable my software to use this device. Right now I am planning to rewite this driver using libusb and implement everything in wine's proxy.
Maybe somebody have some dummy driver for purposes like this or I sould just take audio or some other driver and use it as starting point, maybe you have some useful suggestions to give me before I start?
It is a nice idea :)
We have some work going on on hooking new devices (openable by CreateFiule() from the make-safedisc-work crowd).
It is not yet finished, but you likely can hook yourself in.
I guess you only need to provide USBD.SYS <-> libusb functionality.
You could also write a driver using "libusb" as native ...
Ciao, Marcus
"Marcus" == Marcus Meissner meissner@suse.de writes:
...
Marcus> We have some work going on on hooking new devices (openable by Marcus> CreateFile() from the make-safedisc-work crowd).
Are these patches available somewhere?
Monday, November 14, 2005, 1:23:54 PM, Uwe Bonnes wrote:
"Marcus" == Marcus Meissner meissner@suse.de writes:
... Marcus> We have some work going on on hooking new devices (openable by Marcus> CreateFile() from the make-safedisc-work crowd).
Are these patches available somewhere?
Not really. We don't maintain it as patches to cvs. If someone is interested I can make a patch against cvs. Only it's a work in progress and some things are not working properly the way they should.
Vitaliy
* On Mon, 14 Nov 2005, Vitaliy Margolen wrote:
*Monday, November 14, 2005, 1:23:54 PM, Uwe Bonnes wrote:
> "Marcus" == Marcus Meissner meissner@suse.de writes:
Marcus> We have some work going on on hooking new devices (openable by Marcus> CreateFile() from the make-safedisc-work crowd).
Are these patches available somewhere?
Not really. We don't maintain it as patches to cvs. If someone is interested I can make a patch against cvs. Only it's a work in progress and some things are not working properly the way they should.
I'd appreciate that a lot. Thanks. If you in addition would describe non-working functionality by some sentences, I shall return Thanks *= 3; :-]
Monday, November 21, 2005, 3:45:24 AM, Saulius Krasuckas wrote:
Are these patches available somewhere?
Not really. We don't maintain it as patches to cvs. If someone is interested I can make a patch against cvs. Only it's a work in progress and some things are not working properly the way they should.
I'd appreciate that a lot. Thanks. If you in addition would describe non-working functionality by some sentences, I shall return Thanks *= 3; :-]
As soon as I put it back together. Latest server patches created number of conflicts with my old code. And there is more to come. <g>
Vitaliy
* On Mon, 14 Nov 2005, Maris Paupe wrote:
I have a USB device which doesn' t have a driver in linux, I wrote it as kernel module, but because I want to run windows software under wine which uses this device it seems that I will need to write something like proxy in wine (like audio and video drivers are written) to enable my software to use this device.
Forgive me my interest: what type of data does this USB exchande with a PC? What are real functions of this device?
Right now I am planning to rewite this driver using libusb and implement everything in wine's proxy.
I understand the proxy-part, but how using libusb would help you? Maybe you are afraid of your LKM will never getting into public kernel tree?
Maybe somebody have some dummy driver for purposes like this or I sould just take audio or some other driver and use it as starting point, maybe you have some useful suggestions to give me before I start?
Don't wanna be narcistic, but if you read "Interests about Wine" part on the Wiki page about me (sorry) [*], you may find some messages in the maillist archive from enthuasiasts, who probably already have started some work. :-P
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Mon, 14 Nov 2005, Maris Paupe wrote:
I have a USB device which doesn' t have a driver
in linux, I wrote it as
kernel module, but because I want to run windows
software under wine
which uses this device it seems that I will need
to write something like
proxy in wine (like audio and video drivers are
written) to enable my
software to use this device.
I also have a USB scanner that doesn't work under Linux, and my solution involved a kernel module that does what USBSCAN.SYS does in Windows. Look for mails about a month back with STI and USB in the topics.
Forgive me my interest: what type of data does this USB exchande with a PC?
What are real functions of this device?
Right now I am planning to rewite this driver
using libusb and implement
everything in wine's proxy.
I understand the proxy-part, but how using libusb would help you? Maybe you are afraid of your LKM will never getting into public kernel tree?
What is this "proxy"?
Last time I checked it was practically impossible to use libusb from within wine; wine's implementation of ReadFile(), WriteFile() and DeviceIoControl() work with UNIX fd's only, and libusb wants its own handles. I had to make wine's fd, my kernel module's device file.
Maybe somebody have some dummy driver for purposes
like this or I sould
just take audio or some other driver and use it as
starting point, maybe
you have some useful suggestions to give me before
I start?
Do you want any of my work? It includes minor changes to dlls/kernel/file.c and dlls/ntdll/file.c, the kernel module, and some work on the STI(ll image) system.
Don't wanna be narcistic, but if you read "Interests about Wine" part on the Wiki page about me (sorry) [*], you may find some messages in the maillist archive from enthuasiasts, who probably already have started some work. :-P
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
* On Thu, 17 Nov 2005, Damjan Jovanovic wrote:
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Mon, 14 Nov 2005, Maris Paupe wrote:
I have a USB device which doesn' t have a driver in linux, I wrote it as kernel module,
I also have a USB scanner that doesn't work under Linux, and my solution involved a kernel module that does what USBSCAN.SYS does in Windows. Look for mails about a month back with STI and USB in the topics.
Hehe, Damjan, you are mentioned on my wiki page too. :-P BTW, won't start editing page about your own interests about Wine on the Wiki too?
Right now I am planning to rewite this driver using libusb and implement everything in wine's proxy.
What is this "proxy"?
I think Maris will explain.
Last time I checked it was practically impossible to use libusb from within wine; wine's implementation of ReadFile(), WriteFile() and DeviceIoControl() work with UNIX fd's only, and libusb wants its own handles. I had to make wine's fd, my kernel module's device file.
Wait, but there are DLLs (mscms, winsock) in wine which uses direct calls to unix libs. Can't you do the same with libusb in your some wine module?
Maybe some code must be put into wineserver, but still I don't see reasons to not use libusb directly. You just have to find a right place in Wine tree for it. No?
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Thu, 17 Nov 2005, Damjan Jovanovic wrote:
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Mon, 14 Nov 2005, Maris Paupe wrote:
I have a USB device which doesn' t have a
driver
in linux, I wrote it as kernel module,
I also have a USB scanner that doesn't work under Linux, and my solution involved a kernel module
that
does what USBSCAN.SYS does in Windows. Look for
mails
about a month back with STI and USB in the topics.
Hehe, Damjan, you are mentioned on my wiki page too. :-P
Didn't think I was that famous :-)
BTW, won't start editing page about your own interests about Wine on the Wiki too?
I think I will.
Right now I am planning to rewite this driver using libusb and implement everything in
wine's
proxy.
What is this "proxy"?
I think Maris will explain.
Last time I checked it was practically impossible
to
use libusb from within wine; wine's implementation
of
ReadFile(), WriteFile() and DeviceIoControl() work with UNIX fd's only, and libusb wants its own
handles.
I had to make wine's fd, my kernel module's device file.
Wait, but there are DLLs (mscms, winsock) in wine which uses direct calls to unix libs. Can't you do the same with libusb in your some wine module?
winsock uses ints, not HANDLEs, so it avoids the problem entirely. I'll check out mscms.
With HANDLEs, a kernel module fits in naturally, because when NtReadFile() does read(), the kernel module gets its read function called, etc. It fits in easily into the wine architecture. libusb is a better solution (it works on several OSes, including Windows itself, check out libusb-win32.sourceforge.net :-), but I have yet to see a way to integrate it into wine cleanly.
Maybe some code must be put into wineserver, but still I don't see reasons to not use libusb directly. You just have to find a right place in Wine tree for it. No?
I asked about this a while back, and I was told that typed handles, and implementation of ReadFile(), WriteFile() etc. with function pointers specific to each handle, were done once and taken out of wine. It seems to me nobody wants them back?
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com