romtelecom howto

Upload: cmarasescu

Post on 03-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Romtelecom Howto

    1/2

    This bash script is used for automating the internet connection when using " Romtelecom Any DATAADU-510L "

    The tests were made on Red Hat Enterprise Linux Workstation release 6.4 , kernel 2.6.32-358.11.1.el6.x86_64.

    Prerequisites:

    -wvdial

    -usb_modswitch

    (if the above applications are not installed, then an internet connection is needed the script covers thispart and installs the needed applications using yum)

    Howto Run:

    -copy the script to a desired location, such as /home/user_name/Desktop/romtelecom.install

    - modify the following lines in the script, in order to reflect you modem values:

    #Username = [email protected]

    #Password = 1000117543

    Note: The above number can be found on the modems case.

    -make the script executable

    $chmod 0755 /home/user_name/Desktop/romtelecom.install

    -open a terminal and run the script using root privileges:

    $sudo /home/user_name/Desktop/romtelecom.install

    -in order to disconnect the Romtelecom modem, close the terminal window from where you run thescript, or press Ctrl+C in the terminal to terminate the script.

    mailto:[email protected]:[email protected]:[email protected]:[email protected]
  • 8/12/2019 Romtelecom Howto

    2/2

    Script description (what does the script do):

    - checking for dependencies: wvdial (dialer), usb_modeswitch (used for switching from the defaultstorage mode to desired modem mode)

    - if the above mentioned dependencies are not already installed, the internet connection is checked andif there is an internet connection they will be installed

    - creating persistent rule for Romtelecom Any DATA ADU-510L (/lib/udev/rules.d/40-usb_modeswitch.rules)

    - creating a file from where usb_modeswitch will take the modem configuration for Romtelecom AnyDATA ADU-510L (/etc/usb_modeswitch.d/05c6:1000:uMa=AnyDATA)

    - creating a static naming for our Romtelecom Any DATA ADU-510L modem, using udev(/etc/udev/rules.d/92-tty-serial.rules).

    - force udev to reload newly created rules (udevadm trigger)

    - check if the modem "Romtelecom Any DATA ADU-510L" was inserted: if the modem is not insertedwithin 5 minutes, the scripts aborts.

    - creating the wvdial configuration file (/etc/wvdial.conf)

    - run the dialer (the dialer will be put in background)

    - stop NetworkManager service

    - change the default gateway to the modem remote IP address (the output of the wvdial command willbe sent to a temporary file /tmp/wvdial.txt and from this location the script will take the modem remoteIP address)

    - change the DNS servers

    Notes:

    -IOT get details about the mapping of the USB modem, run the following commands:

    #ll /dev | grep ttyUSB -> this will most likely return: ttyUSB0, ttyUSB1, ttyUSB2, ttyUSB3

    #udevadm info -a -n /dev/ttyUSB0 -> from the output of this command we'll take more specific detailsabout the mapped USB device.