Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Cmotech CHU-629S HSUPA

Post by afterain00 » 20 Nov 2009, 16:34

I've got a new modem, C-motech CHU-629S (HSUPA modem).
The previous modem I have used was C-motech CHU-628S(HSDPA, vid=0x16d8, pid=0x6281, EP=0x09) and it was successful to switch the old device to the modem with CGU-628 (the same vendor) in your usb_modeswitch.conf file.
(Thank you...)
But I cannot switch the new device to modem on ubuntu 8.04.

In windows(sniffusb), the new modem is recognized as USB composite device and data modem monitoring port at first, and then in a few seconds more devices are recognized as modem driver, USB mass storage, network adapter, etc. Anyway I installed the filter on the USB composite device. The log file is here.

Most of the MessageContents were tried, but it failed.
The messages were transferred successfully, but the mode were not changed.
I cannot find which one is the right message content.

I would appreciate if you help me.

additional information for CHU-629S
dmesg when plugged

Code: Select all

[ 4220.071021] usb 4-1: new high speed USB device using ehci_hcd and address 10
[ 4220.224098] usb 4-1: configuration #1 chosen from 1 choice
[ 4220.250702] scsi11 : SCSI emulation for USB Mass Storage devices
[ 4220.251957] usb-storage: device found at 10
[ 4220.251963] usb-storage: waiting for device to settle before scanning
[ 4225.240438] usb-storage: device scan complete
[ 4225.241607] scsi 11:0:0:0: CD-ROM            CMOTECH  Mass Storage      2.3 PQ: 0 ANSI: 2
[ 4225.244753] sr1: scsi-1 drive
[ 4225.244873] sr 11:0:0:0: Attached scsi CD-ROM sr1
[ 4225.244949] sr 11:0:0:0: Attached scsi generic sg2 type 5
lsusb -v for 16d8:700a

Code: Select all

Bus 004 Device 010: ID 16d8:700a  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x16d8 
  idProduct          0x700a 
  bcdDevice            0.00
  iManufacturer           3 CMOTECH CO., LTD.
  iProduct                2 CMOTECH CDMA Technologies
  iSerial                 4 1234567890ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          1 CMOTECH Configuration
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    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)

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

Post by Josh » 21 Nov 2009, 01:08

Your log starts when it should end: the message IRP_MN_SURPRISE_REMOVAL is usually a sign for the device switch, so this must have happened already.

Try to install the log filter only on the original storage device. It may not be "present" if the driver is installed but you can see it if the "List devices not present" switch is on.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 21 Nov 2009, 04:43

Thank you for your review.

I'll also post a log for usb storage as soon as I come back to the office.

I think the "removal" message you said may come because I unplugged and replugged the modem at the starting point of logging.
I tried to find the keyword "removal" in the logfiles but I could not.

Another strange thing is as follows.
I think the endpoint must be 0x01 before switching (lsusb shows only endpoint out 0x01). I tried other endpoint, but error message showed. In the logfiles (both USB multiple device and USB mass storage) the endpont 0x01 appeared in a few steps then disappeared (actually 0x03 appeared).
Sometimes [endpoint0x000000??] do not appeared in the sniffusb logfile.

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

Post by Josh » 21 Nov 2009, 09:27

afterain00 wrote:I think the "removal" message you said may come because I unplugged and replugged the modem at the starting point of logging.
I don't think so, because the communication goes right on afterwards (see the millisecond values). Or you sniffed on a completely wrong device ...
afterain00 wrote:I tried to find the keyword "removal" in the logfiles but I could not.
Line 14, at "90018205 ms". And again on line 299.
afterain00 wrote:Sometimes [endpoint0x000000??] do not appeared in the sniffusb logfile.
First of all, let's make sure you catch the right traffic in Windows. For a report of a sniffing session you might be interested in
this thread.

And I recommend cleaning the log before plugging. If you got the right device, the log should start growing from the plugging and stop growing after the switch has been done.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 21 Nov 2009, 16:22

According to your recommendation, I carefully collected the log files of all devices related to CHU-628S.

Please download the log files.

As I mentioned my previous posting, there are 6 devices related to the modem. At the first, USB Composite device and diagnostic monitoring port are generated. In a few seconds service port, USB mass storage device, modem driver and network adapter are recognized.

* Log file for service port is not generated.
* Log files for USB composite device and mass storage keep growing.
* The product id is the same between mode change. (0x700a)
* When I tested with some message content, the results of your usb_modeswitch seems to be good, "usb-srorage detached" and no error during sending the message. But no effect in mode change.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 21 Nov 2009, 17:31

When I read your post about log file before installation of driver, I think it will also helpful for this new modem.

During the installation, only one device, USB mass storage were detected, and in the middle of installation it shows the message saying ".... changing the mode..." In a few seconds the device was gone and new devices (6 devices) were detected with the same id.

I captured the log during mode change.
In this file I can find the endpoint 0x000001 and some suspicious message content.
Please review this file also.
Log file of mode change during driver installation...

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

Post by Josh » 21 Nov 2009, 22:39

afterain00 wrote:During the installation, only one device, USB mass storage were detected, and in the middle of installation it shows the message saying ".... changing the mode..."
Yes, I think that's the one we're looking for. And this is the device that goes away after a while, right?

Anyway, as you say, there are some suspicious transfers. I like this one:

Code: Select all

00000000: 55 53 42 43 e0 59 ea 88 24 00 00 00 80 00 0d fe
00000010: 52 44 45 56 43 48 47 3d 4e 44 49 53 00 00 00
If you translate the hex numbers after FE into ASCII letters, the result is: "RDEVCHG=NDIS". Now that is a hint ...

I suggest you use this as MessageContent for a first try:
"55534243123456782400000080000dfe524445564348473d4e444953000000"

And don't care about the endpoint. Let the program determine which one to take.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 22 Nov 2009, 13:35

Yes, it works! Thank you.
But it doesn't seem to be perfect. In lsusb results, there are some "unrecognized" messages.
ttyUSB0, ttyUSB1, ttyUSB2 and ttyUSB3 are generated and only /dev/ttyUSB2 can be operated as a modem.

When I used CHU-628S modem, /dev/ttyUSB0 was a modem and /dev/ttyUSB3 can be also available to send AT command using the screen command during 3G connection. So I can monitor the modem and also send SMS.
But with this new modem, the others do not respond to AT command in screen command.

1. Could you give me more information on the above matter...
In Windows, it's possible to using SMS during 3G connection.
Actually I need the extra port for SMS to control the ubuntu box with SMS.
I am configuring the ubuntu 8.04 server (kernel 2.6.24-25-server) as a 3G router according to Ziesemer's method.

2. To automate the execution of usb_modeswitch, I added 80-usb_modeswith.rules in /etc/udev/rules.d/ according to Ziesemer's method, but it did not work.
So I added the followings in the end of /etc/rc.local:

/etc/rc.local
....
/usr/sbin/usb_modeswitch
modprobe option
echo "0x16d8 0x700a" > /sys/bus/usb-serial/drivers/option1/new_id
/etc/init.d/networking restart # to reexecute ppp connection
exit 0

Please give some comments on automation.

3. Differences between versions
At the beginning I installed usb_modeswitch using "sudo aptitude install usb-modeswitch" according to this method. The installed version was 0.9.6 (not the latest version) and the endpoint should be specified in conf file.

3-1. usb_modeswitch0.9.6 + old modem (CHU-628S) + rc.local: OK. 3G connection successful in both cold boot and warm boot(reboot)

3-2. USB_modeswitch0.9.6 + new modem (CHU-629S) + rc.local: only usb_modeswitch successful during cold boot, so "/etc/init.d/networking restart" should be executed again. During reboot it's OK.

3-3. usb_modeswitch1.0.5 + old modem (CHU-628S) + rc.local: The login prompt does not appear. So I should log on to tty2. When I executed it again, usb_modeswitch stops after displaying the following messages.

OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

Sometimes usb_modeswitch shows sending OK message, but there are no ttyUSBs.

3-4. usb_modeswitch1.0.5 + new modem (CHU-629S) + rc.local: only usb_modeswitch successful during cold boot, so "/etc/init.d/networking restart" should be executed again. During reboot it's OK.(the same with 3-2)

Messages from usb_modeswitch of CHU-629S

Code: Select all

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found default devices (1)
Accessing device 011 on bus 004 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
  Vendor String: CMOTECH 
   Model String: Mass Storage    
Revision String:  2.3
-------------------------

Device description data (identification)
-------------------------
Manufacturer: CMOTECH CO., LTD.
     Product: CMOTECH CDMA Technologies
  Serial No.: 1234567890ABCDEF
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
 OK, message successfully sent
 Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
lsusb -v -d 0x16d8:0x700a

Code: Select all

