I am setting up my laptop as a router. I have it all working fine except for one thing I would like. I want to be able to plug in a 3g modem and have it available on demand. I am assuming some kind of udev rule to recognize when it is plugged in and start a connection script. Here is the dmesg output when the modem is plugged in.
Code:
[ 2267.148066] usb 3-1: new full speed USB device using ohci_hcd and address 3
[ 2267.355185] usb 3-1: New USB device found, idVendor=1004, idProduct=6000
[ 2267.355197] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2267.355205] usb 3-1: Product: LG CDMA USB Modem
[ 2267.355211] usb 3-1: Manufacturer: LG CDMA USB Modem
[ 2267.357371] usb 3-1: configuration #1 chosen from 1 choice
[ 2267.358385] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
I would need help with (1)creating the script to dial , and (2)actually dialing it when plugged in. I also would want it to (3)only dial when it is needed. Maybe this can be done in /etc/network/interfaces.
I can post the wvdial.conf file or something else if needed. I currently manually dial and it does work fine that way so DHCP server and NAT masquerading etc.. are working how I like.
Thanks.