The C Source, Patches and (shudder!) Bugs
Post Reply
ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Set of new dongles from Parrot database

Post by ncarrier » 02 Nov 2012, 10:24

Hello,
I'm a Parrot employee and I'm working on the integration of the new usb modeswitch data base in our products.
We have added the support for some new devices which we wan't to give back to the ums project.
Please find it as an attachment.
It a git formatted patch from the 20120815 version of usb modeswitch data.
Regards,
Nicolas CARRIER
0001-Parrot-IOP.patch
(15.94 KiB) Downloaded 507 times

ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Re: Set of new dongles from Parrot database

Post by ncarrier » 06 Nov 2012, 11:54

Hello,
I've updated the patch gathering all the devices we have added support to, according to the other topic.

Sorry for the big blob, but I just recently started to maintain usb_modeswitch for our products and I don't have the history of the modifications we made.
But from now, I'll submit change more "atomically".
Attachments
0001-Parrot-IOP.patch
Patch which adds support to all the dongles parrot has added. diff is from 20120815 version of usb_modeswitch-data
(18.32 KiB) Downloaded 491 times

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Set of new dongles from Parrot database

Post by Josh » 08 Nov 2012, 00:23

Thanks again!

Actually, a diff over the config files would be sufficient. I'm recreating the "rules" file automatically anyway (with a script) from these files ...

LOM
Posts: 1397
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Set of new dongles from Parrot database

Post by LOM » 08 Nov 2012, 16:47

There are errors in the patch file, two very obvious are K3770 and K3771 but I have seen a few other questionables, will check them later.

ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Re: Set of new dongles from Parrot database

Post by ncarrier » 09 Nov 2012, 12:22

Hello I'm sorry I can't guaranty the quality of most of the content of this patch because I'm not the author of the corresponding changes.

Concerning K3770 and K3771 dongles the good new is that the do switch well. It seems that there is an error, 2 ums db files are present for each device, one which is right and the other with
source and target ids inverted. Once the erroneous files have been removed, both two dongles switch well and seem to work.

Thanks for spotting the errors, I've integrated the modifications at our side.

Next patches will be from me I''l have no excuse if they are not of top quality :D

LOM
Posts: 1397
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Set of new dongles from Parrot database

Post by LOM » 09 Nov 2012, 16:27

ncarrier wrote:Hello I'm sorry I can't guaranty the quality of most of the content of this patch because I'm not the author of the corresponding changes.
I know, I've been there myself.W e can only try to get it as correct as possible using the info we are provided with.
I have checked thru all of the devices in your patch file and most of them are correct from what I can see.

Here are those few I don't fully agree with:

19d2:0083 is already in the datapack as 19d2_0083_uPr=WCDMA so you have a duplicate.

19d2:0120 ok, but a bit ambigious with all those extra switches, are they really needed?
Josh has missed to include it earlier, see http://www.draisberghof.de/usb_modeswit ... .php?t=545

1fac:0151 why "Configuration=2" ? lsusb of 1fac:0151 says "bNumConfigurations 1"

ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Re: Set of new dongles from Parrot database

Post by ncarrier » 09 Nov 2012, 17:57

19d2:0083 is already in the datapack as 19d2_0083_uPr=WCDMA so you have a duplicate.
I don't understand what I have done here, it seems that it's the version which was in the previous data set (20120120) that we used...
I suspect an error during the merge. I'm gonna test the configuration with the dongle we have.
19d2:0120 ok, but a bit ambigious with all those extra switches, are they really needed?
Josh has missed to include it earlier, see http://www.draisberghof.de/usb_modeswit ... .php?t=545
I think that a dev at parrot has integrated it directly from the forum. As we have the device, I'm gonna double check nothing is wrong with this device and if we can limit the switches.
1fac:0151 why "Configuration=2" ? lsusb of 1fac:0151 says "bNumConfigurations 1"
Unfortunately I don't have the device at parrot France, but I will ask Parrot US if they can check the switch occurs well with these settings.

ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Re: Set of new dongles from Parrot database

Post by ncarrier » 09 Nov 2012, 18:20

The 19d2:0083 ZTE MF110 I could test switches anyway, be it with or without :uPr=WCDMA appended.

Don't know which is the safer version...

The 19d2:0120 switches well, even if the lines :
DetachStorageOnly=0
Interface=0x00
NeedResponse=0
are commented out.

In all cases, I couldn't test until achieving a complete connection to the internet as both two dongles are "carrier-locked".

I'll take care ot the last one next monday.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Set of new dongles from Parrot database

Post by Josh » 10 Nov 2012, 01:04

ncarrier wrote:The 19d2:0083 ZTE MF110 I could test switches anyway, be it with or without :uPr=WCDMA appended.
Here is some background regarding that 'appendix':
https://bugs.launchpad.net/bugs/894448

In short, without the additional attribute check, usb_modeswitch affected a phone's mass storage mode.
ncarrier wrote: The 19d2:0120 switches well, even if the lines :
DetachStorageOnly=0
Interface=0x00
NeedResponse=0
are commented out.
These are the default values anyway.
ncarrier wrote:In all cases, I couldn't test until achieving a complete connection to the internet as both two dongles are "carrier-locked".
In my experience, usb_modeswitch has no influence here (especially with the ZTE family) so I will release anyway.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Set of new dongles from Parrot database

Post by Josh » 10 Nov 2012, 01:45

The "12d1:14d1" version of the K3770 has been in the DB since Nov. 2011, so I suppose this is the correct one. For now, I have removed the new "12d1:14c9" configuration.

LOM
Posts: 1397
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Set of new dongles from Parrot database

Post by LOM » 10 Nov 2012, 05:16

Josh wrote:The "12d1:14d1" version of the K3770 has been in the DB since Nov. 2011, so I suppose this is the correct one. For now, I have removed the new "12d1:14c9" configuration.
12d1:14c9 is the target id, he had them reversed. Same error for K3771.

I think it is better to report new sticks/id's as forum text msgs instead of patches which can screw up the data package if they are applied without checking them.
I for one is also interested in additional info like lsusb of default id and of target id so I can see the interface lists of the stick.
I do often have to google vid:pid and an attached patch file does not generate any hit :(

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Set of new dongles from Parrot database

Post by Josh » 10 Nov 2012, 09:00

LOM wrote:12d1:14c9 is the target id, he had them reversed.
Yes, I realized that. Both devices were in the data package before.
However, even if we had missed that, there would have been no real damage thanks to the interface class check done before handling a device.
LOM wrote:I think it is better to report new sticks/id's as forum text msgs instead of patches which can screw up the data package if they are applied without checking them.
I tend to agree. Of course I did not apply the patch unchecked - I had a look at all files changed by it in a "sand box". The K377x duplicates would have escaped my attention though, so thanks for the heads-up!

ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Re: Set of new dongles from Parrot database

Post by ncarrier » 14 Nov 2012, 12:05

Josh wrote:Thanks again!

Actually, a diff over the config files would be sufficient. I'm recreating the "rules" file automatically anyway (with a script) from these files ...
I didn't notice it at first glance, but...
Couldn't you add the automatic generation step into the usb-modeswitch-data makefile ?

Otherwise, integrators have to maintain a patchset for 40-usb_modeswitch.rules if their list of supported dongles differ, whereas the diff on db file would be sufficient...

Thank you !

Post Reply