Huawei E1752 mobiel internet op Linux (Ubuntu/debian)

Mobistar verkoopt met hun "Internet Everywhere" abonnementen een goedkoop en degelijk alternatief voor de occassionele gebruiker van mobiel internet (5 euro per maand + 1 euro per dag gebruik en 1 GB inbegrepen). Je krijgt/koopt hierbij standaard een Huawei E1752 USB modem. In tegenstelling tot de eerdere Option en Huawei USB devices zijn deze echter niet meer zo straight forward te gebruiken op Linux. De modems zijn nu modem en USB mass storage device (voor de Windows driver) en Linux ziet standaard de usb mass storage in plaats van de modem. Dit kan je nakijken met lsusb:

# lsusb
Bus 002 Device 007: ID 12d1:1446 Huawei Technologies Co., Ltd.

Je kan de modem echter activeren met usb-modeswitch

apt-get install usb-modeswitch

en voeg onderstaande lijnen toe in /etc/usb_modeswitch.conf

########################################################
# Huawei E1752
#
# Contributor: 

DefaultVendor=  0x12d1
DefaultProduct= 0x1446

TargetVendor=	0x12d1
TargetProdct=	0x1001

MessageEndpoint=	0x01

MessageContent=	"55534243000000000000000000000011060000000000000000000000000000"

(bron)

Voer als root usb_modeswitch uit:

# usb_modeswitch 

 * 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 007 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached

Received inquiry data (detailed identification)
-------------------------
  Vendor String: ɸI����
 Product String: 
Revision String: 
-------------------------

Device description data (identification)
-------------------------
Manufacturer: HUAWEI Technology
     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 further steps ...
-> Run lsusb to note any changes. Bye.

root@flaptop:~# lsusb
Bus 002 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem

Je kan nu via netwerk-manager: edit connections een nieuwe mobiele connectie toevoegen. Kies het device, daarna Belgium, Mobistar en "Internet Everywhere". Normaal zijn alle settings goed en moet je alleen de PIN invoeren bij de gedetailleerde gegevens. Daarna manueel verbinden en voila...

Ironisch: als Windows niet zo een ingewikkeld systeem was, zou dit mass storage voor de drivers niet nodig zijn en zou dit device zoals voordien "plug & play" werken op Linux.

PS: bovenstaande zal analoog werken met de Proximus Vodaphone USB modems en vele Option modellen, mits je het juiste device in /etc/usb_modeswitch.conf uncomment.

Anonymous (not verified)

Tue, 01/12/2009 - 12:56

I'm not able to execute the apt-get install usb-modeswitch. I already tried some info on the net but without success.

Could you please give me more details of executing this install of a Huawei E1752 on an Acer Aspire One

I was able to change the usb_modeswitch.conf

after checking lsusb the result is now

Bus 001 Device 002: ID 12d1:1001 Huawei E620 3G Modem

In the netwerk manager I'm not able to create a mobile network
Only possibilities are LAN, WLAN, PPPoE, WLAN + PPPoE, without the option Mobistar Internet Everywhere.

Some additional info
Acer Aspire One
Linpus Linux Lite v1.0.11.E
Huawei E 1752

Anonymous (not verified)

Wed, 02/12/2009 - 09:33

Additional info:

Acer Aspire One
Linpus Linux Lite v1.0.11.E

Huawei E 1752

Error

Bash: apt-get : command not found

> Bash: apt-get : command not found
Linpus Lite is Synaptic based, not apt-get/dpkg so the command will never be there. Since Linpus Lite is Fedora based then you could use rpms, and therefore run yum instead of apt-get (if yum is installed). I suggest that you learn about the various Linux package managers afore you continue:
http://en.wikipedia.org/wiki/Synaptic_Package_Manager

Anonymous (not verified)

Tue, 08/12/2009 - 12:44

