PDA

View Full Version : Any linux gurus out there?



pabstblueribbon
04-28-2010, 12:46 PM
So, I've got lich up and running on Xubuntu. I've played with linux a little bit, but I'm apparently not as good as I thought.

Im trying to set up an EVDO usb modem (verizon) on Xubuntu and I'm not having much luck. I'm following these instructions:


You'll need a Verizon card; Verizon provided me with a PC5740 EVDO card that fits in the PC Card slot of any laptop. You'll also need a Linux distribution running X11 with a working copy of Point-to-Point Protocol daemon (pppd), as well as the ability to gain root access and use a terminal.

First, determine the product and vendor number of your EVDO card so you can call the correct kernel modules. If you're using the PC5740, I'll save you a few steps and tell you the numbers; write them down because you'll need them in the following step:

vendor=0x106c product=0x3701

If you're using another EVDO card, before you insert it, open a terminal window and type the following command as root:

cat /proc/bus/usb/devices devices

Then insert the card and type this command as root:

diff /proc/bus/usb/devices devices | grep Vendor

Your vendor and product numbers should come up in this format:

< P: Vendor=106c ProdID=3701
Rev=0.00

Now it's time to add the proper kernel module to include support for your card. Linux sees EVDO cards as USB/serial modems, so issue this command, again as root, inserting the correct numbers for your card:

modprobe usbserial vendor=0x106c product=0x3701

To verify that things are going as they should, change to the /dev directory and list the files there. You should see a file called ttyACM0; this is the name the computer has given your card.

You can use several different programs to make the device ttyACM0 dial out in Linux, but I'll show you how to use pppd because most Linux distributions include it. You could type the necessary pppd commands every time you want to get online, but it's easier to create a simple script. You'll need to know your Verizon-issued 10-digit number because it acts as your username. All the other data is common to all Verizon wireless broadband accounts.

To write the script, open your favorite text editor as root and type the following, replacing xxxxxxxxx with your number:

ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 10000
user xxxxxxxxxx@vzw3g.com
show-password
crtscts
lock
lcp-echo-failure 4
lcp-echo-interval 65535
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'

Name the file 1xevdo and save it in /etc/ppp/peers/. Check out kenkinder.com for a detailed explanation of what some of these script line items are for.

The last line of the script calls another file that you need to create, called 1evdo_chat. Again, as root in your text editor, create a file that contains the following information:

ABORT 'NO CARRIER' ABORT 'ERROR' ABORT 'NO DIALTONE' ABORT
'BUSY' ABORT 'NO ANSWER'
'' ATZ
OK-AT-OK ATDT#777
CONNECT \d\c

Name it 1xevdo_chat and save it in /etc/ppp/peers. This file contains modem commands, including the number 777, which it needs to dial to reach the Verizon EVDO network.

With your EVDO card plugged in, open pppd and call the scripts you just created. In a terminal as a regular user, type pppd call 1xevdo and press Enter. This command doesn't give you any immediate feedback, but you need to see what IP address Verizon assigns your modem, so type this command:

tail -f /var/log/messages

You should see a series of messages in your terminal similar to this:

Feb 15 20:12:48 localhost chat[7946]: abort on (BUSY)
Feb 15 20:12:48 localhost chat[7946]: abort on (NO ANSWER)
Feb 15 20:12:48 localhost chat[7946]: send (ATZ^M)
Feb 15 20:12:48 localhost chat[7946]: expect (OK)
Feb 15 20:12:48 localhost chat[7946]: ATZ^M^M
Feb 15 20:12:48 localhost chat[7946]: OK
Feb 15 20:12:48 localhost chat[7946]: -- got it
Feb 15 20:12:48 localhost chat[7946]: send (ATDT#777^M)
Feb 15 20:12:48 localhost chat[7946]: expect (CONNECT)
Feb 15 20:12:48 localhost chat[7946]: ^M
Feb 15 20:12:50 localhost chat[7946]: ATDT#777^M^M
Feb 15 20:12:50 localhost chat[7946]: CONNECT
Feb 15 20:12:50 localhost chat[7946]: -- got it
Feb 15 20:12:50 localhost chat[7946]: send (\d)
Feb 15 20:12:51 localhost pppd[7945]: Serial connection established.
Feb 15 20:12:51 localhost pppd[7945]: Using interface ppp0
Feb 15 20:12:51 localhost pppd[7945]: Connect: ppp0 /dev/ttyACM0
Feb 15 20:13:01 localhost pppd[7945]: local IP address 70.197.15.21
Feb 15 20:13:01 localhost pppd[7945]: remote IP address 66.174.38.5
Feb 15 20:13:01 localhost pppd[7945]: primary DNS address 66.174.95.44
Feb 15 20:13:01 localhost pppd[7945]: secondary DNS address 66.174.92.14

If the modem doesn't connect or gets disconnected, try again. Exit from pppd by holding down Ctrl-C. If you try to reconnect and you get this message:

Device ttyACM0 is locked by pid 6396

then become root, go to /var/lock, and delete the file that's locking ttyACM0. Type rm filename and press Enter.

Once you're connected successfully, you need to take one more step before you can surf. Look at your terminal message and find the local IP address that Verizon assigned to your card. Then, as root, open another terminal and type the following, inserting your IP address in place of the xxx.xxx.xxx.xxx:

route add default gw xxx.xxx.xxx.xxx

However, when I try the first command: It says that /proc/bus/usb/devices
doesnt exist. So I browed through my file manager thing and yep, sure as heck, there is no usb folder in bus. Also, I was wondering if someone could give me a tip on how to see if I have a program installed thats easier than trying to use the program finder or whatever else Xubuntu comes with.

Is there a terminal command I can use to search for pppd or x11?

Any help would be greatly appreciated.

Cephalopod
04-28-2010, 01:45 PM
Sounds like your kernel may have been built without USB support. Try this, though, just for kicks:



mount --bind /sys/bus/usb /proc/bus/usb


If that doesn't work, post the output of these two commands and I'll see if I can help you more:

lsmod
uname -a

As far as finding pppd:


# whereis pppd
pppd: /usr/sbin/pppd /usr/lib/pppd /usr/share/man/man8/pppd.8.gz

pabstblueribbon
04-28-2010, 01:58 PM
Sounds like your kernel may have been built without USB support.

I'm wondering if I should install a different Linux. Tillmen suggested Xubuntu since I'm a nub.. but I wonder what it lacks compared to the others. I cant even tell what version of Ubuntu it uses, IE dapper, karmic, blah

Weird thing is that the OS is on a usb device. A 400gb external. I'll try those commands when I get home and can access the internet from Linux. I haven't figured out how to make my companies wireless work with Linux yet, or if its even possible.

Thanks.

Cephalopod
04-28-2010, 02:11 PM
I'm wondering if I should install a different Linux. Tillmen suggested Xubuntu since I'm a nub.. but I wonder what it lacks compared to the others. I cant even tell what version of Ubuntu it uses, IE dapper, karmic, blah




#cat /etc/issue


This will work on most Linux distributions.

I've never used Xubuntu, but I've been using Debian (which Ubtuntu is based on) for years... although never for desktop usage.




Weird thing is that the OS is on a usb device. A 400gb external. I'll try those commands when I get home and can access the internet from Linux. I haven't figured out how to make my companies wireless work with Linux yet, or if its even possible.


Everything is possible!

BigWorm
04-28-2010, 02:19 PM
Instead of catting /proc/bus/usb/devices (which really should be there...), you can use lsusb, which will give you the same info in a more readable format. Make sure you are root or using sudo when you do this, which might be why you are getting problems.

Also, what make/model is your usb card?

pabstblueribbon
04-28-2010, 02:35 PM
Supposedly thats what the first few steps in those instructions attempt to figure out. Heading home now. I'll post some more details in a while.

Thanks.

pabstblueribbon
04-28-2010, 10:30 PM
#cat /etc/issue


This will work on most Linux distributions.

I've never used Xubuntu, but I've been using Debian (which Ubtuntu is based on) for years... although never for desktop usage.




Everything is possible!

What a long day.. anyways.


helloworld@ubuntu:~$ ls
Desktop lich-4.1.13.zip Pictures Templates
Documents Music Public Videos
Downloads openssl-0.9.8e ruby-gtk2-0.19.3
lich openssl-0.9.8e.tar.gz ruby-gtk2-0.19.3.tar.gz
helloworld@ubuntu:~$ #cat \etc\issue
helloworld@ubuntu:~$ cat \etc\issue
cat: etcissue: No such file or directory


I did click the ubuntu login thing and I think it said 9.10

pabstblueribbon
04-28-2010, 10:34 PM
Instead of catting /proc/bus/usb/devices (which really should be there...), you can use lsusb, which will give you the same info in a more readable format. Make sure you are root or using sudo when you do this, which might be why you are getting problems.

Also, what make/model is your usb card?

Oooer, I think this is what I need.

It is a novatel wireless USB 727 from Verizon.


helloworld@ubuntu:~$ sudo lsusb
[sudo] password for helloworld:
Bus 003 Device 005: ID 413c:8156 Dell Computer Corp.
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp.
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp.
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0480:a001 Toshiba America Info. Systems, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

pabstblueribbon
04-28-2010, 10:36 PM
And aha!


helloworld@ubuntu:~$ sudo lsusb
Bus 003 Device 005: ID 413c:8156 Dell Computer Corp.
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp.
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp.
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0480:a001 Toshiba America Info. Systems, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 1410:4100 Novatel Wireless U727
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

BigWorm
04-28-2010, 10:37 PM
What a long day.. anyways.



helloworld@ubuntu:~$ cat \etc\issue
cat: etcissue: No such file or directory


Your slashes are backwards.

BigWorm
04-28-2010, 10:47 PM
And aha!


helloworld@ubuntu:~$ sudo lsusb
Bus 003 Device 005: ID 413c:8156 Dell Computer Corp.
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp.
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp.
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0480:a001 Toshiba America Info. Systems, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 1410:4100 Novatel Wireless U727
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Those numbers, (vendor=1410 product=4100), are the ones you need. This should be enough to get the usb-serial driver to load and give you some tty devices.

pppd is a totally valid way to go about this, but its definite the hard way. You should check out NetworkManager and kppp.

Also make sure that the card isn't presenting itself as a CD-ROM or storage device. This is a common problem with those aircards.

pabstblueribbon
04-28-2010, 10:53 PM
Son of beetch.


helloworld@ubuntu:~$ cat /etc/issue
Ubuntu 9.10 \n \l


K. Still doesnt say if its.. like angry beaver or super badger.. or whatever they are.

Now all I need to do is be able to grep the vendor and i should be in buisiness

.
Then insert the card and type this command as root:

diff /proc/bus/usb/devices devices | grep Vendor

Your vendor and product numbers should come up in this format:

< P: Vendor=106c ProdID=3701

pabstblueribbon
04-28-2010, 11:10 PM
Holy fucking facepalm.

I just on a whim decided to open the network manager while the usb modem was plugged in and, oh, look.. it finds it, sets it up for me.. and works.. gah.

Damn you Linus.. damn you.

BigWorm
04-28-2010, 11:29 PM
Holy fucking facepalm.

I just on a whim decided to open the network manager while the usb modem was plugged in and, oh, look.. it finds it, sets it up for me.. and works.. gah.

Damn you Linus.. damn you.

Yeah that card has been out for a while so it probably has fairly decent support in NetworkManager. I'm amazed by how many of those cards "just work" with it out of the box.

radamanthys
04-29-2010, 01:11 AM
sudo get me a sammich.