LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Setting up 3g modem (Huawei E220) (http://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-3g-modem-huawei-e220-647583/)

Arla 06-07-2008 05:49 AM

Setting up 3g modem (Huawei E220)
 
Hi.

I'm trying to get a Huawei E220 (http://en.wikipedia.org/wiki/Huawei_E220) up and running on Gentoo, but can't seem to get it right.

Searching the net, I have stumbled upon quite a number of howtos, but none of them seems to take me where I want. Here are two methods which have been fairly successful. I'd be grateful to any guidance helping me to proceed with any of them.

Firstly, there is a device- and distro specific guide at http://www.gentoo-wiki.com/HARDWARE_...SDPA_USB_MODEM using pon, whatever that is (some kind of interface to chat, which talks to the modem device, if I got man page descriptions right).

The problem here is I don't really know what to do after running pon E220 (I get along with the howto as far as that). Should there be an established ppp connection at that point? (And how do those connections even work? I have previously only used net.eth and net.wlan Gentoo Linux init scripts.)

Also, the "connection" (?) goes down after roughly one minute, which I could tell from the output of poff at different time periods after pon being run:

Code:

ezekiel arla # pon E220;sleep 40;poff E220
ezekiel arla # pon E220;sleep 50;poff E220
/usr/sbin/poff: No pppd is running.  None stopped.

Secondly, various guides refer to wvdial (http://en.wikipedia.org/wiki/Wvdial if you want). They mainly say the same stuff, and differ only little by the configuration files (of course, since these are specific on many points).

With this method, I've got as far as the following lines being printed, and then nothing until I Ctrl+C. Meanwhile, a ppp0 interface is visible from ifconfig.
Code:

--> pppd: �@��[06][08]Ш[06][08]
--> pppd: �@��[06][08]Ш[06][08]
--> pppd: �@��[06][08]Ш[06][08]
--> pppd: �@��[06][08]Ш[06][08]
--> pppd: �@��[06][08]Ш[06][08]
--> local  IP address 10.142.159.101
--> pppd: �@��[06][08]Ш[06][08]
--> remote IP address 10.64.64.64
--> pppd: �@��[06][08]Ш[06][08]
--> primary  DNS address 10.11.12.13
--> pppd: �@��[06][08]Ш[06][08]
--> secondary DNS address 10.11.12.14
--> pppd: �@��[06][08]Ш[06][08]

Read my wvdial.conf (http://rafb.net/p/wTgulE70.html) and the full output (http://rafb.net/p/uaBekr19.html)

pinniped 06-09-2008 02:54 AM

1. To work with that modem without hassles, use a kernel with version 2.6.21 or later. The 'options' and 'usbserial' drivers should be loaded; you can check the dmesg logs to see if they have loaded:

dmesg | less

2. 'pon' is a script that makes it a little easier to operate 'pppd'; it's not essential but it's not difficult to use; in the simplest case it only invokes pppd something like this:
pppd call dsl-provider

To configure pppd, try using the 'pppconfig' scripts. Otherwise you need to create a 'peers' file in /etc/ppp/peers - something with a name like 'vodafone' (if you use vodafone as the ISP; the name is only to help you remember what is in the configuration file). The peers file might look something like this:

lock
connect "/usr/sbin/chat -v -f /etc/chatscripts/vodafone"
/dev/ttyUSB0
hide-password
noauth
debug
novj
460800
defaultroute
user ' '
password ' '
modem
crtsctsusepeerdns
nodeflate
nobsdcomp

Notice that 'connect' will need to read a script /etc/chatscripts/vodafone in this example. That 'connect script' may look something like this:

ABORT BUSY
ABORT ERROR
ABORT 'NO ANSWER'
REPORT CONNECT
TIMEOUT 30
"" ATZ
OK 'AT+CGDCONT=1,"IP","vfinternet.au"'
OK 'ATDT*99***1#'
TIMEOUT 30
CONNECT \d\c

Look at the line with 'AT+CGDCONT'; you need to configure this to suit your ISP. Most ISPs will use the options 1,"IP", and the main difference is in the Access Provider Name (APN): 'vfinternet.au' in this case.

Arla 06-12-2008 03:29 PM

pinniped>

Informative and educational, however the result of using pon with those configuration files doesn't differ at all from the result using the configuration featured in the guide referred to, i.e. no connection, nothing on ifconfig, and it goes down after a minute or so.

The problem remains the same.

Arla 06-12-2008 04:47 PM

A third method, Gentoo-specific
 
I just read about a third method, at gentoo-wiki.com (http://gentoo-wiki.com/HOWTO_Setup_a..._Configuration) It suggests that I edit (the Gentoo-specific?) /etc/conf.d/net with options for Gentoo's handling of pppd. I'm now trying to compose a chat script in there, and I think I'm really on to something.

I should turn to the Gentoo forums and see if they can help me out.

pinniped 06-13-2008 02:17 AM

You can also look at /var/log/messages to see why pppd is failing.


All times are GMT -5. The time now is 12:54 AM.