Bus 004 Device 012: ID 16d8:700a  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x16d8 
  idProduct          0x700a 
  bcdDevice            0.00
  iManufacturer           2 CMOTECH CO., LTD.
  iProduct                1 CMOTECH CDMA Technologies
  iSerial                 3 1234567890ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          188
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          5 CMOTECH Configuration
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              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              32
      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              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 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     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  0d 24 0f 01 00 00 00 00 00 40 01 00 00
      ** UNRECOGNIZED:  05 24 06 04 04
      ** UNRECOGNIZED:  15 24 12 20 01 98 b0 6a 49 b0 9e 48 96 94 46 d9 9a 28 ca 4e 5d
      ** UNRECOGNIZED:  06 24 13 00 01 04
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
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)
dmesg after usb_modeswitch

Code: Select all

[ 4115.120841] usb 4-1: usbfs: process 7347 (usb_modeswitch) did not claim interface 0 before use
[ 4115.121891] usb 4-1: USB disconnect, address 11
[ 4120.535752] usb 4-1: new high speed USB device using ehci_hcd and address 12
[ 4120.688580] usb 4-1: configuration #1 chosen from 1 choice
[ 4120.690497] option 4-1:1.0: GSM modem (1-port) converter detected
[ 4120.690844] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 4120.690977] option 4-1:1.1: GSM modem (1-port) converter detected
[ 4120.691139] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 4120.715445] scsi12 : SCSI emulation for USB Mass Storage devices
[ 4120.717431] option 4-1:1.3: GSM modem (1-port) converter detected
[ 4120.717845] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 4120.718015] option 4-1:1.4: GSM modem (1-port) converter detected
[ 4120.718207] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 4120.719418] usb-storage: device found at 12
[ 4120.719424] usb-storage: waiting for device to settle before scanning
[ 4125.705114] usb-storage: device scan complete
[ 4125.706314] scsi 12:0:0:0: Direct-Access     CMOTECH  Mass Storage      2.3 PQ: 0 ANSI: 2
[ 4125.707080] scsi 12:0:0:1: Direct-Access     CMOTECH  Mass Storage      2.3 PQ: 0 ANSI: 2
[ 4125.708977] sd 12:0:0:0: [sdb] 119808 512-byte hardware sectors (61 MB)
[ 4125.710378] sd 12:0:0:0: [sdb] Write Protect is off
[ 4125.710399] sd 12:0:0:0: [sdb] Mode Sense: 0f 0e 00 00
[ 4125.710404] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[ 4125.713697] sd 12:0:0:0: [sdb] 119808 512-byte hardware sectors (61 MB)
[ 4125.714545] sd 12:0:0:0: [sdb] Write Protect is off
[ 4125.714555] sd 12:0:0:0: [sdb] Mode Sense: 0f 0e 00 00
[ 4125.714560] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[ 4125.714646]  sdb: unknown partition table
[ 4125.718000] sd 12:0:0:0: [sdb] Attached SCSI removable disk
[ 4125.718082] sd 12:0:0:0: Attached scsi generic sg2 type 0
[ 4125.719362] sd 12:0:0:1: [sdc] Attached SCSI removable disk
[ 4125.719435] sd 12:0:0:1: Attached scsi generic sg3 type 0

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

Post by Josh » 22 Nov 2009, 18:07

Ad 1.:

I have no experience with the serial control interfaces some devices provide. In any case, it's up to the manufacturer to apply any protocol he wishes to use. If there is no app in Linux to control this specific device, you are on your own.

You could try to sniff out the SMS mechanism in Windows ... To do that you might need a tool which can show you the bulk transfer data converted to plain ASCII/ANSI text.

Ad 2.:

Have a look at the automation paragraph on the USB_ModeSwitch page. Version 1.0.5 is there to do it all for you if you install it with "make install_integrated". You won't need the Ubuntu package anymore.
All you need is to copy and adapt (just the IDs!) an entry in "80-usb_modeswitch.rules"; then add a file named "16d8:700a" to "/etc/usb_modeswitch.d". Content:

Code: Select all

#############################
# CMotech CHU-629S

DefaultVendor=  0x16d8
DefaultProduct= 0x700a

TargetClass=    0xff

CheckSuccess=20

MessageContent="55534243123456782400000080000dfe524445564348473d4e444953000000"
Ad 3.:

There might be timing issues involved. I recommend to use 1.0.5 and let udev handle the switching. See 2.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 23 Nov 2009, 15:17

Thank you for your comments.

More info on this new modem:
This 629S also has a micro SD slot.
Before switched to a modem,
/sys/bus/usb/devices/4-1 and
/sys/bus/usb/devices/4-1:1.0
were generated.

