Tuesday, January 22, 2008

HowTo Configure AT&T 3G Laplink Connect in RHEL/Fedora Linux

I have forced myself to use Linux and the GNOME desktop for just about everything for the past year and it has gone pretty well. At the start of my Linux usage I had to get an aircard working with RHEL 5. At first, the process seemed difficult but I quickly realized that I lucked out and all worked out-of-the-box.

In my case I was using the AT&T 3G Laplink 875U (aka Sierra Wireless AirCard 875U) and performing the setup in RHEL 5 running kernel 2.6.18-8. I later used the exact same setup in Fedora Core 6 and Fedora 7 without issue.

Furthermore, I used this same setup for an old Verizon aircard that was PCMCIA without any issues. Of course, for the Verizon version the username/password/dialup info was different but the important thing here is the motions.

To configure Cingular/AT&T 3G Laplink Connect (Sierra Wireless AirCard 875U) in RHEL5 from GNOME desktop:
  1. Go to System -> Administration -> Network.
  2. Enter the super-user password.
  3. Go to the Hardware tab.
  4. Click New.
  5. Select Hardware Type of Modem.
  6. Click OK.
  7. Set modem device to /dev/ttyUSB0.
  8. Baud rate should be 460800.
  9. Flow control should be hardware.
  10. Modem volume should be Off.
  11. Use touch tone dialing should be checked.
  12. Click OK.
  13. Click the Device tab.
  14. Click New.
  15. Select Device Type of Modem connection.
  16. Click Forward.
  17. Phone number should be *99#4
  18. Provider name should be Cingular or ATT
  19. Login name should be ISPDA@CINGULARGPRS.COM
  20. Password should be CINGULAR1
  21. Click Forward.
  22. Automatically obtain IP address settings should be checked.
  23. Automatically obtain DNS information form provider should be checked.
  24. Click Forward.
  25. Click Apply.
Using the Network Configuration or Network Device Control tool you should now be able to activate the modem connection and get a connection via the AirCard. If there is a connection failure, the error message shown may not be very descriptive. In such a case, look in syslog for more details.

One problem that I have run into and have not figured out a way around is that the DNS servers obtained during the connection are invalid sometimes. This means that you may not be able to resolve host names to IP addresses. Because of this issue, I have implemented a workaround of setting the DNS address manually. The DNS addresses that I use are 66.209.10.202 and 66.102.163.232. I obtained both of these addresses from Cingular. Please note however, even using this manually set DNS addresses doesn't always work when traveling. It is possible that some network towers will not have access to these DNS servers, in which case using the automatically assigned addresses is better just as long as you get a valid one.

To set these addresses as static:
  1. As superuser, open /etc/sysconfig/network-scripts/ifcfg-Cingular (or ifcfg-ATT depending on the Provider name used during configuration of the connection) using a text editor.
  2. At the end of the file add the following two lines:
    DNS1=66.209.10.202
    DNS2=66.102.163.232
  3. Save the file.
As I use the command-line allot (terminal), I also find it useful to give the new modem connection a name that is easier to type. By default, the device nickname will be Cingular (or ATT) because we gave it a provider name of Cingular. I prefer this to be all lower-case so that I can simply type cingular or att or even better, abbreviated like cing. To get the easier name, change the device nickname to cingular using the Network Configuration tool. I also set some other options for the device to override the default.
  1. Go to System -> Administration -> Network.
  2. Enter the super-user password if prompted.
  3. From the Devices tab, select Device ppp0 / Nickname Cingular / Type Modem. Keep in mind that the device number might be ppp# depending on other modems you have configured.
  4. Click Edit.
  5. Make all the changes you would like. I am not sure how all the settings impact the AirCard as I have not tested them fully but here are the ones that I changed:
    Nickname -> cingular
    Restart if connection dies -> Enabled
If you are using NetworkManager you will need to restart it for it to see the newly added modem. Once restarted, you should can use NetworkManager to establish a connection to Cingular. Due to a bug in NetworkManager, it will not report the status of the connection and therefore, even if connected, NetworkManager will indicate that you are not connected. Also, if you have SELinux set to enforcing, it may prevent pppd from creating the connection because it was invoked by NetworkManager. As I do not use NetworkManager to create the dialup connection, I have not looked into what is required to modify the SELinux policy.

When I do want to connect to Cingular, I use the command line. Open a terminal and issue the following command to connect:
/sbin/ifup cingular

And to shutdown the connection:
/sbin/ifdown cingular

Keep in mind that the argument you pass to ifup or ifdown will be the device nickname given to the dialup connection. In my case this is cingular, but if you did not change the device nickname from Cingular, you would have to use Cingular.

No comments: