Jump to content

Linux USB Tethering Instructions for BlackJack II Using pppd


Recommended Posts

Guest linuxchuck
Posted (edited)

I have successfully configured my new Blackjack II (1617UCGK2) from ATT to work as a USB modem for my linux system.

Yes, I know that wvdial, or gnome-ppp or may work just fine, but not every distro out there provides those applications. Since I haven't seen anything elsewhere that covers this specific phone, and how to tether it via USB to practically any Linux distro out there in a generic, but fully functional way, here is the setup:

Your linux distro must have pppd installed. I can't think of any distro that doesn't come with this by default. However, if yours doesn't have it, installing software onto your system is beyond the scope of this document. Google is your friend. :(

You will also need to have the kernel module called cdc-acm.ko built and installed. Again, this post is not going to teach you how to configure your kernel, build modules, or even how to download them. Go find yourself a good linux support group for that. :D

I am also not here to teach you how to do basic filesystem management under linux. You should be able to edit, copy, move, rename, and such all on your own.

Now on to the "meat" of this post:

Create the following file, and add the content as seen in the code box below:

/etc/ppp/peers/blackjack

/dev/ttyACM0
921600
debug
noauth
novj
ipcp-accept-remote
defaultroute
usepeerdns
user [email protected]
password CINGULAR1
crtscts
lock
remotename attws
ipparam attws
persist
nodetach
ipcp-max-configure 20
maxfail 0
connect '/usr/sbin/chat -v -V -t3 -f /etc/ppp/peers/blackjack-chat'
[/codebox]

Create the following file, and add the content of the code box below:

/etc/ppp/peers/blackjack-chat

[codebox]ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
'' AT+cfun=1
OK AT+cfun=1
OK AT+cgreg=1
OK AT
TIMEOUT 40
OK ATQ0&F&D2&C1E1V1S0=0
OK AT+FCLASS=0
OK AT+IFC=2,2
OK 'AT+CGDCONT=1,"IP","WAP.CINGULAR"'
OK ATD*99#
CONNECT '\d\c'

Once you have those two files created, with the content listed above, you're pretty much done.

I found out that my /etc/resolv.conf was not getting updated properly, and DNS resolution was not working so I added the following two files to fix that issue: (If you don't have the DNS resolution issue, don't bother creating these two files.)

/etc/ppp/ip-up

#!/bin/sh
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
rm -f /etc/ppp/resolv.prev
if [ -f /etc/resolv.conf ]; then
cp /etc/resolv.conf /etc/ppp/resolv.prev
grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
cat /etc/ppp/resolv.conf >> /etc/resolv.conf
else
cp /etc/ppp/resolv.conf /etc
fi
fi
[/codebox]

/etc/ppp/ip-down

[codebox]#!/bin/sh
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
if [ -f /etc/ppp/resolv.prev ]; then
cp -f /etc/ppp/resolv.prev /etc/resolv.conf
else
rm -f /etc/resolv.conf
fi
fi

I then made them executable with the following two commands:

chmod +x /etc/ppp/ip-up
chmod +x /etc/ppp/ip-down
[/codebox]

Plug your phone in to a USB port on your system. The cdc-acm module should be loaded, and it should create a ttyACM0 device file in the /dev directory. To ensure the module is loaded, and the device node is there, use the following two commands:

[codebox]lsmod | grep cdc_acm

That command will show you if the module is loaded,

ls -lah /dev/ttyACM*
[/codebox]

That one will show you the device file if there is one.

There is a slight possibility that you will have more than one ACM device showing there. If that is the case, I'll leave it up as an exercise for the reader to figure out exactly which one is your phone. However, I doubt you'll run into this problem.

Once you know the device file was created properly, execute the following command to dial up:

[codebox]pppd call blackjack

Sit back, and enjoy your 3G network connection on Linux.

P.S. One last piece of advice: If you can't seem to browse, but you can ping www.google.com, try configuring your browser to "auto-detect" the proxy configuration. That worked for me too...

Have fun!

Linuxchuck

Edited by linuxchuck
Guest dtphantom
Posted

awesome thanks. Now if only my laptop had a battery that lasted for more than 5 minutes and this would really be useful

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.