I'm trying to get wvdial to work automatically with a Telit LE910 WCDMA modem. My script will start up the connection as needed, then disconnect when not needed to prevent wasted data. One of the telit commands to set up the modem is to send AT+CGPADDR=3 and the result from this returns the IP address my carrier has provided. in my wvdial.conf, I have this as one of the lines

init5 = AT+CGPADDR=3 

The response to that init string is

+CGPADDR: 3,"",""

The IP address changes every time I connect. With all the appropriate configurations in my wvdial.conf, wvdial completes successfully and connects. But my connection isn't fully complete until I manually issue two more commands in script or via command-line, and I'm not finding an easy way to pass that ip address back to the script to run unattended. To complete the connection, I have to type

ifconfig usb0 netmask -arp up
route add default usb0

Is there some way in the wvdial.conf to have it do something with the init5 variable that could pass the result back to the script so that the connection completes automatically?

The rest of my wvdial is

[Dialer Defaults]
Init1 = ATZ
Init2 = AT+CGMR
Init3 = AT#ncm=1,3
Init4 = AT+cgact=1,3
Init5 = AT+cgpaddr=3
Init6 = at+cgdcont?
Init7 = AT+CGDATA="M-RAW_IP",3
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Modem = /dev/ttyACM3
Baud = 460800

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.