Frédéric BERNON | 1 Jul 2008 18:21
Picon

RE : How to begin using lwIP stack

Hi,

When you have create a lwipcfg_msvc.h file, do you have set values to be compatible with your network
(LWIP_PORT_INIT_IPADDR, LWIP_PORT_INIT_GW, LWIP_PORT_INIT_NETMASK) ?

I suppose you don't use the last lwip/contrib/ports/win32, because the "ping" application is enabled in
your case. Last contrib files allow to enable/disable "apps" started in the test.

Do use the test.c as starting point, you could remove all the code inside the apps_init() function, and add
your own one.

Question: what is your interest of using lwIP as IP stack on a Windows environment ?

To help you on such problems, perhaps it will be faster to chat on the lwIP IRC channel (#lwip on chat.freenode.net).

  
====================================
Frédéric BERNON 
HYMATOM SA 
Chef de projet informatique 
Microsoft Certified Professional 
Tél. : +33 (0)4-67-87-61-10 
Fax. : +33 (0)4-67-70-85-44 
Email : frederic.bernon@... 
Web Site : http://www.hymatom.fr 

Plan d'accès au siège social 

====================================
P Avant d'imprimer, penser à l'environnement
(Continue reading)

Antonio de Angelis | 2 Jul 2008 10:50
Picon
Favicon

Re : RE : How to begin using lwIP stack

Hi,

firs of all thank you for your reply. I've modified my lwipcfg_msvc.h file  
with appropriate values and now when I start the Test.exe application I  
obtain these results:

Starting lwIP, loopback interface IP is 127.0.0.1
Starting lwIP, local interface IP is 192.168.1.200
  0: \Device\NPF_GenericDialupAdapter
  1: \Device\NPF_{7A579B11-E5FE-4EFE-AB55-AD42C66289D1}
  2: \Device\NPF_{48C5A4AA-056F-4955-BB40-55BAD478E21C}
  3: \Device\NPF_{7F6AC404-196A-4726-B708-2EB0643B7673}
USE: Intel(R) PRO/100 VE Network Connection (Microsoft's Packet Scheduler)
MAC: 00:13:A9:08:7E:F4
link_callback==UP
status_callback==UP, local interface IP is 192.168.1.200
ping: send 192.168.1.1
3com.com: 192.136.34.41
sntp_process: Wed Jul 02 10:23:44 2008
ping: recv - 999 ms - timeout
ping: send 192.168.1.1
ping: recv - 999 ms - timeout
ping: send 192.168.1.1
ping: recv 192.168.1.1 2 ms
ping: send 192.168.1.1
ping: recv - 999 ms - timeout
ping: send 192.168.1.1
ping: recv 192.168.1.1 2 ms
ping: send 192.168.1.1
ping: recv - 999 ms - timeout
(Continue reading)

Frédéric BERNON | 2 Jul 2008 11:41
Picon

RE : Re : RE : How to begin using lwIP stack

Hi

>link_callback==UP
>status_callback==UP, local interface IP is 192.168.1.200
Ok, your netif is "up"

>3com.com: 192.136.34.41
DNS client is working

>sntp_process: Wed Jul 02 10:23:44 2008 
SNTP client is working

>ping: send 192.168.1.1
>ping: recv - 1000 ms - timeout
It's seems that your gateway doesn't always answer (do a wireshark capture to be sure, perhaps the problem
is somewhere else).

>I'm using the last stable contrib-1.3.0, (23 Mar 2008), not the version on CVS, and i cannot decide what
apps to start in Test.exe.
Take a look to
http://cvs.savannah.gnu.org/viewvc/contrib/ports/win32/test.c?revision=1.15&root=lwip&view=markup,
in apps_init(), you will see how the last release allows to configure which apps are started (the last code
is not very different than the one you use)

>I think that now the stack is working, isn't it?
Yes, it seems it work. You can check an incoming tcp connection by trying to connect to
http://NETBIOSLWIPDEV (it should work since the netbios "server" is started in test.c) or
http://192.168.1.200 .

>modbus protocol on tcp
(Continue reading)

zhou yi | 1 Jul 2008 17:37

Why can not use VC6 open lwip 1.3 porting project

Dear all:
    I download controb-1.3.0.zip from the website, but I can not open the vc6 simulation project test.dsw, which is in "contrib\ports\win32\msvc6\test.dsw". Every time I try to open test.dsw using Visual stuido 6.0 with sp6, but nothing happen. Other dws file can open successfully.
    Does anyboy can open test.dsw with Visual Studio 6.0? Thanks
_______________________________________________
lwip-users mailing list
lwip-users@...
http://lists.nongnu.org/mailman/listinfo/lwip-users
Frédéric BERNON | 2 Jul 2008 16:57
Picon

RE : Why can not use VC6 open lwip 1.3 porting project

I suppose we have broken the previous project. But you can go to http://www.microsoft.com/express/vc/ and download the last - and free - visualC++ express, which work.
 
What is strange is that I can open&convert the dsw file using VC++2005 express without any problems.
 
 
 
====================================
Frédéric BERNON
HYMATOM SA
Chef de projet informatique
Microsoft Certified Professional
Tél. : +33 (0)4-67-87-61-10
Fax. : +33 (0)4-67-70-85-44
Email : frederic.bernon <at> hymatom.fr
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 
-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=hymatom.fr-qX2TKyscuCcdnm+yROfE0A@public.gmane.org [mailto:lwip-users-bounces+frederic.bernon=hymatom.fr-qX2TKyscuCcdnm+yROfE0A@public.gmane.org] De la part de zhou yi
Envoyé : mardi 1 juillet 2008 17:38
À : lwip-users-qX2TKyscuCcdnm+yROfE0A@public.gmane.org
Objet : [lwip-users] Why can not use VC6 open lwip 1.3 porting project

Dear all:
    I download controb-1.3.0.zip from the website, but I can not open the vc6 simulation project test.dsw, which is in "contrib\ports\win32\msvc6\test.dsw". Every time I try to open test.dsw using Visual stuido 6.0 with sp6, but nothing happen. Other dws file can open successfully.
    Does anyboy can open test.dsw with Visual Studio 6.0? Thanks
Attachment (Frédéric BERNON.vcf): text/x-vcard, 589 bytes
_______________________________________________
lwip-users mailing list
lwip-users@...
http://lists.nongnu.org/mailman/listinfo/lwip-users
Picon
Picon

Re: RE : Why can not use VC6 open lwip 1.3 porting project

It could also be that he is missing LWIP_DIR environment variable, which 
should point to the directory containing the main lwip CHANGELOG file.

I think the readme.txt in the win32 port folder says to look at a 
readme.txt in the vc6 folder, which is missing. This (missing) 
readme.txt file should tell you to create the environment variable...

Simon

Frédéric BERNON wrote:
> I suppose we have broken the previous project. But you can go to 
> http://www.microsoft.com/express/vc/ and download the last - and free 
> - visualC++ express, which work.
>  
> What is strange is that I can open&convert the dsw file using VC++2005 
> express without any problems.
>  
>  
>  
> /====================================/
> /*Frédéric BERNON*/
> /HYMATOM SA/
> /Chef de projet informatique/
> /Microsoft Certified Professional/
> /Tél. : +33 (0)4-67-87-61-10/
> /Fax. : +33 (0)4-67-70-85-44/
> /Email : frederic.bernon@.../
> /Web Site : //http://www.hymatom.fr/ <http://www.hymatom.fr/> 
> /Plan d'accès au siège social/ 
>
<http://maps.google.fr/maps?f=d&hl=fr&geocode=17190092756901062382,43.553785,3.951452&saddr=&daddr=HYMATOM+SA&sll=43.653342,3.958297&sspn=0.023505,0.040169&ie=UTF8&ll=43.653528,3.951623&spn=0.011753,0.020084&t=h&z=16> 
>
> /====================================/
> /P Avant d'imprimer, penser à l'environnement/
>  
>
>     -----Message d'origine-----
>     *De :* lwip-users-bounces+frederic.bernon=hymatom.fr@...
>     [mailto:lwip-users-bounces+frederic.bernon=hymatom.fr@...]
>     *De la part de* zhou yi
>     *Envoyé :* mardi 1 juillet 2008 17:38
>     *À :* lwip-users@...
>     *Objet :* [lwip-users] Why can not use VC6 open lwip 1.3 porting
>     project
>
>     Dear all:
>         I download controb-1.3.0.zip from the website, but I can not
>     open the vc6 simulation project test.dsw, which is in
>     "contrib\ports\win32\msvc6\test.dsw". Every time I try to open
>     test.dsw using Visual stuido 6.0 with sp6, but nothing happen.
>     Other dws file can open successfully.
>         Does anyboy can open test.dsw with Visual Studio 6.0? Thanks
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@...
> http://lists.nongnu.org/mailman/listinfo/lwip-users
xcbman | 3 Jul 2008 05:07
Favicon

about socket test problem?

i use lwip1.3.0 in WinXp(ethernet),run down code,it will assert many point some time later. can any body help me? or do the test?
 
 
call testSocketFunc(). assert point such as:
 
 void tcp_slowtmr(void) -> LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
  static err_t tcp_process(struct tcp_pcb *pcb)  -> if ((flags & TCP_ACK) && (flags & TCP_SYN) && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) ->pcb->unacked==NULL
etc..
 
void testSocket_connect_send_func(int cnt)
{
   int sock;
   struct sockaddr_in ListSvAddr;
  char sRecvBuff[100];
 
  sock = socket(PF_INET, SOCK_STREAM, 0);
  if(sock == -1){   
   return;
  }
 
  memset(&ListSvAddr,0,sizeof(ListSvAddr));
  ListSvAddr.sin_family=AF_INET;
  ListSvAddr.sin_port=htons(TEST_SERVER_PORT);
  ListSvAddr.sin_addr.s_addr=inet_addr(TEST_SERVER_IP);
  
  iRet = connect(sock,(struct sockaddr*)&ListSvAddr,sizeof(ListSvAddr));
  if(iRet != ERR_OK){   
   close(sock);
   return;
  }
 
  sprintf(sRecvBuff,"send pkt times:%d",nCnt);
  iRet = send(sock,sRecvBuff,strlen(sRecvBuff),0);
 
  close(sock);
  return;
}
 
void testSocketFunc(void)
{
 int i=1;
 
 while (1)
 {
    testSocket_connect_send_func(i++);
 }
}
 
 
 
 
_______________________________________________
lwip-users mailing list
lwip-users@...
http://lists.nongnu.org/mailman/listinfo/lwip-users
xcbman | 3 Jul 2008 05:15
Favicon

may be is bug in lwip1.3.0

i find some point,may be bug, in testing lwip1.3.0,hope useful to everybody.
 
1. ppp.c ->pppClose()
 
  if(!pc->linkStatusCB) {
    while(st >= 0 && lcp_phase[pd] != PHASE_DEAD) {
      sys_msleep(500);
      //break; //remove to resolve pppclose immediatly return ,may be is a lwip bug.
    }
  }
 
2. sockets.c ->lwip_recvfrom()
 
      if (!buf) {
        /* We should really do some error checking here. */
        LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL!\n", s));
  if(sock->conn==NULL)    //add : close(sock)=>free(sock->conn)=>netconn_recv() return 0;
   sock_set_errno(sock,ERR_CLSD); //add
  else
   sock_set_errno(sock, (((sock->conn->pcb.ip!=NULL) && (sock->conn->err==ERR_OK))?ETIMEDOUT:err_to_errno(sock->conn->err)));
  return 0;
      }
_______________________________________________
lwip-users mailing list
lwip-users@...
http://lists.nongnu.org/mailman/listinfo/lwip-users
Kieran Mansley | 3 Jul 2008 10:24

Re: may be is bug in lwip1.3.0

On Thu, 2008-07-03 at 11:15 +0800, xcbman wrote:
> i find some point,may be bug, in testing lwip1.3.0,hope useful to
> everybody.

It's not at all clear what the problem you've found is.  Can you explain
in more detail please?

Kieran
Kieran Mansley | 3 Jul 2008 10:25

Re: about socket test problem?

On Thu, 2008-07-03 at 11:07 +0800, xcbman wrote:
>  void tcp_slowtmr(void) -> LWIP_ASSERT("tcp_slowtmr: active pcb-
> >state != TIME-WAIT\n", pcb->state != TIME_WAIT);

This sort of error usually means you've got a corrupt list of PCBs,
which is usually because you've got more than one thread active in the
core of lwIP at one time.  Which port of lwIP are you using?

Kieran

Gmane