summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection/cellular_bluetooth.pm6
-rw-r--r--lib/network/connection/cellular_card.pm6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/network/connection/cellular_bluetooth.pm b/lib/network/connection/cellular_bluetooth.pm
index 0f89b2c..3adee03 100644
--- a/lib/network/connection/cellular_bluetooth.pm
+++ b/lib/network/connection/cellular_bluetooth.pm
@@ -73,9 +73,9 @@ sub search_services {
sub set_ppp_settings {
my ($self) = @_;
- my $cid = 1;
- $self->{access}{at_commands} = [ qq(AT+CGDCONT=$cid,"IP","$self->{access}{apn}") ];
- $self->{access}{dial_number} = "*99***$cid#";
+ $self->{access}{cid} = 1;
+ $self->{access}{at_commands} = [ qq(AT+CGDCONT=$self->{access}{cid},"IP","$self->{access}{apn}") ];
+ $self->{access}{dial_number} = "*99***$self->{access}{cid}#";
}
sub write_settings {
diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm
index 4d7c1f5..c349c90 100644
--- a/lib/network/connection/cellular_card.pm
+++ b/lib/network/connection/cellular_card.pm
@@ -106,18 +106,18 @@ sub build_peer {
sub set_ppp_settings {
my ($self) = @_;
- my $cid = 3;
+ $self->{access}{cid} = 3;
$self->{access}{at_commands} = [
"AT+CPIN?",
# Set +CGEE to 2
"AT+CMEE=2",
- qq(AT+CGDCONT=$cid,"IP","$self->{access}{apn}"),
+ qq(AT+CGDCONT=$self->{access}{cid},"IP","$self->{access}{apn}"),
# Setup +CGEQREG (QoS, don't set it for now)
# qq(AT+CGEQREQ=3,3,64,384,0,0,2,0,"0E0","0E0",3,0,0),
# Attached to network, will return 1
"AT+CGATT?",
];
- $self->{access}{dial_number} = "*99***$cid#";
+ $self->{access}{dial_number} = "*99***$self->{access}{cid}#";
}
sub write_settings {