[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
=?iso-8859-1?Q?[RE:] Re: [RE:] [RE:] Re: [lwip-users] How to test IP ove
From: |
Kishore |
Subject: |
=?iso-8859-1?Q?[RE:] Re: [RE:] [RE:] Re: [lwip-users] How to test IP over PPP =3F?= |
Date: |
Fri, 5 Dec 2003 11:48:24 +0100 |
> Was the changing of the asyncmap and the client/clientserver shake all
> you needed to do?
>
>
Ya,theoretically these were only these two hurdles.But im still suspicious
about this asynchmap value i had used.
But i list here all my work involved, hoping useful to other newbies:
1. sio.c has to be implemented,atleast with three methods sio_init, sio_read
and sio_write
2. sio_read() needs this CLIENT and CLIENTSERVER shaking included.
3.pppif.c and pppif.h added, implementing pppif_init(),pppMyCallback and
ppp_trace()
pppif_init(){
#if PPP_SUPPORT
pppInit();
#if PAP_SUPPORT || CHAP_SUPPORT
pppSetAuth(PPPAUTHTYPE_PAP, PPP_USER, PPP_PASS);
#endif
pppOpen(sio_open(COMM1), pppMyCallback, NULL);
#endif
}
void
pppMyCallback(void *a , int e, void * arg)
{
printf("callback %d \r\n",e);
}
void
ppp_trace(int level, const char *format,...)
{
va_list args;
va_start(args,format);
vprintf(format,args);
va_end(args);
}
although I think all of these methods could be implemeted in ppp.c as well.
3.Then running the ppp stack in uCOS task as shown below:
{
sys_init();
mem_init();
memp_init();
pbuf_init();
netif_init();
sem = sys_sem_new(0);
tcpip_init(tcpip_init_done, &sem);
sys_sem_wait(sem);
sys_sem_free(sem);
httpd_init();
pppif_init(&pppif);
chargen_thread(0);
}
4.Now make a direct connection using windows dial-up connection with the
following settings, appropriate to my uart implementation only.You might need
to change settings according to your implementation though.
Select the appropriate com port,set the appropirate speed, disable hardware
flow control (as i do no flow control)
In security tab,leave it to recommended settings
In ppp setting,only enabled LCP activation
In TCP/IP ,used another IP address than ip address used my normal NIC .
Now you are set to testing your ppp ,atleast first you should be able to
establish link connection using null modem cable ,if uart is correctly
implemented and connected.
5. But then,all my packets after LCP connection were discarded as bad FCS , so
i had set the asynchmap to 0xffffffffl in lcp_init()
wo->asyncmap = 0xffffffffl; <------------ /* Assume don't need to
escape any ctl chars. */
ao->asyncmap = 0xffffffffl; <----------- /* Assume don't need to
escape any ctl chars. */
And now I could establish tcp/ip connection after few negotiations which
included few dropping of packets as well :)
6.Since i used a direct connection ,and not connection to ISP using modem,i
dont get any IP address from my win ppp client.So i hardcoded it in
ipcp_wantptions.ouraddress in ipcp_init().
7.Now i could ping or telnet without a problem to remote ip.Although my http
request packets are getting discarded ,im trying to sort this out currently.
I think there is certainly better way to to do with deeper understanding, but
currently moving for the hiccups,http test :)
Thanks and regards,
Kishore Kumar Sathyanadam
Software Developement
TLON GmbH
- =?iso-8859-1?Q?[RE:] Re: [RE:] [RE:] Re: [lwip-users] How to test IP over PPP =3F?=,
Kishore <=