# Mobile Internet: K3805-Z

## arhenius

Dear all:

I'm thinking on subscribing a mobile internet service. It is likely that I'll go by vodafone's service, which implies using the huawei k3565 modem. I have never used usb internet connections in linux, but I guess the network part only need to have PPPoE and some related features active on the kernel .config. Now what I am really worried about is whether this modem works with the current version of gentoo-souces. Are there any success stories? Which kernel features do you need to activate? Can you use wicd or is it better to use networkmanager?

I'm asking because there is a mandatory 1-year subscription to this service and I'll have to pay for it even if the modem does not work on my gentoo laptop.

These are some other modems (all from huawei, I think) available from the mobile ISPs (if somebody thinks they are better to work with gentoo):

K4505

E180

E1750

E1820

Thanks in advance for your advise.

Best Regards

Filipe

----------

## vr13

hi,

these devices are all supported by linux pretty good - when plugged in, one is handled by usbserial kernel driver (configured as module and loaded with udev rule). from the userspace is visible as /dev/ttyUSB[0-2] working as async tty which is subsequently operated by ppp (not pppoe)

depending on a particular device model you may need to install sys-apps/usb_modeswitch (i personally use zte mf637 which does not require it)

----------

## NeddySeagoon

arhenius,

I have Vodaphones pay as you go £15/G service. They gave me a k3565. You can use the modem and the FLASH drive in Linux without  sys-apps/usb_modeswitch but Windows only sees the modem.  I have never installed any Windows driver for it though, at leaste, not to use in anger.

In the kernel, you will find a module called Option - this needs to be loaded to get your /dev/ttyUSB0 and friends. /dev/ttyUSB0 is the modem, you can talk to it with AT commands and minicom.  /dev/ttyUSB1 can be used for status information but I'm not aware of any Linux apps that can use it.

The hard part is getting registered without Windows, as part of the process involves sending the modem a text, which you have to use on the registration website.

I gave up and used the Windows drivers in VMware. IF you have a vodaphone mobile, a SIM swap might work. 

Once /dev/ttyUSB0 is there, it works with wvdial and with NetworkManager. I bought mine because the hotels I was put in on business travel wanted stupid money for WiFi access, so it paid for itself in a few weeks.

----------

## arhenius

Dear All.

Thank you for your feedback. I ended up buying Vodafone's K3805-Z connect pen. It is working fine in Windows, but putting it to work in Gentoo has become a little more difficult that what I was expecting.

I have PPP and option support in the kernel, and /dev/ttyACM[0-1] are created when I plug the device. I removed wicd and installed NetworkManager (nm), which is working fine for ethernet and wireless communications. 

K3805-Z is detected by nm and the configuration wizard allows me to select my contry, ISP and setup the proper APN. However, when I try to connect, nm asks me for the PIN, and then simply shuts off the connection without an error message. In further attempts, it deems that nm tries to establish a connection for less than 1 second and then aborts.

The light in the modem is usually flashing blue or light blue, which according to the manual means there is good signal strength, but not an active connection.

I cannot find an error log for this, so any help is most welcomed.

Thanks in advance

----------

## NeddySeagoon

arhenius,

Make it work with wvdial from the command line. NetworkManager is a good idea but it gives me mixed results.

With wvdial you will need to attempt to connect twice, one for the pin and once for real.  Heres mv wvdial to get you started.

```
[Dialer defaults]

Modem = /dev/ttyUSB0

Init1 = ATZ

Phone = *99#

Username = *

Password = *

Init2 = AT+CGDCONT=1,"IP"

[Dialer vodaphone]

Modem = /dev/ttyUSB0

Baud = 115200

Init2 = AT+CGDCONT=1,"IP","internet.tele2.se"

Phone = *99#

Username = *

Password = *

New PPPD = yes

Auto DNS = 1

[Dialer pin]

Modem = /dev/ttyUSB0

Baud = 115200

Init1 = AT+CPIN=1234
```

I have disabled the PIN on my PAYG as the worst thing that can happen is I lose the device and remaining credit.

I only use the [Dialer defaults] section.

----------

## arhenius

Dear all.

Thanks NeddySeagoon for your advise. I made some small, obvious changes to your file and I am currently sending this message using the mobile broadband service (although I'm at home with the ethernet cable just 2 cm away from the laptop   :Laughing:  )

There are still some small matters to deal with. If anyone could assist me dealing with this, I would be much obliged:

First, I cannot use vwdialas a normal user, the result being: 

```
 Cannot open /dev/modem: Device or resource busy
```

I suppose I'll have to alter some udev od hal policy rule, but I don not know which.

 As root, I cannot start the modem up with wvdial (the first part about the pin): I have to do that as a normal user using NetworkManager/nm-applet. Then I have to stop NetworkManager and use wvdial to start the connection. I'm certain there has to be a better way to do things. Either way, this is my .wvdialrc (the 9999 pin is a fake, and I tried it as integer and as a string):

```

[Dialer defaults]

Modem = /dev/ttyACM0

Init1 = ATZ

Phone = *99#

Username = *

Password = *

Init2 = AT+CGDCONT=1,"IP"

[Dialer vodafone]

Modem = /dev/ttyACM0

Baud = 115200

Init2 = AT+CGDCONT=1,"IP","internet.vodafone.pt"

Phone = *99#

Username = *

Password = *

New PPPD = yes

Auto DNS = 1

[Dialer pin]

Modem = /dev/ttyACM0

Baud = 115200

Init1 = AT+CPIN=9999 (also tried as "9999")

```

 And this is the result when I try wvdial pin, as root:

```
 dirac ~ # wvdial pin

--> WvDial: Internet dialer version 1.61

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: AT+CPIN="9066"

AT+CPIN="9066"

ERROR

--> Bad init string.

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: AT+CPIN="9066"

AT+CPIN="9066"

ERROR

--> Bad init string.

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: AT+CPIN="9066"

AT+CPIN="9066"

ERROR

--> Bad init string.

```

Thanks in advance,

----------

