This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Need help for TCP/IP over PPP via GSM modem


Hello, there:
    I am using Redhat ECOS for our TCP/IP over PPP connection via GSM
modem. The ECOS source was downloaded from CVS about two months ago. The
GSM service provider is Cingular Wireless with GPRS enabled. The problem
is after PPP connection established, I was not able to ping or connect
to anywhere. It failed at recvfrom() with return -1 when used in the
ping_host(...) (see ppp_updown.c). The TCP/IP connect() API call waits
forever. But the same source code (only with different serial port on
the device) works with serial cable connected to my Linux box. With that
serial cable attached to Linux, I was able to do ping and to call
connect().
    Can anybody there help me with this problem? It seems to me that
with wireless modem PPP connection, the TCP/IP code does not work. By
the way, even though it failed at recvfrom() in the ping, I do see the
ICMP echo back in the port driver, and the echo data is correct, but
that incoming data is not used by recvfrom(). Why? Look at the routing
table, the local device IP address is assigned to: 10.216.27.198, but
the remote (at Cingular) IP address is: 66.102.185.195. Does this have
any conflict? These IP addresses are assigned automatically during PPP
connection.

    The following is the details how to set the PPP connection and what
the routing table is. Please let me know if you need more information. I
really appreciate your help with this problem.

For the PPP connection, I am using:
    user name: WAP@CINGULARGPRS.COM
    password: CINGULAR1
After using AT commands(baud rate is configured as 115200) :
    AT+CGDCONT=1,"IP","WAP.CINGULAR"
    ATD*99***1#
by supplying above user name and password in the CHAP, the PPP
connection has been established. 
 
After PPP connection established, I used ECOS API:
show_network_tables(printf)  to check the network information and I got
the following routing table:
"Routing tables " 

"Destination       Gateway          Mask       Flags       Interface " 

0.0.0.0           66.102.185.195   0.0.0.0      UGS         ppp0 

66.102.185.195    10.216.27.198                 UH          ppp0

127.0.0.0         127.0.0.1        255.0.0.0    UG          lo0

127.0.0.1         127.0.0.1                     UH          lo0

Interface statistics

lo0 

    IP: 127.0.0.1, Broadcast: 127.0.0.1, Netmask: 255.0.0.0

        UP, LOOPBACK, RUNNING, MULTICAST

    MTU: 16384, Metric: 0 

       Rx - Packets: 0, Bytes: 0, 

       Tx - Packets: 0, Bytes: 0

ppp0 

     IP: 10.216.27.198, Broadcast: 66.102.185.195, Netmask: 255.0.0.0

         UP, RUNNING, MULTICAST

     MTU: 1500, Metric: 0, 

         Rx - Packets: 0, Bytes: 0" 

         Tx - Packets: 0, Bytes: 0

============
Thank you a lot!

Weili Yao



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]