Internet connection with Ubuntu and USB phone

All OS other than Windows open for discussion and problem solving.

Moderators: JeanInMontana, rockingmtranch, ShadowPuterDude, admin, MysteryFCM, Owner

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Internet connection with Ubuntu and USB phone

Postby rockingmtranch » Wed Apr 02, 2008 3:43 pm

We have a D-Link router that takes a phone card (3G) and connects to our ISP then shares the connection between our home desktop computers. We've had this setup for about two years. So, our two year contract with Verizon is coming up and I went for a phone upgrade. What I wanted (another of the same but upgraded), they didn't have. Instead, they sent me home with a Pantech UM150 USB that is a phone (air card) and 4 GIG flash drive. It doesn't work with my router so I plugged it into my Ubuntu box to see what I could do with it. And, here are the results:

Using the information on this website http://kenkinder.com/evdo-pc5740/ I was able to get the phone working with a little script writing. First thing was to install the device. From a terminal as root

modprobe ohci-hcd

Then, I need the usbserial. This I found in hardware information and in terminal

modprobe usbserial vendor=0x106c product=0x3711

This gave me a file:

mac@mac-desktop:~$ ls /dev/ttyACM0
/dev/ttyACM0

Create a file called /etc/ppp/peers/1xevdo with this command (as root)

gedit /etc/ppp/peers/1xevdo

And put this into it:

-detach
ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 30000
user yourphonenumber@vzw3g.com
show-password
crtscts
lock
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'

Now create a file called /etc/ppp/peers/1xevdo_chat

# AT$QCMIPGETP "login" name used for MobileIP, which usually matches your MIN.
# AT+GSN ESN in hex
# AT+GMR firmware revision and build date.
# AT+CSQ first number indicates the signal strength above -109 dBm (in
# 2 dBm increments). A value of 7 or higher (-95 dBm) can be
# considered adequate. 31 is the max. (Possible values in
# Pantech USB Modem are 0, 7, 15, 23, 31.)
# AT+CDV=*22899 Update PRL. at+cdv=*22899 | OK | Lost carrier.
'' 'AT'
'OK' 'ATE0V1&F&D2&C1&C2S0=0'
'OK' 'ATE0V1'
'OK' 'ATS7=60'
'OK' 'ATDT#777'

Note: the '' 'AT' is not quote marks but two '

Save and you're done.

In terminal (root or user...user is always safer), type:

pppd call 1xevdo

And give it 20 or 30 seconds, You should see something similar to this:

mac@mac-desktop:~$ pppd call 1xevdo
Serial connection established.
using channel 12
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1b1786c0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <mru 1500> <asyncmap 0x0> <magic 0x806d9c57> <pcomp> <accomp>]
sent [LCP ConfAck id=0x0 <mru 1500> <asyncmap 0x0> <magic 0x806d9c57> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x1b1786c0> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP DiscReq id=0x1 magic=0x806d9c57]
rcvd [IPCP ConfReq id=0x0 <addr 66.174.33.197>]
sent [IPCP ConfAck id=0x0 <addr 66.174.33.197>]
rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfNak id=0x2 <addr YOUR LOCAL> <ms-dns1 YOUR LOCAL> <ms-dns3 YOUR LOCAL>]
sent [IPCP ConfReq id=0x3 <addr YOUR LOCAL> <ms-dns1 YOUR LOCAL> <ms-dns3 YOUR LOCAL>]
rcvd [IPCP ConfAck id=0x3 <addr YOUR LOCAL> <ms-dns1 YOUR LOCAL> <ms-dns3 YOUR LOCAL>]
Cannot determine ethernet address for proxy ARP
local IP address YOUR LOCAL
remote IP address YOUR LOCAL
primary DNS address YOUR LOCAL
secondary DNS address YOUR LOCAL
Script /etc/ppp/ip-up started (pid 31623)
Script /etc/ppp/ip-up finished (pid 31623), status = 0x0

And that's it. Minimize the terminal window and open a browser. I have yet to be disconnected and have download speeds of around 200kbs. When I'm done, I hit Ctrl-C and it disconnects. I then take the device out and put it into my other Linux box, same set up, and dial the pppd the same way and it connects. Simple as pie and I want to thank Ken Kinder and his website www.kenkinder.com
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Postby rockingmtranch » Thu Apr 10, 2008 12:40 am

I upgraded from 7.10 Gutsy Gibbon to 8.04 Hardy Heron (Beta) tonight and the only glitch I ran into was having to reinstall (modprobe) the USB phone. Just the first few steps. Make sure the phone is plugged in while typing in the commands and you should be able to dial in as usual.

8)
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Postby rockingmtranch » Fri Apr 11, 2008 5:16 pm

Ok. Trying out some different things just, well, just because it's fun. There seems to be a lot of ways to get this phone/modem to work. If you have your USB phone up and running with the above instructions and want to go for broadband speed, try this. I did it and it works fine, connects in about 3 seconds, but I'm not sure the speed online is any different. If you just want the faster connect, give it a shot. I got this info at http://ubuntuforums.org/showthread.php?t=343989&page=2

We're using a different driver. Take out the phone and type at terminal (you may have to use sudo):

:~$ modprobe airprime

Check your dmesg for:

[ 1618.912000] usbcore: registered new interface driver airprime

Then plug in the phone and you should see:

[ 1620.504000] usb usb6: configuration #1 chosen from 1 choice
[ 1620.504000] hub 6-0:1.0: USB hub found
[ 1620.504000] hub 6-0:1.0: 1 port detected
[ 1621.884000] usb 5-1: new full speed USB device using ohci_hcd and address 2
[ 1622.096000] usb 5-1: configuration #1 chosen from 1 choice
[ 1622.096000] cdc_acm 5-1:1.0: ttyACM0: USB ACM device

Now, if all looks well, do a quick script so you can use wvdial instead of pppd (don't change any of your other scripts):

sudo gedit /etc/wvdial.conf

Here's your script:

[Dialer Defaults]
Stupid Mode = on
Modem = /dev/ttyACM0
Baud = 921600
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone = #777
Username = ??????????@vzw3g.com
Password = vzw
Init1 = ATZ
ISDN = 0
Modem Type = Analog Modem
Auto Reconnect = on
Carrier Check = no
[Dialer shh]
Init3 = ATM0
[Dialer pulse]
Dial Command = ATDP

In the Modem line, put ACM0 or USB0, whatever your dmesg tells you. You know what to do with the question marks in username by now.

One more script:

sudo gedit /etc/ppp/peers/wvdial

Add these two lines:

lcp-echo-failure 0
lcp-echo-interval 0

Save your file and type wvdial in your terminal. If you're as lucky as I, you see a connect in seconds.

Thanks to Mach1US and FlyingHat at the Ubuntu forums.

I'll be doing more of these as I find them. As I said, just because it's fun :D
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Re: Internet connection with Ubuntu and USB phone

Postby rockingmtranch » Sat May 03, 2008 8:13 pm

Using the same above instructions I have been successful getting the phone to work in DreamLinux and Klikit-Linux. Klikit has some excellent, steady, download and upload speeds with the same scripts and install. Don't know why but I like :D
And, if anyone finds anything better or knows a better way, please feel free to add it here 8)
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Re: Internet connection with Ubuntu and USB phone

Postby rockingmtranch » Sat May 31, 2008 5:59 pm

I hope you've read down this far. Just found this thread at Ubuntu Forums http://ubuntuforums.org/showthread.php?t=487298 and found THE easiest way yet to get the 3g cards and USB phones working with any distro that comes with wvdial (I believe most do). Just plug in your phone, bring up a terminal and type sudo wvdialconf and the phone will be detected and the scripts written. That's all there is to it. Just type wvdial as usual and your connected! :celb:

Edit: I should add, it may seem like magic but it's not completely. You'll still have to go into the two files mentioned above and place your personal information and the lcp info.
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA

User avatar
rockingmtranch
I Have Powah
I Have Powah
Posts: 1893
Joined: Sat Jun 09, 2007 11:13 pm
Location: Meadowbrook, CA
Contact:

Re: Internet connection with Ubuntu and USB phone

Postby rockingmtranch » Fri Jul 11, 2008 12:02 pm

Oh, and by the way, I purchased a Kyocera 2 wireless router, plugged in my USB phone and the router did the rest. I have four computers connected (one wireless) and they all have great connections. They stay connected and download speeds of over 300 kbps.
Linux. Don't fight it. You will be assimilated.
*******
Gulf War Vet--2nd Squadron, 2nd Armored Cavalry--Fort Polk, LA


Return to “Linux - Unix et al”

Who is online

Users browsing this forum: No registered users and 2 guests