| From | Sent On | Attachments |
|---|---|---|
| David Gilbert | Apr 8, 2005 9:40 am | |
| Maksim Yevmenkin | Apr 8, 2005 9:48 am | |
| David Gilbert | Apr 8, 2005 9:56 am | |
| Maksim Yevmenkin | Apr 8, 2005 10:10 am | |
| David Gilbert | Apr 8, 2005 10:16 am | |
| Bernd Walter | Apr 8, 2005 12:05 pm | |
| David Gilbert | Apr 8, 2005 3:12 pm | |
| Maksim Yevmenkin | Apr 8, 2005 3:33 pm | |
| Bernd Walter | Apr 8, 2005 4:12 pm | |
| Bernd Walter | Apr 8, 2005 4:33 pm | |
| Maksim Yevmenkin | Apr 8, 2005 4:47 pm | |
| Bernd Walter | Apr 8, 2005 5:31 pm | |
| Julian Elischer | Apr 8, 2005 6:06 pm | |
| Bernd Walter | Apr 8, 2005 9:02 pm | |
| David Gilbert | Apr 9, 2005 2:05 pm | |
| Bernd Walter | Apr 9, 2005 2:24 pm | |
| David Gilbert | Apr 9, 2005 2:48 pm | |
| Bernd Walter | Apr 9, 2005 2:57 pm | |
| David Gilbert | Apr 9, 2005 7:39 pm |
| Subject: | Tricky USB device. | |
|---|---|---|
| From: | Maksim Yevmenkin (maks...@savvis.net) | |
| Date: | Apr 8, 2005 3:33:14 pm | |
| List: | org.freebsd.freebsd-hackers | |
David,
Bernd> Then it really shouldn't have claimed to be one in the Bernd> interface descriptor :( But the HID specification is more today Bernd> than just _human_ interface. e.g. there are extensions for Bernd> USV, ...
[...]
Bernd> Has this device multiple interfaces? e.g. one HID and another Bernd> as described. I often thought about getting ugen working at Bernd> interface level too.
Here's the output of udesc_dump on it. Right now, using the current version of libusb (not the version from ports), I can use usb_interrupt_write(dev, 1, "MK255", 5, 0) to send data to it --- and the data is sent --- at least lights on the USB hub flash. If I replace '1' with anything else, it doesn't accept it. However, it doesn't seem to have opened the relays.
hmm... why even use libusb? cant you just "fd = open("/dev/ugen0.1", O_RDWR);" and then "write(fd, "MK255", 5)" and "read(fd, ...);". note: here i assume ugen0 is the device.
I'm also not entirely clear how/when to use usb_interrupt_read() ... as many of the commands listed in the manual return data, but usb_inerrupt_write() doesn't seem to allow for data to be returned, but following usb_interrupt_write(), the read will hang.
i'd guess you have to keep read pipe open at all times. that is what "fd = open("/dev/ugen0.1", O_RDWR);" will do - it will open both read and write pipes (because of O_RDWR).
then you just
write(fd, ...); read(fd, ...);
max





