lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwIP and PPP for MC35i GSM module


From: Selwyn Jackson
Subject: [lwip-users] lwIP and PPP for MC35i GSM module
Date: Mon, 18 Oct 2004 19:10:01 +0200

I am new to lwIP and would appreciate any help.

I have an embedded system with no OS (threads).  I have modified pppMain so
that it can be called regularly from my main application.  I am getting some
sort of communication, but PPP does not seem co connect, or I have not
initialised everything.  It seems that I may be missing some link between
PPP and lwIP.

My software is as follows:

Initialisation:
        mem_init();
        memp_init();
        pbuf_init();
        netif_init();
        ip_init();
        udp_init();
        tcp_init();
        pppInit();
        install_ticker_service(tcp_fasttmr, 250/TICK_RATE);
        install_ticker_service(tcp_slowtmr, 500/TICK_RATE);
        mypcb = tcp_new();
        tcp_arg(mypcb, mycontext);
        tcp_sent(mypcb, tcpipSentCB);
        tcp_recv(mypcb, tcpipReceiveCB);
        tcp_poll(mypcb, tcpipPollCB, 10);
        tcp_err(mypcb, tcpipErrorCB);

Open port:
        myppp = pppOpen((void*)myport, &pppStatusCB, mycontext);
        IP4_ADDR(&localIpAddr, 0,0,0,0);
        IP4_ADDR(&remoteIpAddr, 192,168,640,124);
        localPort = remotePort = 7501;
        tcp_bind(mypcb, localIpAddr, localPort);
        tcp_connect(mypcb, remoteIpAddr, remotePort, tcpipConnectedCB);

I have implemented these functions:
        sio_read
        sio_write
        sio_read_abort
        tcpip_callback
        ppp_trace

My log is as follows:
TCP/IP test applications started.
Dialing
Waiting for connection
Modem Connected
L5 lcp_init: xmit_accm=0 0 0 0
pppOpen
L5 lcp_init: xmit_accm=0 0 0 0
pbuf_alloc(length=1504)
pbuf_alloc(length=1504) == 6221
L5 pppMain: unit 0: Connecting
sio_read 63
L7 pppInProc[0]: got 63 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8505
pbuf_alloc(length=0) == 8505
tcp_bind: bind to port 7501
tcp_connect to port 7501
tcp_enqueue(pcb=82B2, arg=0000, len=0, flags=2, copy=0)
tcp_enqueue: queuelen: 0
pbuf_alloc(length=4)
pbuf_alloc(length=4) == 6813
pbuf_header: old 6858 new 6844 (20)
tcp_enqueue: queueing 6509:6510 (0x2)
tcp_enqueue: 1 (after enqueued)
tcp_output: snd_wnd 512, cwnd 65537, wnd 0, effwnd 426573824, seq 426573824,
ack 3184132096
tcp_output: snd_wnd 512, cwnd 65537, wnd 0, effwnd 426573824, seq 426573824,
ack 0, i-16950
L7 pppStartCB: unit 0
L5 ppp_set_xaccm[0]: outACCM=0 0 0 0
L5 ppp_send_config[0]: outACCM=FF FF FF FF
L5 ppp_recv_config[0]: inACCM=0 0 0 0
L5 lcp_lowerup: asyncmap=0 0 0 0
L5 LCP: lowerup state 0 -> 2
L5 auth_reset: 0
L5 lcp_addci: L opt=2 0
L5 lcp_addci: L opt=5 15A
L5 lcp_addci: opt=7
L5 lcp_addci: opt=8
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8591
pbuf_alloc(length=0) == 8591
L5 pppWrite[0]: len=47
sio_write 47
pbuf_free(8591)
pbuf_free: deallocating 8591
L5 fsm_sdata(LCP): Sent code 1,1,20.
L5 LCP: sending Configure-Request, id 1
L5 LCP: open state 2 -> 6
pbuf_header: old 8512 new 8516 (-4)
L5 pppInput[0]: LCP len=29
L5 fsm_input(LCP):1,3,29
L5 fsm_rconfreq(LCP): Rcvd id 3 state=6
L5 lcp_reqci: rcvd MRU 2000 ASYNCMAP=A0000 PCOMPRESSION ACCOMPRESSION
L3 lcp_reqci: Nak AUTHTYPE CHAP not allowed
L5 lcp_reqci:  MAGICNUMBER (BC2C72D)
L5 lcp_reqci: returning CONFNAK.                (I sometimes get a CONFACK)
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8591
pbuf_alloc(length=0) == 8591
L5 pppWrite[0]: len=22
sio_write 22
pbuf_free(8591)
sio_read 1
L7 pppInProc[0]: got 1 bytes
sio_read 8
L7 pppInProc[0]: got 8 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8505
pbuf_alloc(length=0) == 8505
sio_read 2
L7 pppInProc[0]: got 2 bytes
sio_read 7
L7 pppInProc[0]: got 7 bytes
sio_read 34
L7 pppInProc[0]: got 34 bytes
L5 pppInProc[0]: Dropping bad fcs 0x4F69 proto=0x0021
L5 pppDrop: pbuf len=33
pbuf_free(8505)
pbuf_free: deallocating 8505
sio_read 1
L7 pppInProc[0]: got 1 bytes
sio_read 55
L7 pppInProc[0]: got 55 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8505
pbuf_alloc(length=0) == 8505
L5 pppInProc[0]: Dropping bad fcs 0xD262 proto=0x0023
L5 pppDrop: pbuf len=36
pbuf_free(8505)
pbuf_free: deallocating 8505
sio_read 1
L7 pppInProc[0]: got 1 bytes
sio_read 35
L7 pppInProc[0]: got 35 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 8505
pbuf_alloc(length=0) == 8505
L5 pppInProc[0]: Dropping bad fcs 0xC871 proto=0x0600
L5 pppDrop: pbuf len=23
pbuf_free(8505)
pbuf_free: deallocating 8505


Regards  Selwyn







reply via email to

[Prev in Thread] Current Thread [Next in Thread]