After switched to a modem,
/sys/bus/usb/devices/4-1,
/sys/bus/usb/devices/4-1:1.0,
/sys/bus/usb/devices/4-1:1.1,
/sys/bus/usb/devices/4-1:1.2,
/sys/bus/usb/devices/4-1:1.3 and
/sys/bus/usb/devices/4-1:1.4
were generaged.
And following messages came out in a few seconds.
[483.029881] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[484.038032] sd 4:0:0:0: [sdb] Assuming drive cache: write through

I tried again your automation method step by step.
But it did not work. My ubuntu8.04 box did not recongnized plugging of the modem.
There are some errors during make integrated_install.
But the binary file was generated and it works manually.

sudo make integrated_install

Code: Select all

...
usb_modeswitch.c:1291:2: warning: no newline at end of file
strip usb_modeswitch
...
install --mode=644 80-usb_modeswitch.rules /etc/udev/rules.d
if [ 'shich udevadm 2 >/dev/null' ]; then \
    'shich udevadm' control --reload-rules; \
  elif [ 'shich udevcontrol 2 >/dev/null' ]; then \
    'which udevcontrol' reload_rules; \
  fi
unrecognized command 'reload-rules'
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/afterain/usb_modeswitch/usb_modeswitch-1.0.5'
make: *** [integrated_install] Error 2
1. Why errors during "make integrated_install"?
Automation failed, but the binary works fine.
Can we solve the automation problem on ubuntu 8.04?

2. The timing seems to be important as your commnet.
Automation was failed so I rearanged the order as follows;
I add "usb_modeswitch" in the /etc/iptables.conf which is executed when ppp is up.
"modprobe option, echo "..." > /sys/.../new_id" were added in the /etc/init.d/networking.
During cold boot and warm boot it works.
But replugging the modem did not work. I should run "usb_modeswitch" manually.

3. Why the "unreconized" messages exist in lsusb. The message content is not perfect?

I'll keep sniffing more messages...

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

Post by Josh » 23 Nov 2009, 18:12

I checked the error with "make integrated_install" . I found a stupid change of the "udevadm" parameters between version "124" and "128".

The line "udevadm control --reload-rules" does exactly what it says: after any changes in the "rules" folder all rule files are re-read to make sure new entries are active immediately without a reboot.

Now, in older versions the line needs to be "udevadm control --reload_rules"; the underscore is essential ...
But a reboot will work as well and you can ignore the error.

Make sure you have the "tcl" package; try "tclsh" and "exit" if you get a "%" prompt.

With all in place, you can log the activity of the whole mechanism. Read Troubleshooting on the USB_ModeSwitch doc page.

If you combine ppp with usb_modeswitch you are most likely too late; ppp wants the modem prepared and ready ...

If the modem does switch reliably on every manual call of USB_ModeSwitch, the MessageContent is right and you don't need to keep on sniffing. The UNRECOGNIZED lines come from "libusb" which has a different code base than the kernel usb system. More important is the output of the "option" driver during its activation (see "dmesg"). If there are no errors during creation of the ttyUSB devices, chances are everything works as supposed. Still, there are no guarantees that the device does not have any hidden quirks.

afterain00
Posts: 15
Joined: 20 Nov 2009, 15:00

Post by afterain00 » 24 Nov 2009, 13:03

Thank you for your guide.

1. udev (udevadm version = 117 in ubuntu 8.04 server)
I changed "Makefile.integrated" according to your comment (reload_rules). The error message "unrecognized command 'reload-rules'" was gone.
Unfortunately, the auto-detection of the modem during replugging did not work though I checked tcl package, "%" prompt, 16d8:700a and 80-usb_modeswitch.rules. The logging file also did not generated well in /var/log/usb_modeswitch when I switched on the logging function in /usr/sbin/usb_modeswitch.tcl. The log file was updated only when the usb_modeswitch is executed manually.

During the server (3G router) operation, it will not happen to replugging the modem.
I think that's enough if the manual method is always stable.
(But I wonder why... :-) )

2. The error message in dmesg during running of usb_modeswitch
The error message in dmesg during usb_modeswitch execution is ignorable?

[ 4115.120841] usb 4-1: usbfs: process 7347 (usb_modeswitch) did not claim interface 0 before use

3. Timing
Yes, you are right. Sorry for confusing information. Actually my iptables.conf is executed during if-up (located in /etc/network/if-up.d/) which is followed by ppp, I think.

Post Reply