In some places, 3G USB modems might be only way to connect our servers to internet. Below is a guideline to install and use 3G dongles in linux. |
yum install wvdial |
vi /etc/wvdial.conf |
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 Init3 = AT+CGDCONT=1,"IP”,"<APN of Internet provider>" Stupid Mode = 1 Modem Type = USB Modem New PPPD = no Modem = /dev/ttyUSB2 ISDN = 0 Auto Reconnect = 1 Phone = *99# Username = <Provider username> Password = <Provider password> Baud = 460800 Carrier Check = no |
yum install tcl usbutils libusb1-devel |
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20151101.tar.bz2 #or latest wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.2.6.tar.bz2 #or latest |
tar xvfj usb-modewitch-2.2.6.tar.bz2 tar xvfj usb-modewitch-data-20151101.tar.bz2 cd usb-modewitch-2.2.6 make install cd usb-modewitch-data-20151101 make install |
usb_modeswitch creates some udev rules to automatically change the mode of 3G dongle to act as usb_modem
dmesg | grep tty # should show something like 'GSM modem (1-port) converter now attached to ttyUSB0' sudo wvdial & |