LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2008, 11:55 PM   #1
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Rep: Reputation: 16
problem accesing the internet with huawei EG162G usb modem


hi

i am new to linux and learning to operate on it. i have RHEL 4 on my machine. i wish to access internet from it.

the problem is that i have a huawei EG162G usb modem i am trying to access internet by using the following wvdial.conf file.

Modem=/dev/scd0
Baud=115200
Dial Command = ATDT
Baud=115200
Dial Command = ATDT
init1=ATZ
init2=AT+CRM=1
Flow Control= Hardware (CRTSCTS)
Username = ppp
Password = ppp
Phone = *99#
Stupid Mode = 1

this wvdial.conf file has been successfully used with huawei E220 usb modem i have changed the modem field to scd0 because when i plug in my usb modem. cdrom1 and scd0 are shown as new devices.

however when i run this wvdial.conf the following error is shown

cannot open scd0- Invalid Argument

kindly help me with this i will be very greatful...........
 
Old 12-19-2008, 01:23 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
i have RHEL 4 on my machine
Have you been keeping this up to date?
Quote:
huawei EG162G usb modem
The E220 has native linux support, I don't know about the 162G.
Quote:
when i plug in my usb modem. cdrom1 and scd0
Where? Note: scd0 is not your modem - which is why it didn't work.

Try:

lsusb

and

dmesg.
 
Old 12-19-2008, 01:40 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
this wvdial.conf file has been successfully used with huawei E220 usb modem
Have you tried running this command as root: wvdialconf /etc/wvdial.conf to let wvdial configure the file?
Most literature I've read say it is using /dev/ttyUSB0, but I guess it depends on optical drive scenarios as to which one it actually uses.
 
Old 12-19-2008, 11:09 AM   #4
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
hi i tried lsusb n i got :-

Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 003: ID 12d1:1001
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 1bcf:0007
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

bus 003 device 003 is the usb modem so wat device name should i use in wvdial.conf

i also tried demesg and got this:-

b 3-1: new full speed USB device using address 3
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: HUAWEI Model: Mass Storage Rev: 2.31
Type: CD-ROM ANSI SCSI revision: 02
USB Mass Storage device found at 3
sr0: scsi-1 drive
Attached scsi CD-ROM sr0 at scsi3, channel 0, id 0, lun 0
Device not ready. Make sure there is a disc in the drive.
Device sr0 not ready.
Device not ready. Make sure there is a disc in the drive.
Device not ready. Make sure there is a disc in the drive.
Device not ready. Make sure there is a disc in the drive.
ISO 9660 Extensions: Microsoft Joliet Level 1
ISOFS: changing to secondary root
SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts

i am not able to arrive at a conclusion from these outputs....
 
Old 12-19-2008, 11:13 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
See here: http://samiux.wordpress.com/2008/04/...on-ubuntu-804/
 
Old 12-19-2008, 11:13 AM   #6
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
this usb modem comes with setup.exe file
can i use wine to use this usb modem
i have never used wine so can u also give a link telling me how to install wine ...
is there a proper location where i have to install wine....
 
Old 12-19-2008, 11:25 AM   #7
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
hi tredegar
i am downloading the software the site mentions...
but it does'nt have a software for rhel4 so i am downloading fedora 8 one...
hope it works...,..
 
Old 12-19-2008, 11:54 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If it doesn't, please take a look at usbmodeswitch here:
http://www.draisberghof.de/usb_modeswitch/

Many of these USB phone-modem-dongles devices appear as a CD-ROM, and ONLY a CD -ROM when first plugged in.

Windows sees this and auto-runs the program on the "CD-ROM" that lets windows configure the device.
All very nice for windows users, but useless with linux.

Fortunately there's now a linux utility called usbmodeswitch that switches the "mode" of the USB modem away from being a CD-ROM and into the device's proper modem functionality. Linux doesn't care about, or need the windows drivers.