Tried this with my HUAWEI E1752 on :
Linux 12334444 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux on a Dell notebook. No luck:
# tail -f /var/loog/messages&
# usb_modeswitch ; ls /dev/*USB*

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found default devices (1)
Accessing device 008 on bus 002 ...
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: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: HUAWEI Technology
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) ...
Dec 8 11:38:52 AMS-L0769 kernel: [92410.313818] usb 2-1: usbfs: process 6225 (usb_modeswitch) did not claim interface 0 before use
Dec 8 11:38:52 AMS-L0769 kernel: [92410.314645] usb 2-1: USB disconnect, address 8
Original device is gone already, not checking
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
No new devices in target mode or class found

Mode switch has failed. Bye.

ls: cannot access *USB*: No such file or directory
root@AMS-L0769:/dev# usb_modeswitch ; ls *USDec 8 11:39:00 AMS-L0769 kernel: [92418.548186] usb 2-1: new high speed USB device using ehci_hcd and address 9
Dec 8 11:39:00 AMS-L0769 kernel: [92418.684737] usb 2-1: configuration #1 chosen from 1 choice
Dec 8 11:39:00 AMS-L0769 kernel: [92418.692136] scsi11 : SCSI emulation for USB Mass Storage devices
Dec 8 11:39:00 AMS-L0769 kernel: [92418.697432] scsi12 : SCSI emulation for USB Mass Storage devices

root@AMS-L0769:/dev# Dec 8 11:39:05 AMS-L0769 kernel: [92423.694125] scsi 11:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
Dec 8 11:39:05 AMS-L0769 kernel: [92423.700560] sr1: scsi-1 drive
Dec 8 11:39:05 AMS-L0769 kernel: [92423.702416] sr 11:0:0:0: Attached scsi generic sg2 type 5
Dec 8 11:39:05 AMS-L0769 kernel: [92423.705396] scsi 12:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
Dec 8 11:39:05 AMS-L0769 kernel: [92423.709469] sd 12:0:0:0: [sdb] Attached SCSI removable disk
Dec 8 11:39:05 AMS-L0769 kernel: [92423.709594] sd 12:0:0:0: Attached scsi generic sg3 type 0

problem solved: It was Nautilus : after the usb device is plugged, the umount the mounted file system and then run usb_modeswitch.
Obvious really :)

hi there, i have a device with this ids : 12d1:1803.

may i know what's the command to umount the device? is it :
#sudo umount /dev/sda ?

let me know please, thanks

Thanks for the guideline Luc.
I've tried this out on Ubuntu Karmic and it also worked.
My steps where a bit different.

First i created a new internet everywhere Mobile connection with the Network Manager:
Right Click the Network Manager Icon
Choose "Edit Connections"
Choose the Tab "Mobile Broadband"
Click "Add" Button
Click "Forward" Button
Choose Belgium > Mobistar > Internet Everywhere
Fill in your personal PIN
Leave all other settings.

NEXT : USB_MODESWITCH
Following your guidelines to installed usb_modeswitch and provide the correct configuration settings.
Trying
/> sudo usb_modswitch at that moment did not succeed.
The process stalled on
Looking for active driver ...
No driver found. Either detached before or never attached

I had to reboot my system first to make that command work correctly.

Thanks again for usefull tip

Hi Luc,

I just upgraded to 10.10 .
As a result the Conf file has been renamed to 'usb_modeswitch.conf.dpkg-bak'

But I noticed that USB_modeswitch no longer has to be called MANUALLY.
I just plugged in the modem, and after 10 seconds it connect me to the internet.
Could anyone confirm this ?

Manolete (not verified)

Wed, 11/08/2010 - 10:06

Hi, for 10.04 to avoid to do anything for modem works, only you have tu install last version of usb-modeswitch and usb-modeswitch-data

i386:
https://launchpad.net/ubuntu/+source/usb-modeswitch/1.1.3-1/+build/1810…

https://launchpad.net/ubuntu/+source/usb-modeswitch-data/20100418-1/+bu…

amd64:
https://launchpad.net/ubuntu/+source/usb-modeswitch/1.1.3-1/+build/1810…

https://launchpad.net/ubuntu/+source/usb-modeswitch-data/20100418-1/+bu…

For other distributions:

- ArchLinux: if you are using ArchLinux you will have not any troube to compile from sources. http://www.draisberghof.de/usb_modeswitch/#download

- Slackware: if you are using ArchLinux you will have not any troube to compile from sources. http://www.draisberghof.de/usb_modeswitch/#download

- Gentoo: if you are using ArchLinux you will have not any troube to compile from sources. http://www.draisberghof.de/usb_modeswitch/#download

- Debian stable (Lenny): if you are using ArchLinux you will have not any troube to compile from sources. http://www.draisberghof.de/usb_modeswitch/#download

- Debian testing (Squeeze): http://packages.debian.org/testing/usb-modeswitch

- Debian unstable (Sid): http://packages.debian.org/sid/usb-modeswitch

- Ubuntu y derivadas, Mint, Guadalinex, Max Madrid, Lliurex, etc.: Al launchpad.net

- Fedora: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

- SuSE/OpenSuSE: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

- Mandriva: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

- PcLinuxOS: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

- CentOS: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

- RawHide: http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=3&dl=40&search=u…

Have fan

coollu925 (not verified)

Thu, 14/04/2011 - 09:41

$ sudo gedit usb_modeswitch.setup ########################################################
# Huawei E1550
# Huawei E1750
#
#Contributor: Anders Blomdell, Ahmed Soliman

DefaultVendor= 0x12d1
DefaultProduct= 0x1001

TargetVendor= 0x12d1
TargetProduct= 0x1001

#only for reference and 0.x versions
#MessageEndpoint=0x01

MessageContent="55534243123456780000000000000011060000000000000000000000000000"

CheckSuccess=5
########################################################

user@Ubuntu1004:/etc$ lsusb
Bus 002 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 038: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@Ubuntu1004:/etc$

user@Ubuntu1004:/etc$ ls /sys/bus/usb-serial/drivers/option1/ //在插入E1750后,会自动识别出三个ttyUSB设备
bind module new_id ttyUSB0 ttyUSB1 ttyUSB2 uevent unbind
user@Ubuntu1004:/etc$

user@Ubuntu1004:/etc$ sudo usb_modeswitch -W -c usb_modeswitch.setup
Reading config file: usb_modeswitch.setup

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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x1001
TargetVendor= 0x12d1
TargetProduct= 0x1001
TargetClass= not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=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

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 038 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Looking for target devices ...
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 12d1:1001
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0002
Found devices in target mode or class (1)
Looking for default devices ...
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 12d1:1001
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0002
Found devices in default mode, class or configuration (1)
Accessing device 038 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x82 (in)
Using endpoints 0x01 (out) and 0x82 (in)
Not a storage device, skipping SCSI inquiry

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Looking for active driver ...
OK, driver found ("option")
OK, driver "option" 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 0x82
Resetting message endpoint 0x01
USB error: could not release intf 0: No such device
Device is gone, skipping any further commands

Checking for mode switch (max. 5 times, once per second) ...
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001 //ubuntu系统中的E1750模块会自动弹出。
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
searching devices, found USB ID 0e0f:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
No new devices in target mode or class found

Mode switch has failed. Bye.
user@Ubuntu1004:/etc$

有熟悉的同志帮忙看看,谢谢了……

ser@Ubuntu1004:/etc$ ls /dev/sd //not install e1750
sda sda1 sda2 sda5 sdb sdb1
user@Ubuntu1004:/etc$ ls /dev/sd //install e1750
sda sda1 sda2 sda5 sdb sdb1 sdc

user@Ubuntu1004:~$ sudo mount /dev/sdc www/
mount: /dev/sdc: unknown device

user@Ubuntu1004:~$ fdisk /dev/sdc
Unable to open /dev/sdc
user@Ubuntu1004:~$

plese help me,thanks!

Hi luc,I just write a simple config file "usb_modeswitch.setup", and i want use usbswitch success first.

I am a beginer,so i don't know about the configure .Can you tell me the config step? I'm so sorrw to trouble you .

~~

Hi,luc;
The E1750 mode had changed to usb mode successfully,and when i install wvdail it can works.Huh,so good.
Thank you so much for you reply!