View Full Version : [SOLVED] pppd issue with sakis3g
ilhami
September 27th, 2010, 04:51 PM
Hi,
I am using the latest version of sakis3g with Huawei E122 Modem.
my problem is that, i am getting always 10.106.48.227 or similar as ip, but i need remote IP that my provider assigned to me.
It works just fine with NetworkManager Applet 0.8, I got with that as IP 78.132.30.* and that is what i need.
I have enabled the debug mode in pppd options and could not see any different commands, my debug logs are:
sakis3g Log: http://pastebin.com/aU1mCL1B
networkmanager Log: http://pastebin.com/XfmeVTfQ
Which pppd options should i use to get the public IP Address?
thank you
alexfish
September 27th, 2010, 05:26 PM
Have you tried Sakis3g Forum
Sakis3gForum (http://forum.sakis3g.org/)
Regards
alexfish
ilhami
September 27th, 2010, 05:28 PM
Yes.
http://forum.sakis3g.org/smf/index.php?topic=102.0
I think it is more pppd issue, because i can connect successfuly but the ip address is not what i want.
ilhami
alexfish
September 27th, 2010, 06:48 PM
hi
from your post Sakis3g
I am using the latest version of sakis3g full with Huawei E122 Modem.
my problem is that, i am getting always 10.64.64.64 as local ip, but i need remote IP that my provider assigned to me.
It works just fine with NetworkManager Applet 0.8, I got with that as IP 213.162.94.* and that is what i need.
How can i do it with sakis3g?
from your logfile
sakis3g primary an secondary servers show
nameserver 213.162.69.169
nameserver 213.162.65.1
from Network Manager log shows
local IP address 78.132.113.37
remote IP address 10.64.64.64
primary DNS address 213.162.69.170
secondary DNS address 213.162.65.2
Sakis 3g only updates (exports) part of the routing table, where as NM exports a bit more info . The important bits are the primary and secondary Addresses , Which in both cases the "resolv.conf" confirms your connected to the correct server
Also of note there are no listed named Servers for the network mmc232 , mnc02
so your local IP and broadcast address will always vary ( as most 3g connections will )
the important bit is the APN which appears to be correct
To confirm your addresss , RE Sakis3g and NM
From the terminal
Code:
cat /etc/resolv.conf
regards
alexfish
alexfish
September 27th, 2010, 07:40 PM
for other info as regards ppp and Network Manager info
you could try seeing what info is in the NM connections
use the following with caution and do not alter or tamper with the file "you have been warned",
it may result in having to reconfigure the device
Code:
gksu nautilus
then goto /etc/NetworkManager/system-connections . and click on your connection
and see if there is a [ppp] listing and a [ipv4] also you could check any other info , which may be of use
regards
alexfish
ilhami
September 27th, 2010, 08:41 PM
from sakis3g log;
sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x3 <addr 10.106.48.227> <ms-dns1 213.162.69.170> <ms-dns2 213.162.65.2>]
sent [IPCP ConfReq id=0x4 <addr 10.106.48.227> <ms-dns1 213.162.69.170> <ms-dns2 213.162.65.2>]
rcvd [IPCP ConfAck id=0x4 <addr 10.106.48.227> <ms-dns1 213.162.69.170> <ms-dns2 213.162.65.2>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 10.106.48.227
remote IP address 10.64.64.64
doesn't my provider assign the ip 10.106.48.227 here?
and in networkmanager log it is different ip
rcvd [IPCP ConfNak id=0x3 <addr 78.132.30.74> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
sent [IPCP ConfReq id=0x4 <addr 78.132.30.74> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
rcvd [IPCP ConfAck id=0x4 <addr 78.132.30.74> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
so i thought my ppp options different from the networkmanager's
i will check /etc/NetworkManager/system-connections later.
thank you
ilhami
alexfish
September 27th, 2010, 08:59 PM
hi
yes I noticed the Authentication protocol , normaly 3g uses pap , sometimes or most times user name or passwords not required, where as networkmanager is using chap , and requires user name and password , also of note, it looks as if it is going through ms proticols ,
by reason :
ms-dns <addr>
If pppd is acting as a server for Microsoft Windows clients,
this option allows pppd to supply one or two DNS (Domain Name
Server) addresses to the clients. The first instance of this
option specifies the primary DNS address; the second instance
(if given) specifies the secondary DNS address. (This option
was present in some older versions of pppd under the name
dns-addr.)
ms-wins <addr>
If pppd is acting as a server for Microsoft Windows or "Samba"
clients, this option allows pppd to supply one or two WINS (Win‐
dows Internet Name Services) server addresses to the clients.
The first instance of this option specifies the primary WINS
address; the second instance (if given) specifies the secondary
WINS address.
This is why it may be worth looking at the ppp details in NM, although the info for NM will be extracted from the modem via modem manager , so this leaves the possibilty that the modem is still been used in windows' or are using samba shares etc.
regards
alexfish
ilhami
September 28th, 2010, 12:12 AM
my /etc/NetworkManager/system-connections/ folder is empty, there is no files at all.
I have checked it with wireless and 3G connections :(
so the Question is; why do i receive different reponses for almost the same requests from Sakis3g and Networkmanager?
rcvd [IPCP ConfNak id=0x3 <addr ....
for APN:
there is 2 APNs for t-mobile Austria, gprsinternet and business.gprsinternet,
with "business.gprsinternet" i can get public dynamic ip for my modem. I got this info from t-mobile
thank you
ilhami
alexfish
September 28th, 2010, 01:16 AM
my /etc/NetworkManager/system-connections/ folder is empty, there is no files at all.
I have checked it with wireless and 3G connections :(
so the Question is; why do i receive different reponses for almost the same requests from Sakis3g and Networkmanager?
rcvd [IPCP ConfNak id=0x3 <addr ....
for APN:
there is 2 APNs for t-mobile Austria, gprsinternet and business.gprsinternet,
with "business.gprsinternet" i can get public dynamic ip for my modem. I got this info from t-mobile
thank you
ilhami
3g connections operate on APN's (connect through apns) the apn relates to you pay plan
as for your question, can best be described below
First of all we have to find tty port to communicate with according to the log files this is /dev/ttyUSB0
Open up first terminal and enter this code to monitor the modem outputs
Code:
tr -s "\n" < /dev/ttyUSB0
open up a second terminal and enter the following codes
echo -e "ATZ\r" > /dev/ttyUSB0
it should return OK (also use this command if not getting correct results)
All the following are my results(re t-mobile uk)
if you have pin number
echo -e "AT+CPIN=PINNUMBER\r" > /dev/ttyUSB0
To find your Provider
echo -e "AT+COPS?\r" > /dev/ttyUSB0
it should return something like this
+COPS: 0,0,"T-Mobile UK",2
to find the mmc and mnc numbers
echo -e "AT+COPS=0,2\r" > /dev/ttyUSB0
echo -e "AT+COPS?\r" > /dev/ttyUSB0
Returns something like this
+COPS: 0,2,"23430",2
the mcc and mnc number is taken from “23430” and splits into
mcc =“234”
mnc = “30”
from these numbers it should be possible to look up the "Default named servers"
in the providers data base
AT+COPS=? This will list service providers available / this will take time while it searches / so Please Wait. It will show something like
Code:
echo -e "AT+COPS=?\r" > /dev/ttyUSB0
+COPS: (2,"T-Mobile","T-Mobile","23430",2),(1,"T-Mobile","T-Mobile","23430",0),(3,"Vodafone UK","Vodafone UK","23415",2),(3,"Vodafone UK","Vodafone UK","23415",0),(3,"O2-UK","O2-UK","23410",0),(3,"Orange","Orange","23433",0),(1, "3","3","23420",2),(3,"Orange","Orange","23433",2) ,(3,"O2-UK","O2-UK","23410",2),
Notice that each service provider can have more than one entry( at this point sakis3g will ask to confirm which one to use , but since you have already confirmed your choice by Force APN ,it carries on with the connection
however you still need the correct APN for the device(this is generally associated with your pay plan)
To find the APN for the device
Codes:
echo -e "ATZ\r" > /dev/ttyUSB0
echo -e "AT+CGDCONT?\r" > /dev/ttyUSB0
this should produce a list of APN's on the device
example
example response from the first terminal
+CGDCONT: 1,"IP","","0.0.0.0",0,0
+CGDCONT: 2,"IP","payandgo.o2.co.uk","0.0.0.0",0,0
+CGDCONT: 3,"IP","m-bb.o2.co.uk","0.0.0.0",0,0
+CGDCONT: 4,"IP","general.t-mobile.uk","0.0.0.0",0,0
once the correct info is confirm the correct APN is loaded into the "+CGDCONT: 1 "
and a dial command is sent, usually *99#
Can you post the results of the last commands
then I will post what actions you can do to achieve a connection and monitor the pppd
regards
alexfish
PS will look at NM side later
ilhami
September 28th, 2010, 10:51 AM
echo -e "AT+COPS?\r" > /dev/ttyUSB0
+COPS: 0,0,"T-Mobile Austria",2
echo -e "AT+COPS=?\r" > /dev/ttyUSB0
+COPS: (2,"T-Mobile Austria","TMA","23203",2),(1,"3 AT","3 AT","23210",2),(3,"A1","A1","23201",2),(1,"T-Mobile Austria","TMA","23203",0),(3,"one","one","23205",0),(3,"A1","A1","23201",0),(3,"one","one","23205",2),,(0,1,2,3,4),(0,1,2)
echo -e "AT+CGDCONT?\r" > /dev/ttyUSB0
+CGDCONT: 1,"IP","gprsinternet","",0,0
+CGDCONT: 2,"IP","business.gprsinternet","",0,0
alexfish
September 28th, 2010, 04:58 PM
echo -e "AT+COPS?\r" > /dev/ttyUSB0
+COPS: 0,0,"T-Mobile Austria",2
echo -e "AT+COPS=?\r" > /dev/ttyUSB0
+COPS: (2,"T-Mobile Austria","TMA","23203",2),(1,"3 AT","3 AT","23210",2),(3,"A1","A1","23201",2),(1,"T-Mobile Austria","TMA","23203",0),(3,"one","one","23205",0),(3,"A1","A1","23201",0),(3,"one","one","23205",2),,(0,1,2,3,4),(0,1,2)
echo -e "AT+CGDCONT?\r" > /dev/ttyUSB0
+CGDCONT: 1,"IP","gprsinternet","",0,0
+CGDCONT: 2,"IP","business.gprsinternet","",0,0
from the info
+COPS: 0,0,"T-Mobile Austria",2 ( T-Mobile Austria is the registered provider )
+COPS: (2,"T-Mobile Austria","TMA","23203",2),(1,"3 AT","3 AT","23210",2),(3,"A1","A1","23201",2),(1,"T-Mobile Austria","TMA","23203",0),(3,"one","one","23205",0 ),(3,"A1","A1","23201",0),(3,"one","one","23205",2 ),,(0,1,2,3,4),(0,1,2)
the above shows T-Mobile have two connections available
+CGDCONT: 1,"IP","gprsinternet","",0,0
+CGDCONT: 2,"IP","business.gprsinternet","",0,0
the above shows two APN's on the device ("gprsinternet" and "business.gprsinternet")
The two plans may have different billing so from here it is important to select the correct APN , as
you could pay more or denied a connection if the wrong APN is selected , and also some plans have what is called
priority connections " I am assuming if your plan is "Business" then you may have special "Priorities",
one of those could be, when, trying to get a connection then you may have a higher priority over someone
who does not have special priorities,IE someone on a lesser plan may get bumped to give you the connection, since you
have a Business plan , notable at times of heavy traffic on the Internet(on specific servers)
one data-base of serviceproviders used by NM shows the below
so did you have to manualy set the APN
<name>T-Mobile</name>
−
<gsm>
<network-id mcc="232" mnc="07"/>
<network-id mcc="232" mnc="03"/>
−
<apn value="gprsinternet">
<username>t-mobile</username>
<password>tm</password>
</apn>
−
<apn value="web">
<name>T-Mobile (formerly tele.ring)</name>
<username>web@telering.at</username>
<password>web</password>
<dns>212.95.31.167</dns>
<dns>212.95.31.168</dns>
from the another data-base, info shows
APN "gprsinternet" = Plan "internet" and "Username = t-mobile , Password = tm "
APN "business.gprsinternet" = Plan "Buisiness Internet" and "Username = t-mobile , Password = tm "
So on to the connection
device dialing <cid> = "*99# = default *99***1#" = +CGDCONT: 1,"IP","gprsinternet","",0,0
which is not your plan
could indicate wrong APN may have been used at some stage "see details from first data-base"
other device dialing <cid> = "*99***2#" = +CGDCONT: 2,"IP","business.gprsinternet","",0,0
which is correct for your plan
open up the first terminal and enter this code
Code:
tr -s "\n" < /dev/ttyUSB0
open up second terminal and enter the following codes
Codes:
echo -e "ATZ\r" > /dev/ttyUSB0
echo -e "AT+CGDCONT=1,\"IP\" \"business.gprsinternet\"\r" > /dev/ttyUSB0
echo -e "ATDT*99#\r" > /dev/ttyUSB0
wait a second to ensure the "No carrier" message does not appear , if it does redial the number
at this point you may see in the first terminal "Connect" or "Connect <number>"
also note it is possible to dial the <cid> with this command " ATDT*99***2# " and avoid loading the CGDCONT=1 IE :the Line could be omitted
assuming there is a "Connect" message
enter this code in the second terminal
Code:
sudo pppd ttyUSB0 115200 nodetach defaultroute noipdefault noauth lock usepeerdns
enter your system password
what does the terminal show
to exit the pppd ,focus on the terminal window ,type Ctrl + C
regards
alexfish
ilhami
September 28th, 2010, 08:46 PM
thank you,
I got the right IP address as 213.162.84.2
that means, Sakis3g doesn't send the right commands to connect?
pppd log:
pppd options in effect:
debug # (from /etc/ppp/options)
nodetach # (from command line)
dump # (from /etc/ppp/options)
noauth # (from command line)
/dev/ttyUSB0 # (from command line)
115200 # (from command line)
lock # (from command line)
crtscts # (from /etc/ppp/options)
modem # (from /etc/ppp/options)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 0 # (from /etc/ppp/options)
lcp-echo-interval 0 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/options)
ipcp-accept-local # (from /etc/ppp/options)
ipcp-accept-remote # (from /etc/ppp/options)
noipdefault # (from command line)
defaultroute # (from command line)
proxyarp # (from /etc/ppp/options)
usepeerdns # (from command line)
noipx # (from /etc/ppp/options)
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4f99412e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543> <auth chap MD5>]
sent [LCP ConfNak id=0x1 <auth pap>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4f99412e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543> <auth pap>]
sent [LCP ConfAck id=0x2 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543> <auth pap>]
sent [PAP AuthReq id=0x1 user="citypan-player" password=<hidden>]
rcvd [PAP AuthAck id=0x1 "Greetings!!"]
Remote message: Greetings!!
PAP authentication succeeded
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1 <compress VJ 0f 01> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfReq id=0x2]
sent [IPCP ConfAck id=0x2]
rcvd [IPCP ConfNak id=0x2 <compress VJ 0f 01> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x3 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfRej id=0x3 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x4 <addr 213.162.84.2> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
sent [IPCP ConfReq id=0x5 <addr 213.162.84.2> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
rcvd [IPCP ConfAck id=0x5 <addr 213.162.84.2> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 213.162.84.2
remote IP address 10.64.64.64
primary DNS address 213.162.69.169
secondary DNS address 213.162.65.1
Script /etc/ppp/ip-up started (pid 1599)
Script /etc/ppp/ip-up finished (pid 1599), status = 0x0
alexfish
September 29th, 2010, 01:56 PM
wrong assumption about sakis3g I have checked through all the log info in the posts , and pastebin
From the connection we have basically followed the Sakis3g connection method, with
exception of optimising pppd for a 3g connection
in all cases the NM, Sakis3g and the self-made connection is using the correct APN,
as I said Previously the "local IP address" changes , may show up listed as "IP ADDRESS"
Here are the listings of the connection logs for all three
Network Manager log
rcvd [IPCP ConfAck id=0x4 <addr 78.132.30.74> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 78.132.30.74
remote IP address 10.64.64.64
primary DNS address 213.162.69.169
secondary DNS address 213.162.65.1
sakis3g log
rcvd [IPCP ConfAck id=0x4 <addr 10.106.48.227> <ms-dns1 213.162.69.170> <ms-dns2 213.162.65.2>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 10.106.48.227
remote IP address 10.64.64.64
primary DNS address 213.162.69.170
secondary DNS address 213.162.65.2
selfmade connection log
rcvd [IPCP ConfAck id=0x5 <addr 213.162.84.2> <ms-dns1 213.162.69.169> <ms-dns2 213.162.65.1>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 213.162.84.2
remote IP address 10.64.64.64
primary DNS address 213.162.69.169
secondary DNS address 213.162.65.1
also noted in Sakis3g ,good optimisation of the pppd options
hope this clarifies
regards
alexfish
ilhami
September 29th, 2010, 02:54 PM
Hi,
It works now perfectly with following Sakis3g configuration,
-console
--nostorage
--sudo
--pppd
SIM_PIN=6506
FORCE_APN="business.gprsinternet"
APN_USER="t-mobile"
APN_PASS="tm"
DIAL=*99#
BAUD=115200
gruplug
PPPD_OPTIONS="modem crtscts -detach defaultroute dump noipdefault usepeerdns usehostname ktune logfd 2 noauth lock maxfail 3 ipcp-accept-local ipcp-accept-remote noaccomp nobsdcomp noccp nopcomp novj novjccomp debug"
alexfish
September 29th, 2010, 06:13 PM
hi
good news
I think Sakis would appreciate a posting on the Sakis3g forum/ Working Setups
Regards
alexfish
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.