When you have plugged in your modem and run usbmodeswitch with the proper parameters for your modem, you should see 3 devices created in /dev/
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2


Then, and only then, can you configure it with vwdial or whatever.
 
Old 12-19-2008, 10:14 PM   #9
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
b 3-1: new full speed USB device using address 3
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: HUAWEI Model: Mass Storage Rev: 2.31
Type: CD-ROM ANSI SCSI revision: 02
USB Mass Storage device found at 3
sr0: scsi-1 drive
Attached scsi CD-ROM sr0 at scsi3, channel 0, id 0, lun 0
Device not ready. Make sure there is a disc in the drive.
Device sr0 not ready.
Device not ready. Make sure there is a disc in the drive.
Device not ready. Make sure there is a disc in the drive.
Device not ready. Make sure there is a disc in the drive.
ISO 9660 Extensions: Microsoft Joliet Level 1
ISOFS: changing to secondary root
SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts
It appears to be at /dev/sr0, so soft link it to something wvdial will see:
Code:
ln -s /dev/sr0 /dev/modem
And then either run the wvdial configurator or change the modem part of your existing wvdial.conf file to look at /dev/modem:
Code:
Modem=/dev/modem
Baud=115200
Dial Command = ATDT
Baud=115200
Dial Command = ATDT
init1=ATZ
init2=AT+CRM=1
Flow Control= Hardware (CRTSCTS)
Username = ppp
Password = ppp
Phone = *99#
Stupid Mode = 1
If I remember correctly, I ran into a similar scenario where wvdial could not see the device my modem was assigned to, but because the makefile of the modem source specified which one it creates, I then put it in my existing wvdial.conf and it worked, try this also:
Code:
Modem=/dev/sr0
Baud=115200
Dial Command = ATDT
Baud=115200
Dial Command = ATDT
init1=ATZ
init2=AT+CRM=1
Flow Control= Hardware (CRTSCTS)
Username = ppp
Password = ppp
Phone = *99#
Stupid Mode = 1
 
Old 12-20-2008, 03:22 AM   #10
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts
Quote:
It appears to be at /dev/sr0, so soft link it to something wvdial will see:
No, what's being seen at sr0 is the "CDROM" (iso9660)
wvdial will not communicate with that.
See my post #8 about usbmodeswitch
 
Old 12-20-2008, 01:57 PM   #11
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Thank you tredegar - I'll leave this one to you.
 
Old 12-21-2008, 12:53 AM   #12
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
hi tredegar,
i tried downloading the vodafone net card reader from the link you mentioned its asking for more packages

gksu
gnome-python2-desktop
notify-python
pyserial
python(abi)
python-sqlite2
python-twisted
pytz
rtld(GNU-HASH)

now i am trying to download these

plus i have also downloaded the usb_modeswitch can you tell me how we use it ????????
 
Old 12-21-2008, 01:19 AM   #13
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
hi
i have got the usb mode switch but i am clueless what to do with it i copied it in /usr/local/src and then unzipped it using tar i then copied the usb_modeswitch.conf file to /etc.

what now ?? it says i have to run it everytime i plug in my device.. how do i do that...

(mebbe its a very dumb question but i am new to linux)

Last edited by gaur.ankit2007@gmail.com; 12-21-2008 at 01:20 AM.
 
Old 12-21-2008, 04:09 AM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
i tried downloading the vodafone net card reader from the link you mentioned its asking for more packages
You didn't read that link very far.
Further down it says "Updated on 2008-June-22"
and he recommends using salutis-connect: "I tested it on my E169G and it is running perfectly. Surprisingly, NO setting is required. Just plug in and play."

So maybe that's the easiest way to go.

Quote:
what now ?? it says i have to run it everytime i plug in my device.. how do i do that
If you want to go the usb_modeswitch way (and I had to run usb_modeswitch before salitis-connect would work properly,
but some other people have not needed this):

You need to read the README file in the usb_modeswitch-0.9.4 directory.
Also, read usb_modeswitch.conf, particularly the bit about E169G, which is your modem model.

To run it, plug in your dongle, wait for it to settle and then type the full path to the executable.
For me, it's like this (my modem is different from yours, so my vendor & Product numbers are different.)

sudo /home/tred/Linux/usb_modeswitch-0.9.4.usb_modeswitch -v 0x12d1 -p 0x1001 -d 1
sudo /home/tred/Linux/usb_modeswitch-0.9.4.usb_modeswitch -v 0x12d1 -p 0x1001 -H 1

Then when I
ls /dev/ttyU*
I can see the following devices have been created:
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2

So the modem is no longer a CD-ROM, it's a modem.

Now you can configure wvdial or salutis-connect and you are off.

Here are some additional notes I made when getting my modem (which is a Huawei 620) to work with both my regular kubuntu laptop, and my Asus eee701, which is (or at least was) running xandros.
It's a load of copy & pastes from all over the web (only sometimes with references), and my own notes too, but the information you need is all there:

Code:
A little HOWTO for the Huawei E169G USB Mobile Broadband Modem with linux

This refers to Kubuntu 8.04, but should also work for other modern distros.

This took me a while to get running properly as information was scattered
all over the net, and some Howto's just didn't work.

