usb_modeswitch fails with "Essential attributes are missing"

Bug #935230 reported by Emanuele Sottocorno on 2012-02-18
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
usb-modeswitch (Ubuntu)
Undecided
Mathieu Trudel-Lapierre

Bug Description

After switching succeded usb_modeswitch try reading attributes until timeout (20 secs), then exit with error "Target config not matching".
Log attached.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: usb-modeswitch 1.2.3+repack0-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-16.25-generic 3.2.6
Uname: Linux 3.2.0-16-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Sat Feb 18 14:55:23 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120217)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: usb-modeswitch
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.usb.modeswitch.conf: 2012-02-18T10:31:29.814027

Emanuele Sottocorno (sotema) wrote :

Dah! There's indeed a bug here, I must have got confused while porting those last changes:

                if (usb[idProduct]->value != NULL || usb[idVendor]->value != NULL) {
                        modeswitch_log(" Essential attributes are missing, continue wait ...\n");
                        continue;
                }

^^ is obviously wrong. I'll fix this ASAP.

Changed in usb-modeswitch (Ubuntu):
status: New → In Progress
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)

Emanuele: I've just uploaded packages that fix this on my PPA; please see if this properly solves the issue and doesn't introduce further problems.

https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261180
https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261181

The packages are waiting to be built for now but should be ready in a few minutes.

On 03/05/2012 04:12 PM, Mathieu Trudel-Lapierre wrote:
> Emanuele: I've just uploaded packages that fix this on my PPA; please
> see if this properly solves the issue and doesn't introduce further
> problems.
>
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261180
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261181
>
> The packages are waiting to be built for now but should be ready in a
> few minutes.
>
Installed the .deb and rebooted.
Something changed but still no switching. the error now is:
"Target config not matching" log attached

Good. In the same location, I've put another update of the same package. This one won't fix the bug, but adds some debugging information which will allow me to fix it.

https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261566
https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261567

If you could try again with the updated package I would be very grateful.

Emanuele Sottocorno (sotema) wrote :

On 03/05/2012 06:42 PM, Mathieu Trudel-Lapierre wrote:
> Good. In the same location, I've put another update of the same package.
> This one won't fix the bug, but adds some debugging information which
> will allow me to fix it.
>
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261566
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261567
>
> If you could try again with the updated package I would be very
> grateful.
>
I'm proud to partecipate.
Here the new log.

Emanuele Sottocorno (sotema) wrote :

On 03/05/2012 10:13 PM, Mathieu Trudel-Lapierre wrote:
> Now this version hopefully actually fixes the bug properly :)
>
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261905
> https://launchpad.net/~mathieu-tl/+archive/ppa/+build/3261906
>
Sorry Mathieu, the bug is still present, with a different error.
New log again.
Thanks for helping.

Emanuele Sottocorno (sotema) wrote :

Hi Mathieu,

after your last ppa version i was feeling something strange. So i tried today with a different device, K4510, from Vodafone/Huawei.
Few seconds after it was plugged in the Unlock password request showed up and the device unlocked correctly. I was able to surf the net. The only minimal problem (i relly don't consider it is a problem) is that the device isn't automatically unlocked, even i set the flag to do it.
I saved the usb log from this device and, surprise, i got the identical error:
 idVendor doesn't match the expected value. ('12d1' != '12d1')
   Target config not matching - current values are:
 idVendor: 12d1
 idProduct: 14cb
 manufacturer: Vodafone Group (Huawei)
 product: Vodafone Mobile Broadband (Huawei)
 serial:
 bNumConfigurations: 1
Mode switching may have failed. Exiting
Into attached syslogs you can see that the k4605 is not connected to any tty.
Hope this can help.

Well, the error is really pretty much just cosmetic; the modeswitch does get done so the devices should be available regardless -- the fix is just to make sure the switching is properly listed as completed and successful.

There's a new revision of the package on my ppa; https://launchpad.net/~mathieu-tl/+archive/ppa/+sourcepub/2289618/+listing-archive-extra. By now I do think I've got all these annoying little mistakes ironed out.

Emanuele Sottocorno (sotema) wrote :

On 03/06/2012 05:37 PM, Mathieu Trudel-Lapierre wrote:
> Well, the error is really pretty much just cosmetic; the modeswitch does
> get done so the devices should be available regardless -- the fix is
> just to make sure the switching is properly listed as completed and
> successful.
>
> There's a new revision of the package on my ppa; https://launchpad.net
> /~mathieu-tl/+archive/ppa/+sourcepub/2289618/+listing-archive-extra. By
> now I do think I've got all these annoying little mistakes ironed out.
>
Tanks for time you are spending for this.
I can't test it this evening, I will update the thread tomorrow morning.

Emanuele Sottocorno (sotema) wrote :

On 03/06/2012 05:37 PM, Mathieu Trudel-Lapierre wrote:
> Well, the error is really pretty much just cosmetic; the modeswitch does
> get done so the devices should be available regardless -- the fix is
> just to make sure the switching is properly listed as completed and
> successful.
>
> There's a new revision of the package on my ppa; https://launchpad.net
> /~mathieu-tl/+archive/ppa/+sourcepub/2289618/+listing-archive-extra. By
> now I do think I've got all these annoying little mistakes ironed out.
>
Mathieu,
with the new version i got more indicative error:
Device not in "bind_list" yet, bind it now
  modprobe not foundModule loader is (null)
Can't do anymore without module loader; get "modtools"!
  driver binding failed

the full log is attached.

Were you calling this manually?

usb-modeswitch-dispatcher relies on PATH being set to point to at least /sbin; or wherever modprobe and others reside. Normally that path should be set properly when running via udev.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-modeswitch - 1.2.3+repack0-1ubuntu2

---------------
usb-modeswitch (1.2.3+repack0-1ubuntu2) precise; urgency=low

  * debian/patches/dispatcher-c-rewrite.patch: fix check_success() checks for
    the presence of vendor and product IDs to allow modeswitch to correctly
    be reported as successful when a verification is required. (LP: #935230)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 07 Mar 2012 10:48:42 -0500

Changed in usb-modeswitch (Ubuntu):
status: In Progress → Fix Released
Nguyen Anh Minh (minhna) wrote :

I'm using Xubuntu 12.04 (amd64) and I have this problem. It works before I upgrade to this version (from 11.10).
I got the same problem of Emanuele Sottocorno (sotema) on post #12

I attached the log. Please help.

Nguyen Anh Minh (minhna) wrote :

I found the way to fix that problem. After plug the modem in, run this command
 sudo modprobe usbserial vendor=0x12d1 product=0x14a8

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers