Results 1 to 1 of 1

Thread: Setting up an automatic Internet connection

  1. #1
    brendin44 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    180
    Rep Power
    4

    Default Setting up an automatic Internet connection

    I depend on BSNL EVDO/CDMA for Internet access. I have configured the dialling by using the wvdial PPP utility, and I issue the wvdial command to connect under Fedora 9. I found it interesting to write udev rules to auto connect Internet whenever I plug in the EVDO USB modem. Here's how to get started: first, plug in the EVDO device in the USB port; second, run the dmesg command at a terminal prompt. I received the following dmesg output:

    But there was no suitable kernel module loaded to create IdevlttyUSBO, which is the device node for the corresponding device, You might.try manually loading the USB serial module specifying-the Product ID and vendor ID parameters-that is, icWendor05c6, idProduct=6000. Run the following command as the root user:Executing the dmesg command again brings up the following:

    As you can see, this time IdevlttyUSBO is created and made available. [Actually when the module usbserial is loaded using the modprobe command, it is required to manually create IdevlttyUSBO using the mknod command. But there is a default udev rule that creates the device.

    Now we have to dial wvdial as the root in order to connect. How do we transform this manual process to a udev rule? Run the following command to collect appropriate parameters to match the' device: Now create a file called/etc/adev/rules.d/100-bsnl.rules and enter the following rules in it:

    The first rule instructs udevd to listen to devices with parameters idVendor=05c6 and idProduct=6000, If found, load the corresponding usbserial kernel module, The second rule instructs udevd to execute the evdo_connect script when the above parameters match for a newly added device IdevlttyUSBO, ACTION="add" means, when the device was added.

    Name:  Setting up an automatic Internet connection.jpg
Views: 249
Size:  47.7 KB

    The parameter value for RUN is an executable command. But it should be noted that the executable should l)e something that rurs finite times rather than something that contains an irilirute loop or infinite conditions. lusrlbin/evdo_connect-is made to run for a finite number of times by se{lding wvdial and msg_connection to the background. Now, create two files. In the first file named lusrlbin/ evdoJonnect enter the following text: ... and in the second file named lusrlbin/msg_ connection, enter the following: In this script, we have used the notify-send utility to display messages to the user. notify-send comes default with Fedora 9. You may have t? install it separately on Ubuntu or other distributions. Now, set executable permissions to both the scripts since udev is going to execute them upon finding the device:

    Voila! The auto dialling is configured and ready to run. As soon as I plug or unplug EVDO now, I get notifications as shown in real time. The procedure is the same while using any other mobile/CDMA Net connection. You have to modify the udev rules slightly, according to your device parameters.
    Last edited by brendin44; 12-19-2008 at 06:18 AM.

Similar Threads

  1. Setting up internet connection in Linux
    By MyersGray in forum Linux/Free BSD
    Replies: 2
    Last Post: 02-23-2010, 02:50 PM
  2. Setting Up DSL Internet
    By Aaron123 in forum Wireless Networking
    Replies: 0
    Last Post: 01-08-2010, 02:56 PM
  3. Setting Internet Connection
    By Richie Dias in forum General Networking
    Replies: 0
    Last Post: 05-05-2009, 11:20 AM
  4. Setting Up And Sharing A Internet Connection
    By erinjhon in forum Wireless Networking
    Replies: 0
    Last Post: 06-20-2008, 10:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48