Samix ( http://samiux.wordpress.com/2008/04/23/huawei-e169g-on-ubuntu-804/ ) 
recommends salutis-connect to get this modem working. It (eventually) 
works very well for me.

Install it like this:

Code:
sudo echo deb http://repository.salutis.sk/production ./ >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install salutis-connect
salutis-connect requires the package zenity so you may have to install that too:
Code:
sudo apt-get install zenity
The program itself is a bash script, so you can open it with an editor from here /usr/bin/salutis-connect and see what it does. I needed to run it as root: kdesu salutis-connect (in KDE) gtksu salutis-connect (in Gnome) I plugged in my E169G, waited for the flashing blue light (Network detected), and started salutis-connect It didn't work because it could not find /dev/ttyUSB0 which is where the modem should be. Dale Lane's blog ( http://dalelane.co.uk/blog/?p=254 ) explains that the E169G is a "Composite USB Device". It has a flash memory disk, and this starts up by behaving as a CD. It needs to be switched to "Modem Mode", and he worked out how to do this: Get usb_modeswitch from here: http://www.draisberghof.de/usb_modeswitch/ Download it. Untar it, and you'll find the executable usb_modeswitch already compiled, although the source code is included as well. I couldn't compile from source until I had installed libusb-dev as well as build-essential, but the executable worked on my system without recompiling. I put the executable in /sbin [The pre-compiled executable did not work on my xandros eee701 - until I recompiled it from the sourcecode] Some distros have trouble with the usbserial driver and this device so you may need to
Code:
sudo rmmod usbserial && modprobe usbserial vendor=0x12d1 product=0x1001
before you plug in your E169G (Kubuntu 8.04 does not need this, it is using the option module as well as usbserial which apparently fixes the problem). The commands to switch the modem to modem mode need to be run as root:
Code:
sudo usb_modeswitch -v 0x12d1 -p 0x1001 -d 1
sudo usb_modeswitch -v 0x12d1 -p 0x1001 -H 1
The first command disables the CD rom, the second enables the modem. The parameters 0x12d1 and 0x1001 refer to the product's vendor and product IDs, as seen by lsusb: Bus 003 Device 012: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem Plug the modem in. Wait for the blue flashing light (= "network detected, but not connected yet") Once the modem is in modem mode, and the blue light is flashing, salutis-connect just connected me to my network. Note: No information at all about which network needed to be provided. I suppose that is all handled by the modem's SIM card. Thanks, Rudolf for an excellent piece of code. ============================ udev ========================== Now I thought it would be better to get udev automatically make the modem get ready to connect when it is plugged in. Fortunately Liam Green-Hughes has already done the work needed ( http://www.greenhughes.com/content/u...ee#comment-119 ) Create the file /usr/sbin/e169g-connect
Code:
#!/bin/bash
# Switch off the CD rom, start modem-mode
/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1
/sbin/usb_modeswitch -v 12d1 -p 1001 -H 1
exit 0
and make it executable
Code:
sudo chmod 744 /usr/sbin/e169g-connect
We need to make this udev rule /etc/udev/rules.d/99-sc-e169g.rules
Code:
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g-connect"
Put that file in /etc/udev/rules.d/ I called it 99-sc-e169g.rules because there is already a 99-sc-e220.rules which sorts out the problem with the usbserial module with some distros. Obviously that rule will only work for an E220, and I do not need it anyway, so I just ignored it. restart udev:
Code:
sudo /etc/init.d/udev restart
Plug in the modem Wait for the flashing blue light Start salutis-connect as root. It connects :) On the eee: I needed to recompile usb_modeswitch. Then it worked. To be able to compile on the eee, you need to install build-essential and libusb-dev I needed to add the udev rules bit to put the modem into modem mode when it is plugged in. salutis-connect did not work on xandros, but the eee network-connector did: Choose 3G mobile Choose the Huawei that is listed at /dev/ttyUSB0 Follow the prompts Login & Password do not need specifying -"guest" is fine. It connects. Takes a moment for DNS to come up properly, then it works just fine.
 
Old 12-21-2008, 05:45 AM   #15
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Original Poster
Rep: Reputation: 16
hi tredegar,

i tried usb_mode. i copied the executable file in /sbin. i copied the usb_modeswitch.conf in /etc. i changed its VENDOR ID AND PRODUCT ID

#######################################################
# Option GlobeSurfer Icon (aka "Vodafone EasyBox")
#
# The message SHOULD be the same for all Option devices

DefaultVendor= 0x12d1
DefaultProduct= 0x1001

TargetVendor= 0x13fe
TargetProduct= 0x1d00


(this is equivalent to writing -p and -v when running usb_modeswitch)

and then i typed usb_modeswitch in terminal it showed the following message

[root@localhost dev]# usb_modeswitch -W

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

DefaultVendor=0x12d1
DefaultProduct=0x1001
TargetVendor=0x13fe
TargetProduct=0x1d00
TargetClass=0x0
DetachStorageOnly=0
HuaweiMode=0
MessageEndpoint=0x5
MessageContent="55534243123456780000000000000601000000000000000000000000000000"
Interface=0x0

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 005
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 005 on 003
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 002 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001

Looking for target devices
Found target devices (1)
Looking for default devices
Found default devices (1)
Prepare switching, accessing latest device
Looking for active default driver to detach it
USB error: could not get bound driver: No data available
No driver found. Device probably not initialized. Trying to continue ...
Setting up communication with device
Trying to send the message
OK, message successfully sent.
-> See /proc/bus/usb/devices (or call lsusb) for changes. Bye

then i typed -lsusb

[root@localhost dev]# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 005: ID 12d1:1001
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 1bcf:0007
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 13fe:1d00
Bus 001 Device 001: ID 0000:0000
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HSPDA USB modem Huawei E220 Linuxkundi Slackware 7 05-16-2011 11:16 AM
please help with Huawei E169g usb modem and acer aspire one Hards746 Linux - Newbie 2 05-10-2009 09:00 AM
Huawei EC325 USB MODEM under Ubuntu 8.04 dracula Linux - Networking 1 12-05-2008 08:34 AM
Problem: Connecting To Internet On Ububntu Huawei Quidway Series Modem shubhamagarwal1 Linux - Newbie 1 05-19-2008 11:51 AM
Higher speed with HUAWEI E220 USB modem? stardustdk Linux - Laptop and Netbook 3 03-04-2008 04:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration