Automatic Activation, Hotplug and UDEV, Configuration
isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

huawei u7510/u7517

Post by isak.sr » 24 Jan 2010, 19:44

Hi!

I bought a huawei u5717 (same as u7517 or vodafone 840) and im not able to use it as modem

My dmesg:

[ 2478.785014] usb 1-6: new high speed USB device using ehci_hcd and address 6
[ 2478.902236] usb 1-6: New USB device found, idVendor=12d1, idProduct=101e
[ 2478.902252] usb 1-6: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 2478.902261] usb 1-6: Product: HUAWEI MOBILE
[ 2478.902268] usb 1-6: Manufacturer: Huawei Technologies
[ 2478.902391] usb 1-6: configuration #1 chosen from 1 choice
[ 2478.904438] scsi7 : SCSI emulation for USB Mass Storage devices
[ 2478.904608] usb-storage: device found at 6
[ 2478.904610] usb-storage: waiting for device to settle before scanning
[ 2479.906396] scsi 7:0:0:0: CD-ROM Huawei T Mass Storage 2.31 PQ: 0 ANSI: 2
[ 2479.913897] sr1: scsi-1 drive
[ 2479.914065] sr 7:0:0:0: Attached scsi CD-ROM sr1
[ 2479.914144] sr 7:0:0:0: Attached scsi generic sg2 type 5
[ 2479.914494] usb-storage: device scan complete
[ 2490.161101] sr 7:0:0:0: [sr1] Unhandled sense code
[ 2490.161115] sr 7:0:0:0: [sr1] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2490.161124] sr 7:0:0:0: [sr1] Sense Key : Medium Error [current]
[ 2490.161134] Info fld=0x0

When i do usb_modeswitch -v 0x12d1 -p 0x101e -d 1 i get this:
Looking for default devices ...
Found default devices (1)
Prepare switching, accessing device 006 on bus 001 ...
Only detaching storage driver for switching ...
Looking for active driver ...
OK, driver found ("dummy")
Driver is not usb-storage, leaving it alone
-> Run lsusb to note any changes. Bye

If i do usb_modeswitch -v 0x12d1 -p 0x101e -H 1

nothing happens..... no /dev/ttyUSB* created

can someone help me???

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

Post by Josh » 24 Jan 2010, 21:47

The new Huawei devices use a different switching command.

Try this:

Code: Select all

usb_modeswitch -v 0x12d1 -p 0x101e -M "55534243123456780000000000000011060000000000000000000000000000"
(in one line, of course)

isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 25 Jan 2010, 22:45

ok... moving foward but not yet there

i did what u adviced and this is what i get

Looking for default devices ...
Found default devices (1)
Prepare switching, accessing device 008 on bus 001 ...
No MessageEndpoint given. Trying to autodetect ...
OK, using endpoint 0x01
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
OK, message successfully sent
-> Run lsusb to note any changes. Bye

i ran lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 008: ID 12d1:101e Huawei Technologies Co., Ltd.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0458:002e KYE Systems Corp. (Mouse Systems)
Bus 002 Device 003: ID 046d:092b Logitech, Inc. Labtec Webcam Plus
Bus 002 Device 004: ID 0a81:0101 Chesen Electronics Corp. Keyboard

but still no ttyUSB* created

i tried modprobe usbserial vendor=0x12d1 product=0x101e
and /dev/ttyUSB0 its created
but wvdialconf doesnt detect it neither yast modem module...

hope there is a solution.... if not.... u think buying a usb bluetooth adapter would let me get it as a modem???

thanks

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

Post by Josh » 25 Jan 2010, 23:12

Nah, usbserial is not recommended anymore. After switching do this (as root or superuser):

Code: Select all

# modprobe -v option
# echo "12d1 101e" > /sys/bus/usb-serial/drivers/option1/new_id
(in one line of course)
This driver is optimized for high-speed modems.

You will get a number of ports; you could just try which one is the correct data port (be aware that there are pittfalls!).
Or you do it the proper way: for this run "sudo lsusb -v -d 12d1: >huawei_diag" and get a hierarchical listing of all device attributes in a text file named "huawei_diag".

Have a look at it in the editor of your choice and find a line that contains "Transfer Type" and "Interrupt". This line belongs to an endpoint that belongs to an interface; if you go up from this line you'll sooner or later arrive at a line that says "bInterfaceNumber".
Note the number that follows. This is your data port.

If you get new serial ports, say, from ttyUSB0 to ttyUSB3, and your bInterfaceNumber was "2", then the right port for connecting should be ttyUSB2.


isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 26 Jan 2010, 00:21

ok... first of all... thanks a lot for your help!

