Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
asko
Posts: 1
Joined: 26 Dec 2012, 00:11

Nokia CS-17 during power on fedora 17 startup

Post by asko » 26 Dec 2012, 01:00

Hi,

I have problem that with this device there is no modeswitch during restart (421:622 should change to 421:623). That of course means that I (or actually one older +70 person) can not use it for internet connection without extra maneuver...
Modeswitch happens only after I plugout/in device to usb.

With Fedora 16 I had to make some editing for config but that was "normal" device id things which happen often with new devices. Now (FC17) those were already included.

I see other people has same kind of problems but I did not find actual solution for the problem. Has there been any activities ongoing lately with this problem?
Is this udev or modeswitch problem?

I have udev and modeswitch logs with extra data. messages file is so big (170kB) that I don't want to copy it here. Is there some specific data in messages file which could help You?

It looks like devnum is different during power-on and plugin.

Thank You
Asko

Linux xxxxxx 3.6.10-2.fc17.i686.PAE #1 SMP Tue Dec 11 18:27:35 UTC 2012 i686 i686 i386 GNU/Linux
usb_modeswitch.i686 1.2.4-1.fc17 @updates
udev.i686 182-3.fc17 @updates

lsusb as a mass storage(=no modeswitch):

Code: Select all

Bus 001 Device 002: ID 0421:0622 Nokia Mobile Phones 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0421 Nokia Mobile Phones
  idProduct          0x0622 
  bcdDevice            0.01
  iManufacturer           2 Nokia
  iProduct                1 Nokia Datacard
  iSerial                 3 64B47210398B20FC77FC702A5F205221D899677C
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
[
USB_ModeSwitch logs after power on:

Code: Select all

USB_ModeSwitch log from Tue Dec  25 18:36:29 EET 2012

Raw args from udev: /1-2:1.0

Using global config file: /etc/usb_modeswitch.conf
Using top device dir /sys/bus/usb/devices/1-2
----------------
USB values from sysfs:
  manufacturer	Nokia
  product	Nokia Datacard
  serial	64B47210398B20FC77FC702A5F205221D899677C
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/0421:0622
! matched. Reading config data
Using config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
config: TargetVendor set to 0421
config: TargetProduct set to 0623
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 2 -v 0421 -p 0622 -f $configBuffer

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Reading long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.4 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0421
DefaultProduct= 0x0622
TargetVendor=   0x0421
TargetProduct=  0x0623
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Use given bus/device number: 001/002 ...
Looking for default devices ...
 bus/device number matched
  searching devices, found USB ID 0421:0622
   found matching vendor ID
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Nokia
     Product: Nokia Datacard
  Serial No.: 64B47210398B20FC77FC702A5F205221D899677C
-------------------------
Looking for active driver ...
 OK, driver found; name unknown, limitation of libusb1
 OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Bus/dev search active, referring success check to wrapper. Bye.

ok:busdev
--------------------------------
(end of usb_modeswitch output)

Checking success of mode switch for max. 20 seconds ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...
 Reading attributes ...

Target config not matching - current values are
    1-2:1.0/bInterfaceClass:   08
    bConfigurationValue:       1
    bNumConfigurations:        1
    busnum:                    1
    devnum:                    2
    idProduct:                 0622
    idVendor:                  0421
    manufacturer:              Nokia
    product:                   Nokia Datacard
    serial:                    64B47210398B20FC77FC702A5F205221D899677C

Mode switching may have failed. Exiting

USB_ModeSwitch logs after plugin

Code: Select all

USB_ModeSwitch log from Tue Dec  25 18:40:00 EET 2012

Raw args from udev: /1-2:1.0

Using global config file: /etc/usb_modeswitch.conf
Using top device dir /sys/bus/usb/devices/1-2
----------------
USB values from sysfs:
  manufacturer	Nokia
  product	Nokia Datacard
  serial	64B47210398B20FC77FC702A5F205221D899677C
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/0421:0622
! matched. Reading config data
Using config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
config: TargetVendor set to 0421
config: TargetProduct set to 0623
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 3 -v 0421 -p 0622 -f $configBuffer

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Reading long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.4 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0421
DefaultProduct= 0x0622
TargetVendor=   0x0421
TargetProduct=  0x0623
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Use given bus/device number: 001/003 ...
Looking for default devices ...
 bus/device number matched
  searching devices, found USB ID 0421:0622
   found matching vendor ID
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Nokia
     Product: Nokia Datacard
  Serial No.: 64B47210398B20FC77FC702A5F205221D899677C
-------------------------
Looking for active driver ...
 OK, driver found; name unknown, limitation of libusb1
 OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Bus/dev search active, referring success check to wrapper. Bye.

ok:busdev
--------------------------------
(end of usb_modeswitch output)

Checking success of mode switch for max. 20 seconds ...
 Reading attributes ...
 Waiting for device file system (2 sec.) ...
 Waiting for device file system (3 sec.) ...
 Waiting for device file system (4 sec.) ...
 Waiting for device file system (5 sec.) ...
 Waiting for device file system (6 sec.) ...
 Reading attributes ...
 All attributes matched
Mode switching was successful, found 0421:0623 (Nokia: Nokia Datacard)
 No vendor-specific class found, skip driver checking
Checking for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exiting


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

Re: Nokia CS-17 during power on fedora 17 startup

Post by Josh » 30 Dec 2012, 00:57

Hmm, for a long time I had no report about problems during boot-up ...

Anyway, I suspect there are timing issues involved. I suggest copying your device config file (name: "0421:0622") from "/usb/share/usb-modeswitch" to "/etc/usb_modeswitch.d" and adding the "WaitBefore" parameter.

This will delay the action of usb_modeswitch for X seconds. Example:

Code: Select all

WaitBefore=5

Post Reply