1
--------------070507070300030101020103
2
Content-Type: text/plain; charset=us-ascii; format=flowed
3
Content-Transfer-Encoding: 7bit
5
I've successfully used the driver found in main PDK archive
6
(owpd300b2.zip) under generic library using usblnk.c and usbses.lnk.
7
This driver in turn uses libusb library found on the internet.
9
I've found libusb v0.1.7, which contained a small bug in linux.c file.
10
The fixed routine is below.
12
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
15
struct usb_bulktransfer bulk;
16
int ret, retrieved = 0, requested;
18
/* Ensure the endpoint address is correct */
19
ep |= USB_ENDPOINT_IN;
23
requested = size - retrieved;
24
if (requested > MAX_READ_WRITE)
25
requested = MAX_READ_WRITE;
27
bulk.timeout = timeout;
28
bulk.data = (unsigned char *)bytes + retrieved;
30
ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk);
32
USB_ERROR_STR(ret, "error reading from bulk endpoint 0x%x: %s",
36
} while (ret > 0 && retrieved < size); /* Yefim: && ret == requested */
47
>On Wed, Jul 23, 2003 at 05:57:50AM -0400, Paul Alfille wrote:
50
>>Has anyone written a driver for the DS9490 USB master for Linux?
52
>>I will try if it hasn't been done, but it's not my area of expertise.
57
>Not yet (to my knowledge), although I am trying to make the time to get
58
>started on the project.
65
--------------070507070300030101020103
66
Content-Type: text/html; charset=us-ascii
67
Content-Transfer-Encoding: 7bit
69
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
74
I've successfully used the driver found in main PDK archive (owpd300b2.zip)
75
under generic library using usblnk.c and usbses.lnk. This driver in turn
76
uses libusb library found on the internet.
80
I've found libusb v0.1.7, which contained a small bug in linux.c file. The
81
fixed routine is below.
85
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
91
struct usb_bulktransfer bulk;
93
int ret, retrieved = 0, requested;
97
/* Ensure the endpoint address is correct */
99
ep |= USB_ENDPOINT_IN;
107
requested = size - retrieved;
109
if (requested > MAX_READ_WRITE)
111
requested = MAX_READ_WRITE;
113
bulk.len = requested;
115
bulk.timeout = timeout;
117
bulk.data = (unsigned char *)bytes + retrieved;
121
ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk);
125
USB_ERROR_STR(ret, "error reading from bulk endpoint 0x%x: %s",
127
ep, strerror(errno));
133
} while (ret > 0 && retrieved < size); /* Yefim: &&
154
>On Wed, Jul 23, 2003 at 05:57:50AM -0400, Paul Alfille wrote:
157
>>Has anyone written a driver for the DS9490 USB master for Linux?
159
>>I will try if it hasn't been done, but it's not my area of expertise.
164
>Not yet (to my knowledge), although I am trying to make the time to get
165
>started on the project.