now... i do this

linux-7xy4:/home/isaac # usb_modeswitch -v 0x12d1 -p 0x101e -M "55534243123456780000000000000011060000000000000000000000000000"

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Looking for default devices ...
Found default devices (1)
Accessing device 012 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached

Received inquiry data (detailed identification)
-------------------------
Vendor String: Huawei T
Product String: Mass Storage
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: Huawei Technologies
Product: HUAWEI MOBILE
Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
OK, message successfully sent
-> Run lsusb to note any changes. Bye.

then


linux-7xy4:/home/isaac # modprobe -v option echo "12d1 101e" > /sys/bus/usb-serial/drivers/option1/new_id

and nothing happens... no ttyUSB* created...

tried

linux-7xy4:/home/isaac # modprobe usb-serial vendor=0x12d1 product=0x101e
FATAL: Module usb_serial not found.


:( :(

isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 26 Jan 2010, 00:27

new info...

if i do

linux-7xy4:/home/isaac # modprobe -v option

and then

echo "12d1 101e" > /sys/bus/usb-serial/drivers/option1/new_id

no output after it but dmesg shows

[11056.878324] option 1-6:1.0: GSM modem (1-port) converter detected
[11056.878462] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0

then i do wvdialconf and i get same error

ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.


Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?

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

Post by Josh » 26 Jan 2010, 01:31

Oh, I suppose it was my fault, the device has not switched at all as I just realized.

Are you able to get the latest version and compile it?
1.0.2 is a bit dated by now. We're at 1.1.0.

If that version doesn't help, then it's sniffing time I'm afraid ...

isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 26 Jan 2010, 03:28

sniffing time....

do you think using bluetooth it would work?

isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 26 Jan 2010, 04:08

isaac:/home/isaac # usb_modeswitch -v 0x12d1 -p 0x101e -M "55534243123456780000000000000011060000000000000000000000000000" -s 5

Note: target parameter missing; success check limited
Looking for default devices ...
Found default devices (1)
Accessing device 014 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached

SCSI inquiry data (for identification)
-------------------------
Vendor String: Huawei T
Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
Product: HUAWEI MOBILE
Serial No.: not provided
-------------------------
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

Checking for mode switch (max. 5 times, once per second) ...
Original device is gone already, not checking
(For a better success check provide target IDs or class)
Original device vanished after switching

Mode switch most likely succeeded. Bye.

so?... confused... is it properly switched???

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

Post by Josh » 26 Jan 2010, 08:47

The success message means, that - after the switch command - your device was not accessible anymore. This is a good sign.

Huawei devices usually need annother five seconds or so after switching to return as a new device, in your case with a different USB ID. You can check this with "lsusb" (as root or superuser).

isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 27 Jan 2010, 23:17

nope... no luck... no switch........

do you think it would work with bluetooth??? (would have to buy and usb adapter for that)

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

Post by Josh » 27 Jan 2010, 23:47

I am not understanding what you want to do with bluetooth.

Anyway, I'd like to see a full output of USB_ModeSwitch as you ran it, with the -W option added.
And if you get the "device vanished" output again, I'd like to see the end of the "dmesg" output after that.

Edit:
And note that the current Huawei sticks need at least five seconds until they come back as a new device after switching.


isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 28 Jan 2010, 01:03

ok... thing is my device is a mobile phone... Huawei U7517, also know as U7510 or T-mobile Tap (mine is from costa rica... not t-mobile... but its the same device)

So it has bluetooth, i thought in my imaginary world my computer would connect to its modem through a bluetooth connection...

anyway...

this is dmesg when pluggin it

[18540.408014] usb 1-6: new high speed USB device using ehci_hcd and address 5
[18540.525946] usb 1-6: New USB device found, idVendor=12d1, idProduct=101e
[18540.525961] usb 1-6: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[18540.525970] usb 1-6: Product: HUAWEI MOBILE
[18540.525977] usb 1-6: Manufacturer: Huawei Technologies
[18540.526109] usb 1-6: configuration #1 chosen from 1 choice
[18540.600119] scsi6 : SCSI emulation for USB Mass Storage devices
[18540.606520] usb-storage: device found at 5
[18540.606524] usb-storage: waiting for device to settle before scanning
[18541.608231] scsi 6:0:0:0: CD-ROM Huawei T Mass Storage 2.31 PQ: 0 ANSI: 2
[18541.615906] sr1: scsi-1 drive
[18541.616295] sr 6:0:0:0: Attached scsi CD-ROM sr1
[18541.616374] sr 6:0:0:0: Attached scsi generic sg2 type 5
[18541.616730] usb-storage: device scan complete

now doing

isaac:/home/isaac # usb_modeswitch -v 0x12d1 -p 0x101e -M "55534243123456780000000000000011060000000000000000000000000000" -s 5 -W
Taking all parameters from the command line


* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.0 (C) Josua Dietze 2010
* Based on libusb 0.1.12

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x101e
TargetVendor= not set
TargetProduct= not set
TargetClass= not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, max. wait time 5 seconds
System integration mode disabled


Note: target parameter missing; success check limited
Looking for default devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:101e
found matching vendor ID
found matching product ID
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0458:002e
searching devices, found USB ID 046d:092b
searching devices, found USB ID 0a81:0101
Found default devices (1)
Accessing device 005 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached

SCSI inquiry data (for identification)
-------------------------
Vendor String: Huawei T
Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
Product: HUAWEI MOBILE
Serial No.: not provided
-------------------------
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

Checking for mode switch (max. 5 times, once per second) ...
Original device is gone already, not checking
(For a better success check provide target IDs or class)
Original device vanished after switching

Mode switch most likely succeeded. Bye.

now dmesg again

[19053.927084] usb 1-6: usbfs: process 6764 (usb_modeswitch) did not claim interface 0 before use

and thats it... no new ttyUSB* created...

even tried modprobe using usb-serial as u posted before
createas /dev/ttyUSB0 but kppp, wvdial, or any other dial up software can open /dev/ttyUSB0...

hope this information helps

thanks a lot again!

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

Post by Josh » 28 Jan 2010, 01:15

Ah, now I see.

First, this is a new case, a phone to switch externally. Did you look for a setting in the phone menu to switch the USB port away from "storage"? I connect via my phone and I switched it permanently to serial mode (although Samsung calls it "PC-Studio" mode).

Second, if that is not the case, the switching command might be very different from what we know so far. Does the phone have drivers onboard? Or do you have to install special software or a driver on Windows?

Third, bluetooth will work, but considerably slower than a wired USB connection.


isak.sr
Posts: 20
Joined: 24 Jan 2010, 19:39

Post by isak.sr » 28 Jan 2010, 02:37

this is what happens on windows XP (using it on virtualbox)

when plugging it detects it as cd-rom drive (as linux) and autorun starts a setup.exe program which installs drivers from this cd-rom created. After that it is recognized as a modem, but havent had luck connecting it, since im in virtualbox...

one of the files inside the cd-rom says this... (dont know if it would help)

; Windows Virtual Serial Port Setup File
; Copyright (c) 2006,2007 Huawei Incorporated
; Manufacturer: Huawei Incorporated
;
; This INF file installs a virtual COM port on Win2K system.

[Version]
signature = "$WINDOWS NT$"
Class = Ports
Provider = %HUAWEI%
ClassGuid = {4D36E978-E325-11CE-BFC1-08002BE10318}
DriverVer = 05/25/2009,2.0.5.301
CatalogFile= qscnser.cat

[SourceDisksNames]
1000 = %HWSRCDISK%,"",,

[SourceDisksFiles]
qscnusb.sys = 1000

[ControlFlags]
ExcludeFromSelect = *

[DestinationDirs]
DefaultDestDir = 12

[Manufacturer]
%HUAWEI% = HMSerialPort

[HMSerialPort]
%HWDevice% = HMportInstall00, USB\VID_12d1&PID_101E&MI_01
%DBDevice00% = HMportInstall00, USB\VID_12d1&PID_101D&MI_01
%DBDevice01% = HMportInstall00, USB\VID_12d1&PID_101D&MI_02

; ###### Installation Section ######

[HMportInstall00.NT]
CopyFiles = CopyFileSection00
AddReg = All00, AddReg.NT

[HMportInstall00.NT.Services]
AddService = MobileAdapter, 0x00000002, HMport_Service_Inst00

[HMport_Service_Inst00]
DisplayName = "Mobile Adapter USB Modem and USB Serial"
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\qscnusb.sys

[CopyFileSection00]
qscnusb.sys,,,0x20

[All00]
HKR,,NTMPDriver,,qscnusb.sys


[AddReg.NT]
HKR,,PortSubClass,1,01
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[Strings]
HUAWEI = "HUAWEI Incorporated"
HWSRCDISK = "Multimedia USB Driver Disk"
HWDevice = "Mobile Adapter - PC UI Interface"
DBDevice00 = "DBAdapter - Reserved Interface"
DBDevice01 = "DBAdapter - PC UI Interface"

Inside i have a setup.exe program, a diaulp_setup.exe program, a pc_suite_setup.exe and a drivers folder..

(not as easy as i thought this would be...)

really.... bluetooth is slower???

Post Reply