Debian wvdial parse result to auto set the IP address
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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,"100.121.106.244","254.128.0.0.0.0.0.0.0.0.1.128.162.96.1"
OK
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 100.121.106.244 netmask 255.255.255.0 -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
linux shell-script debian wvdial
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
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,"100.121.106.244","254.128.0.0.0.0.0.0.0.0.1.128.162.96.1"
OK
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 100.121.106.244 netmask 255.255.255.0 -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
linux shell-script debian wvdial
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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,"100.121.106.244","254.128.0.0.0.0.0.0.0.0.1.128.162.96.1"
OK
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 100.121.106.244 netmask 255.255.255.0 -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
linux shell-script debian wvdial
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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,"100.121.106.244","254.128.0.0.0.0.0.0.0.0.1.128.162.96.1"
OK
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 100.121.106.244 netmask 255.255.255.0 -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
linux shell-script debian wvdial
linux shell-script debian wvdial
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 8 hours ago
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
Daniel Near
62
62
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Daniel Near is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Daniel Near is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Near is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Near is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Near is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474319%2fdebian-wvdial-parse-result-to-auto-set-the-ip-address%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password