mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Add additional AT-Commands to ppp settings. (eg. for GPRS/UMTS init)
This commit is contained in:
@@ -616,6 +616,18 @@ END
|
||||
<option value='P' $selected{'DIALMODE'}{'P'}>$Lang::tr{'pulse'}</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 1 <img src='/blob.gif' alt='*' /></td>
|
||||
<td width='25%'><input type='text' name='ADD_AT1' value='$pppsettings{'ADD_AT1'}'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 2 <img src='/blob.gif' alt='*' /></td>
|
||||
<td width='25%'><input type='text' name='ADD_AT2' value='$pppsettings{'ADD_AT2'}'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 3 <img src='/blob.gif' alt='*' /></td>
|
||||
<td width='25%'><input type='text' name='ADD_AT3' value='$pppsettings{'ADD_AT3'}'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' width='75%'>$Lang::tr{'send cr'}</td>
|
||||
<td width='50%'><input type='checkbox' name='SENDCR' $checked{'SENDCR'}{'on'} /></td>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
'Act as' => 'Konfiguriert als',
|
||||
'Add Port Rule' => 'Port Regel hinzufügen',
|
||||
'Add Rule' => 'Regel hinzufügen',
|
||||
'optional at cmd' => 'zusätzlicher Modembefehl',
|
||||
'Choose Rule' => 'Waehlen sie <u>eine</u> der untenstehenden Regeln aus.',
|
||||
'Class' => 'Klasse',
|
||||
'Class was deleted' => 'wurde mit eventuell vorhandenen Unterklassen geloescht',
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
'Act as' => 'Act as:',
|
||||
'Add Port Rule' => 'Add port rule',
|
||||
'Add Rule' => 'Add Rule',
|
||||
'optional at cmd' => 'optional AT command',
|
||||
'Choose Rule' => 'Choose <u>one</u> of the following rules.',
|
||||
'Class' => 'Class',
|
||||
'Class was deleted' => 'with potential Subclasses was deleted',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
|
||||
use strict;
|
||||
require 'CONFIG_ROOT/general-functions.pl';
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
|
||||
my %pppsettings;
|
||||
my %modemsettings;
|
||||
@@ -56,6 +56,22 @@ if ($pppsettings{'SENDCR'} eq 'off') {
|
||||
else {
|
||||
$btfudge = ''; }
|
||||
|
||||
|
||||
my ($add_at1, $add_at2, $add_at3);
|
||||
|
||||
if ($pppsettings{'ADD_AT1'} eq '') {
|
||||
$add_at1 = 'AT'; }
|
||||
else {
|
||||
$add_at1 = $pppsettings{'ADD_AT1'}; }
|
||||
if ($pppsettings{'ADD_AT2'} eq '') {
|
||||
$add_at2 = 'AT'; }
|
||||
else {
|
||||
$add_at2 = $pppsettings{'ADD_AT2'}; }
|
||||
if ($pppsettings{'ADD_AT3'} eq '') {
|
||||
$add_at3 = 'AT'; }
|
||||
else {
|
||||
$add_at3 = $pppsettings{'ADD_AT3'}; }
|
||||
|
||||
unlink('/var/log/connect.log');
|
||||
|
||||
my $com = "/usr/sbin/chat -v -r /var/log/connect.log \
|
||||
@@ -68,6 +84,9 @@ my $com = "/usr/sbin/chat -v -r /var/log/connect.log \
|
||||
'' '$modemsettings{'INIT'}' \
|
||||
OK '$modemsettings{'HANGUP'}' \
|
||||
OK '$speaker' \
|
||||
OK '$add_at1' \
|
||||
OK '$add_at2' \
|
||||
OK '$add_at3' \
|
||||
TIMEOUT '$modemsettings{'TIMEOUT'}' \
|
||||
OK '${dial}${telephone}' \
|
||||
CONNECT '${btfudge}' ";
|
||||
|
||||
Reference in New Issue
Block a user