Author Message

<  Everything Coding  ~  Problems with multiple devices connected.

PostPosted: Wed Dec 15, 2010 10:48 am Reply with quote
Posts: 1 Joined: Wed Dec 15, 2010 10:37 am
Hi,

I'm using modeswitch with two USB MIMO Monzter monitors (v: 0x17e9 p: 0x0288). The usb-modeswitch is able to switch only one device, since the vendor-, product ID and the device class remains the same after switching device.

Here is a workaround for usb_modeswitch.c to allow the selection of the device to switch:

Code:
87c87
< char NeedResponse=0, NoDriverLoading=0, InquireDevice=1, sysmode=0;
---
> char NeedResponse=0, NoDriverLoading=0, InquireDevice=1, sysmode=0, num=0;
253c253
<       c = getopt_long (argc, argv, "heWQDndHSOGTRIv:p:V:P:C:m:M:2:3:w:r:c:i:u:a:s:",
---
>       c = getopt_long (argc, argv, "heWQDndHSOGTRIv:p:V:P:C:m:M:2:3:w:r:c:i:u:a:s:N:",
285a286
>          case 'N': num = strtol(optarg, NULL, 10);  break;
1275c1276,1278
<                   right_dev = dev;
---
>                   if((*numFound)==num+1)
>                      right_dev = dev;
>
1285a1289
>                   printf("Device class %02x\n",devClass);
1537a1542
>    printf (" -N                            Number of device to switch\n");


Sample usage:

Code:
# usb_modeswitch -v 0x17e9 -p 0x0288 -u 1 -N 0
# usb_modeswitch -v 0x17e9 -p 0x0288 -u 1 -N 1


Offline
PostPosted: Thu Dec 16, 2010 10:32 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
Thanks for the quick fix!

I'm planning to incorporate a check for the current configuration which will hopefully work in the same way as the TargetClass check (something like "TargetConfiguration"). This should then work for any number of devices.

Can you tell me more about these USB monitors? What is their initial configuration?
I see you are setting them to configuration 1 ...



Offline
PostPosted: Sat Dec 18, 2010 3:08 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
I have completed a new package which includes the check for the current device config setting.

Can you try the test version?
http://www.draisberghof.de/usb_modeswit ... c3.tar.bz2

It will only accept devices for treating that have not set the desired configuration. So it should work for multiple devices.



Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
3 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum