LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-25-2009, 09:08 PM   #1
jaredlking
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Connecting to internet when 3G modem is plugged in


Hi all,

I was recently asked to get a 3G ZTE 633 modem (not in stores) to connect to the internet whenever it was plugged in. I had it successfully working on my Ubuntu Gutsy Gibbon machine but it does not work on Fedora 10 which is where it is required to work.

When the 3G modem is plugged in I use a Udev rule to run usb_modeswitch which changes it from being in usb storage mode to being in modem mode. This part works fine.

I then run a second udev rule (on the modem device), this should run a script which connects to the internet. Unfortunately it falls over here. The script does run but it will not connect. However if I run the script manually from root it works fine. I guess that it is a permissions issue.

The device permissions are:
crw-rw---- 1 root uucp 188, 0 2009-04-26 11:31 ttyUSB0
crw-rw---- 1 root uucp 188, 1 2009-04-26 11:31 ttyUSB1
crw-rw---- 1 root uucp 188, 2 2009-04-26 11:31 ttyUSB2

The script and script folders permissions are:
drwxrwxrwx 2 root root 4.0K 2009-04-26 11:46 .
drwxr-xr-x 23 root root 4.0K 2009-04-26 11:13 ..
-rwxr-xr-x 1 root root 95 2009-04-26 11:46 run_internet

One thing to note is that there are three udev devices associated with the modem. They are ttyUSB0, ttyUSB1 and ttyUSB2. I use ttyUSB2 to talk to the modem when connecting.

Here are the files you may need to help me. If you require any more let me know:

The first udev rule:
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000", SYSFS{idVendor}=="19d2", RUN+="/usr/bin/usb_modeswitch"

The second udev rule:
SUBSYSTEM=="usb", SYSFS{idProduct}=="0031", SYSFS{idVendor}=="19d2", MODE="0666", RUN+="/outputs/run_internet"

The script:
#!/bin/bash
/bin/echo script
/usr/bin/wvdial &
cp -f /etc/telstra_resolv.conf /etc/resolv.conf

The wvdial config file:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATS7=60 S30=0 S0=0
Init4 = AT+CGDCONT=1,"IP","telstra.internet"
Modem Type = Analog Modem
Baud = 9600
New PPPD = no
Modem = /dev/ttyUSB2
ISDN = 0
Dial Command=ATD
Phone = *99#
Password = user@bigpond.com
Username = password
Stupid Mode = 1

So what am I missing? I suppose it is related to device permissions. Why does the "mode" command not work? With what rights do udev rules run?

Thanks for your help

Jared
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting laptop to the internet via ethernet cable plugged into router. okelaye Linux - Networking 2 04-13-2009 10:32 AM
Connecting to the internet thru an external modem nathanhillinbl Fedora 7 10-30-2005 12:55 PM
Installing modem and connecting to internet phoenix7 Linux - Hardware 3 09-11-2004 08:50 AM
Connecting to internet via Cable Modem Marc19 Linux - Newbie 1 08-06-2004 06:23 AM
connecting internet using internal modem ru2raj Linux - Newbie 1 12-28-2003 07:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration