Halleluja
faking USB_GET_DEVICE_DATA unique: 110, bytes: 276, options: 0 Vendor: 3fd Calling setinterface num=0, alternate=0. DeviceAttach: received and accepted attach for: vendor id 0x3fd, product id 0x8, device handle 0x8215178 Cable PID = 0008. Max current requested during enumeration is 280 mA. in USB_TRANSFER unique: 110, pipe: 0, read: 1, options: 0, size: 1, timeout: bb8 setup packet: c0 b0 20 00 00 00 01 00 Transferred: 0 (read) Loopback test failed. Sent character = 00, Received character = 1A. Cable connection failed.
This commit is contained in:
parent
ca18111bc1
commit
d067696441
17
usb-driver.c
17
usb-driver.c
@ -225,7 +225,6 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
return (*ioctl_func) (fd, request, wdioctl);
|
return (*ioctl_func) (fd, request, wdioctl);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,"PID %d: ",getpid());
|
|
||||||
switch(request) {
|
switch(request) {
|
||||||
case VERSION:
|
case VERSION:
|
||||||
version = (struct version_struct*)(wdheader->data);
|
version = (struct version_struct*)(wdheader->data);
|
||||||
@ -280,7 +279,6 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
{
|
{
|
||||||
struct interrupt *it = (struct interrupt*)(wdheader->data);
|
struct interrupt *it = (struct interrupt*)(wdheader->data);
|
||||||
|
|
||||||
hexdump(wdheader->data, wdheader->size);
|
|
||||||
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
|
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
|
||||||
|
|
||||||
it->fEnableOk = 1;
|
it->fEnableOk = 1;
|
||||||
@ -317,12 +315,18 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
ret = (*ioctl_func) (fd, request, wdioctl);
|
ret = (*ioctl_func) (fd, request, wdioctl);
|
||||||
#else
|
#else
|
||||||
if (usbdevice) {
|
if (usbdevice) {
|
||||||
int iface;
|
|
||||||
|
|
||||||
if (!usb_devhandle)
|
if (!usb_devhandle)
|
||||||
usb_devhandle = usb_open(usbdevice);
|
usb_devhandle = usb_open(usbdevice);
|
||||||
//MGMG
|
|
||||||
ret = usb_claim_interface(usb_devhandle, iface);
|
/* FIXME: Select right interface! */
|
||||||
|
ret = usb_claim_interface(usb_devhandle, usbdevice->config[0].interface[usi->dwInterfaceNum].altsetting[usi->dwAlternateSetting].bInterfaceNumber);
|
||||||
|
if (!ret) {
|
||||||
|
ret = usb_set_altinterface(usb_devhandle, usi->dwAlternateSetting);
|
||||||
|
if (ret)
|
||||||
|
fprintf(stderr, "usb_set_altinterface: %d\n", ret);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "usb_claim_interface: %d -> %d (%s)\n", usbdevice->config[0].interface[usi->dwInterfaceNum].altsetting[usi->dwAlternateSetting].bInterfaceNumber, ret, usb_strerror());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,"unique: %lu, interfacenum: %lu, alternatesetting: %lu, options: %lx\n", usi->dwUniqueID, usi->dwInterfaceNum, usi->dwAlternateSetting, usi->dwOptions);
|
fprintf(stderr,"unique: %lu, interfacenum: %lu, alternatesetting: %lu, options: %lx\n", usi->dwUniqueID, usi->dwInterfaceNum, usi->dwAlternateSetting, usi->dwOptions);
|
||||||
@ -429,7 +433,6 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
{
|
{
|
||||||
struct interrupt *it = (struct interrupt*)(wdheader->data);
|
struct interrupt *it = (struct interrupt*)(wdheader->data);
|
||||||
|
|
||||||
hexdump(wdheader->data, wdheader->size);
|
|
||||||
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
|
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
|
||||||
|
|
||||||
#ifndef NO_WINDRVR
|
#ifndef NO_WINDRVR
|
||||||
|
Reference in New Issue
Block a user