LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-28-2009, 02:53 AM   #1
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Rep: Reputation: 15
Huawei E160 modem giving me grief on Slackware (What am I doing wrong?)


I am running Slackware 12.2 with the 2.6.27.7 kernel. I'm not having much luck connecting to the Internet with my Huawei E160 3G modem. The advice I've seen so far suggests things like using umtsmon and usb_modeswitch, but these have not solved my problem!
My wvdial.conf is as follows:
Quote:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","safaricom"
Modem Type = USB Modem
ISDN = 0
Phone = *99#
Modem = /dev/ttyUSB0
Username = saf
Password = data
New PPPD = yes
Baud = 921600
When I try to log in, I get:
Quote:
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","safaricom"
AT+CGDCONT=1,"IP","safaricom"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Wed Oct 28 05:46:43 2009
--> Pid of pppd: 5042
--> Using interface ppp0
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> local IP address 172.27.19.33
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> remote IP address 10.64.64.64
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> primary DNS address 196.201.208.2
--> pppd: H[06][08]p[06][08]Ð[06][08]
--> secondary DNS address 209.244.0.3
--> pppd: H[06][08]p[06][08]Ð[06][08]
But I can't ping anything or access anything on the browser.
When I attempt to connect using umtsmon I get:
Quote:
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
or,
Quote:
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB1
Terminating on signal 15
Connection terminated.
Receive serial link is not 8-bit clean:
Problem: all had bit 7 set to 0
Modem hangup
Meanwhile, the command-line output for umtsmon ends with:
Quote:
##P4 t=008: ConnectionInfo::refreshSignalQuality(void)
##P3 t=008: ConnectionInfo probe inhibited
##P3 t=008: ConnectionInfo::refreshPPPStats
##P3 t=011: PPPDThread still running
##P4 t=011: ConnectionInfo::refreshSignalQuality(void)
##P3 t=011: ConnectionInfo probe inhibited
##P3 t=011: ConnectionInfo::refreshPPPStats
##P2 t=012: PPPThread::run, after runCommand
##P2 t=014: isDone is true
I haven't made any changes to the /etc/ppp/options file or the /etc/resolv.conf file. I disabled the PIN using umtsmon because it was just one more headache to deal with.
I've spent the last couple of days looking for a solution. Any help would be appreciated!
 
Old 10-28-2009, 04:18 AM   #2
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
You might try kppp. It worked for me with a Huawei E220 modem.

I have made some screenshots (in swedish but perhaps useful..):
http://linuxconfig.dyndns.org/lazy/L...tworking_(DUN)
 
Old 10-29-2009, 02:51 AM   #3
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
That chatscript looks daunting! But thanks for the suggestions. I shall give it a try.
 
Old 10-29-2009, 03:15 AM   #4
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
Quote:
Originally Posted by tux_addict View Post
That chatscript looks daunting! But thanks for the suggestions. I shall give it a try.
The chatscript is only used with pppd. Kppp is configured with the GUI.

Sorry for the confusing layout.
 
Old 10-30-2009, 09:48 PM   #5
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
Hi uppman! Using your KPPP setup I finally managed to get a connection. But unfortunately, this doesn't mean that everything's hunky dory! For some reason, I keep being disconnected, and it's quite frustrating. Is there anything I can do about this, e.g., some way to optimize the scripts, or is this more likely to be a mobile carrier problem?
Also, how do you invoke pppd? Do you say "sudo pppd call <name of provider>," or do you say something else? Also, should I create a file in /etc/ppp/peers such as "/etc/ppp/peers/safaricom" in order to use pppd?
Finally, here's my /etc/ppp/ip_up script based on the one you've provided. Does it look right?
Quote:
#/etc/ppp/ip_up
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
echo -e "nameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf
#case "$5" in
/sbin/route add default gw $5
#esac
exit 0
Connect!
pppd /dev/rfcomm0 115200 connect "chat -V -f /etc/ppp/plusgsm" crtscts modem -detach noccp defaultroute noauth ipcp-accept-remote ipcp-accept-local noipdefault usepeerdns debug
It would also be nice if you could post your wvdial.conf file - assuming you have one. I appreciate your suggestions after a frustrating week of trying to get this thing to work on Slackware!
 
Old 10-30-2009, 09:53 PM   #6
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
I just noticed that Linuxquestions formatted the the /etc/ppp/ip_up script above in such a way that some of the lines that should be commented out have not been commented out.
 
Old 10-31-2009, 03:34 AM   #7
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
A while ago I tried this, too, but unfortunately I did not keep any notes about what exactly was successful, in the end. But the good news is: At some point I got it working.

What I do remember is, that it was not necessary to write any script manually. The trick was, that first I had to get a UMTS connection, using KPPP, as far as I recall, and then to use usbmon or some other program (I think I used wicd, also), to initiate a dialogue asking for my user PIN. Only after entering the PIN I was able to surf using the UMTS connection.

I also remember, that I succeeded only after cutting all other network connections, because I always had internet, but was unable to tell if it was a DSL or UMTS connection. So switch off all wireless or cable connection, until you have no internet connection anymore, and then try a combination of KPPP and umtsmon. No need for scripting manually!

gargamel
 
Old 10-31-2009, 04:00 AM   #8
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Not the same modem, but still a Huawei. Modify for your E160.
Did submit this as a tutorial about 4 weeks ago, but not published yet.




# How to get the Huawei 1550 3G (Three UK) mobile # broadband dongle modem working in Slackware 13.

# This device is not currently supported directly # yet by the kernel and when plugged in looks like # an external drive.
# To get it to work as a modem the follwing steps # will get it working.

# Thanks to all the sources I pulled this together # from

# Prerequisites
# Need to belong to sudoers

## Step 1.

# Download usb_modeswitch from # http://www.draisberghof.de/usb_modeswitch

# This is a Debian package, so a couple of extra # steps are needed.

# Extract to a directory of your choice, the cd to # that directory.

# Either trash or delete the current binary file, # the run the usual make and make install # (as root) to install the resulting binary to # /usr/sbin/usb_modeswitch, and the config file to # /etc/usb_modeswitch.conf

# Step 2

# Plug in the 3g Mobile dongle, open a konsole or # switch to cli mode and run (as root) dmesg and # make a note of the dongle device id. Should see # something similar to this

usb 1-6: New USB device found, idVendor=12d1, idProduct=1446
usb 1-6: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-6: Product: HUAWEI Mobile
usb 1-6: Manufacturer: HUAWEI Technology
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning

# In this example, I am looking for the idVendor # and idProduct strings. 12d1 and 1446 # respectively

# Unplug the dongle. (Be sure to eject safely if # notified it has been detected as a usb storage # device)

## Step 3

# Now edit and save the config file # /etc/usb_modeswitch.conf using your favourite # text editor and add the following line in the # Huawei section: (well commented so quite easy)

########################################################

# Huawei E1550

DefaultVendor= 0x12d1
DefaultProduct= 0x1446
MessageEndPoint= "0x01"
MessageContent="55534243123456780000000000000011060000000000000000000000000000"


;DetachStorageOnly=1
;HuaweiMode=1

########################################################

# Replace the DefaultVendor and DefaultProduct ids # with whatever you discovered in step 2

## Step 4

# Now create a new udev rule for the dongle to # have it automagically switch to modem mode. # I called mine 45-3G.rules, but you can name # yours whatever you like, and place in the # /etc/udev/rules.d directory. It should look like # this:

ACTION=="add" SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch"

# Again, use your own idProduct and idVendor codes

# Now either reboot, or issue (as root)
/etc/rc.d/rc.udev reload
# to see your new rule.

## Step 5

# Plug the dongle back in and wait around 15 # seconds then issue the dmesg command again and # you should see this or similar:

usb 1-6: new high speed USB device using ehci_hcd and address 9
usb 1-6: configuration #1 chosen from 1 choice
scsi27 : SCSI emulation for USB Mass Storage devices
scsi28 : SCSI emulation for USB Mass Storage devices
usb 1-6: New USB device found, idVendor=12d1, idProduct=1446
usb 1-6: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-6: Product: HUAWEI Mobile
usb 1-6: Manufacturer: HUAWEI Technology
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usb 1-6: usbfs: process 24002 (usb_modeswitch) did not claim interface 0 before use
usb 1-6: USB disconnect, address 9
usb_storage: module is already loaded
usb_storage: module is already loaded
usb 1-6: new high speed USB device using ehci_hcd and address 10
usb 1-6: configuration #1 chosen from 1 choice
usb-storage: probe of 1-6:1.0 failed with error -5
option 1-6:1.0: GSM modem (1-port) converter detected
usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0
usb-storage: probe of 1-6:1.1 failed with error -5
option 1-6:1.1: GSM modem (1-port) converter detected
usb 1-6: GSM modem (1-port) converter now attached to ttyUSB1
usb-storage: probe of 1-6:1.2 failed with error -5
option 1-6:1.2: GSM modem (1-port) converter detected
usb 1-6: GSM modem (1-port) converter now attached to ttyUSB2
scsi32 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
scsi33 : SCSI emulation for USB Mass Storage devices
usb 1-6: New USB device found, idVendor=12d1, idProduct=1001
usb 1-6: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-6: Product: HUAWEI Mobile
usb 1-6: Manufacturer: HUAWEI Technology
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
scsi 32:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
sr0: scsi-1 drive
sr 32:0:0:0: Attached scsi CD-ROM sr0
sr 32:0:0:0: Attached scsi generic sg0 type 5
usb-storage: device scan complete
scsi 33:0:0:0: Direct-Access HUAWEI MMC Storage 2.31 PQ: 0 ANSI: 2
sd 33:0:0:0: [sda] Attached SCSI removable disk
sd 33:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete

# Notice that the idPrduct string has now changed # to 1001.
# This means that the process has been successful, # and as can be seen, the dongle is now identified # as a GSM modem.

## Step 6

# Use your favourite dial up tool to connect to # the 3G (Three UK) network. The parameters are
# Device node is /dev/ttyUSB0
# Number to dial: *99#
# Login ID: Three
# Passowrd: Three

## Step 7 (optional)

# Download and install UMTSmon form
# http://umtsmon.sourceforge.net/ for an easy GUI
# interface.

END
 
Old 11-01-2009, 05:22 AM   #9
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
Quote:
Originally Posted by tux_addict View Post
Hi uppman! Using your KPPP setup I finally managed to get a connection. But unfortunately, this doesn't mean that everything's hunky dory! For some reason, I keep being disconnected, and it's quite frustrating. Is there anything I can do about this, e.g., some way to optimize the scripts, or is this more likely to be a mobile carrier problem?
Also, how do you invoke pppd? Do you say "sudo pppd call <name of provider>," or do you say something else? Also, should I create a file in /etc/ppp/peers such as "/etc/ppp/peers/safaricom" in order to use pppd?
Finally, here's my /etc/ppp/ip_up script based on the one you've provided. Does it look right?

It would also be nice if you could post your wvdial.conf file - assuming you have one. I appreciate your suggestions after a frustrating week of trying to get this thing to work on Slackware!
I'm glad to hear that you got it (somewhat) working!

I don't have and never have had a wvdial.conf file. I started out using pppd but nowadays I only use kppp.

You need to create the plusgsm chatscript with the operator info for pppd to work.
The ip_up script ends after exit 0... Sorry about the unclear layout, I have tried to tidy it up a bit.

You might find an answer to the disconnect problem in /etc/ppp/options.
 
Old 05-16-2011, 11:06 AM   #10
tix
Member
 
Registered: May 2011
Posts: 31
Blog Entries: 6

Rep: Reputation: 1
Huawei E160 - Connecting is Slackware 13 (solution)

To get your USB dongle (Huawei E160 or Huawei E220) to work: (Slackware Linux 13.0 - kernel 2.6.38.6 but may work on other linux versions)

Step 1: Ensure PPP is compiled into your kernel

Step 2: Ensure that you kernel does not spew any errors or does not panic (see kernel compilation howto in /usr/doc/Linux-HOWTOs)

Step 3: Ensure that your kernel supports USB storage

Step 3a: Ensure that kernel supports USB-Serial (generic usb_serial driver should work)

Step 4: obtain software called comgt (http://sourceforge.net/projects/comgt/)

Step 5: Boot your computer (LOL!)

Step 6: At command prompt login (duh!)

Step 7: su as root user (login as regular user, issue command "su" and put root password - risky to login directly as root)

Step 8: Uncompress comgt.032.tgz (tar -xvzf comgt.032.tgz)

Step 9:build the comgt and install comgt

Step 10:insert Huawei modem

Step 11: Huawei modem shall be detected as CD-ROM drive (/dev/sr1 or /dev/sdb) instead of a 3g modem (check using "dmesg")

Step 12: To switch modes of modem from CD-ROM to a modem, you need to eject the Huawei CD-ROM device using the command (eject
/dev/sr1 or eject /dev/sdb or eject /dev/<whatever is in you dmesg>)

Step 13: To switch modes of huawei modem, use comgt
"comgt -x -d /dev/-usb device-" where -usb device- is ttyUSB0 or ttyUSB1 -- e.g. "comgt -x -d /dev/ttyUSB0"
Some message should display giving you the network provide name and the signal strength!

Step 14: point /dev/modem to your Huawei modem at e.g. /dev/ttyUSB0. If /dev/modem does not exist, then create it LOL! "ln -s /dev/ttyUSB0 /dev/modem"

Step 15: Exit as root user and login as regular user! (if using "su" simply type exit)

Step 16: Start your dialer program - wvdial or kppp

Step 17: konfigure your dialer and dial!

Step 18: A new device "ppp0" will be listed in list of networking hardware (check this using "ifconfig")

Step 19: make sure your put your DNS server addresses in "/etc/resolv.conf" in format "nameserver -DNS server-" where -DNS server- is ip address of DNS server of your ISP

Step 20: enjoy surfing!
-END-

Last edited by tix; 05-17-2011 at 11:44 AM. Reason: whoops...ttyUSB0 not USBtty0
 
Old 05-16-2011, 06:59 PM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
My way is detailed here. http://www.linuxquestions.org/questi...4/#post4213848

Step 1. Create a chat script.
Step 2. Make /etc/ppp/ip-pre-up a symlink to a suitable firewall script.
Step 3. Invoke pppd. (Put the command in a script for later convenience).
Step 4. Copy /etc/ppp/resolv.conf to /etc/resolv.conf.
Step 5. Enjoy surfing!
 
Old 05-17-2011, 11:14 PM   #12
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks tix and allende. I will follow up on your suggestions!
 
  


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
SMStools and Huawei E220 3G modem makobu Linux - Software 0 08-10-2008 01:46 PM
how to use huawei modem to linux jothikrish Linux - Software 1 05-02-2008 10:44 AM
Huawei Wireless Modem AtinLango Linux - General 0 02-19-2006 04:22 AM
VLC Giving me Grief croakofonix Linux - Software 0 08-28-2004 08:24 PM
ATI giving me grief dtjohnst Slackware 12 04-21-2004 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:18 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