# Having trouble with 3G connection - Huawei E160E + Virgin AU

## StevePER

Hi,

I've just got a USB 3G modem and I'm trying to get it working in Gentoo. I tried it briefly in Windows so I know it should work. I'm using this page for guidance. That page lists three methods; I would prefer to use the /etc/conf.d/net method. I've configured mine exactly the same, but with no PIN and with the APN set to VirginBroadband (in accordance with this.

But I can't get it to work with either /etc/conf.d or wvdial. I'm having trouble to find useful information about how to debug this.

So here's what happens:

```
# lsusb

Bus 001 Device 004: ID 12d1:140c Huawei Technologies Co., Ltd. 
```

dmesg shows GSM modem (1-port) converter now attached to ttyUSB0, ttyUSB1, ttyUSB2 and ttyUSB3. I don't know why all four are listed. 

/var/log/messages after running /etc/init.d/net.ppp0 start:

```
Feb  1 04:52:54 carpc pppd[24373]: Plugin passwordfd.so loaded.

Feb  1 04:52:54 carpc pppd[24374]: pppd 2.4.4 started by root, uid 0

Feb  1 04:52:55 carpc chat[24384]: expect ( ^J  'ABORT' 'BUSY'^J  'ABORT' 'NO ANSWER'^J  'ABORT' 'NO CARRIER'^J  'ABORT' 'NO DIALTONE'^J  'ABORT' 'Invalid Login'^J  'ABORT' 'Login incorrect'^J  'TIMEOUT' '5'^J  '' 'ATZ'^J  'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'^J  'OK' 'AT+CGDCONT=1,"IP","VirginBroadband"'^J  'OK' 'ATDT\T'^J  'CONNECT' ''^J  '~)

Feb  1 04:53:40 carpc chat[24384]: alarm

Feb  1 04:53:40 carpc chat[24384]: send (^M)

Feb  1 04:53:40 carpc chat[24384]: expect (' ''^J)

Feb  1 04:54:25 carpc chat[24384]: alarm

Feb  1 04:54:25 carpc chat[24384]: Failed

Feb  1 04:54:25 carpc pppd[24374]: Script /usr/sbin/chat -e -E -v -T '*99#' ' 

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''BUSY'\''

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''NO ANSWER'\''

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''NO CARRIER'\''

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''NO DIALTONE'\''

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''Invalid Login'\''

Feb  1 04:54:25 carpc '\''ABORT'\'' '\''Login incorrect'\''

Feb  1 04:54:25 carpc '\''TIMEOUT'\'' '\''5'\''

Feb  1 04:54:25 carpc '\'''\'' '\''ATZ'\''

Feb  1 04:54:25 carpc '\''OK'\'' '\''ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'\''

Feb  1 04:54:25 carpc '\''OK'\'' '\''AT+CGDCONT=1,\"IP\",\"VirginBroadband\"'\''

Feb  1 04:54:25 carpc '\''OK'\'' '\''ATDT\T'\''

Feb  1 04:54:25 carpc '\''CONNECT'\'' '\'''\''

Feb  1 04:54:25 carpc '\''~--'\'' '\'''\''

Feb  1 04:54:25 carpc ' finished (pid 24384), status = 0x3

Feb  1 04:54:25 carpc pppd[24374]: Connect script failed

```

Using wvdial it looks like it works (sort of - the output isn't very clear), but it doesn't get an IP so the connection doesn't actually work.

Output from wvdial connect:

```

--> WvDial: Internet dialer version 1.61

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

ATZ

OK

--> Sending: ATQ0 V1 E1 S0=0 +FCLASS=0

ATQ0 V1 E1 S0=0 +FCLASS=0

OK

--> Sending: AT+CGDCONT=1,"IP","VirginBroadband"

AT+CGDCONT=1,"IP","VirginBroadband"

OK

--> Modem initialized.

--> Sending: ATDT*99#

--> Waiting for carrier.

ATDT*99#

CONNECT

--> Carrier detected.  Starting PPP immediately.

--> Starting pppd at Tue Feb  1 04:55:29 2011

--> Pid of pppd: 24739

--> Using interface ppp0

--> pppd: P�o��,� P[1c]� [01]

--> pppd: P�o��,� P[1c]� [01]

--> pppd: P�o��,� P[1c]� [01]

--> pppd: P�o��,� P[1c]� [01]

--> pppd: P�o��,� P[1c]� [01]

--> local  IP address 119.12.50.9

--> pppd: P�o��,� P[1c]� [01]

--> remote IP address 10.64.64.64

--> pppd: P�o��,� P[1c]� [01]

--> primary   DNS address 10.11.12.13

--> pppd: P�o��,� P[1c]� [01]

--> secondary DNS address 10.11.12.14

--> pppd: P�o��,� P[1c]� [01]

```

/var/log/messages after running wvdial connect:

```

Feb  1 04:55:29 carpc pppd[24739]: pppd 2.4.4 started by root, uid 0

Feb  1 04:55:29 carpc pppd[24739]: Using interface ppp0

Feb  1 04:55:29 carpc pppd[24739]: Connect: ppp0 <--> /dev/ttyUSB0

Feb  1 04:55:29 carpc pppd[24739]: CHAP authentication succeeded

Feb  1 04:55:29 carpc pppd[24739]: CHAP authentication succeeded

Feb  1 04:56:25 carpc pppd[24739]: Could not determine remote IP address: defaulting to 10.64.64.64

Feb  1 04:56:25 carpc pppd[24739]: local  IP address 119.12.50.9

Feb  1 04:56:25 carpc pppd[24739]: remote IP address 10.64.64.64

Feb  1 04:56:25 carpc pppd[24739]: primary   DNS address 10.11.12.13

Feb  1 04:56:25 carpc pppd[24739]: secondary DNS address 10.11.12.14

```

----------

## NeddySeagoon

StevePER,

When ppp0 is up, what does route show ?

----------

## StevePER

 *NeddySeagoon wrote:*   

> When ppp0 is up, what does route show ?

 

After running wvdial connect:

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         10.64.64.64     0.0.0.0         UG    0      0        0 ppp0

```

It's now working with wvdial - looks like /etc/init.d/net.ppp0 was running at the same time as wvdial which was confusing things. So that's good.  :Smile: 

I'm not sure what I need to do to get the /etc/init.d method to work.

Cheers,

Steve

----------

## NeddySeagoon

StevePER,

For baselayout2, the /etc/conf.d/net method is documented in /usr/share/doc/openrc-0.7.0/net.example

If you still use baselayout1 its in /usr/share/doc/.../net.example.  Sorry I don't know the full path. Come to think of it, its four years since I used baselayout1.

----------

## StevePER

 *NeddySeagoon wrote:*   

> For baselayout2, the /etc/conf.d/net method is documented in /usr/share/doc/openrc-0.7.0/net.example
> 
> If you still use baselayout1 its in /usr/share/doc/.../net.example.  Sorry I don't know the full path. Come to think of it, its four years since I used baselayout1.

 

I still don't know what was wrong before, but after migrating to baselayout2 it started working fine. Thanks for pointing me in the right direction!

----------

