Yeah, the procedure is exactly as you descript with address setting, netifadd, 
etc...

IP4_ADDR(&ip, 192, 168, 100, 250);
IP4_ADDR(&netmask, 255, 255, 255, 0);
IP4_ADDR(&gateway, 192, 168, 100, 1);
if (NULL == netif_add(&dev_netif, &ip, &netmask, &gateway, NULL,
ethernetif_init, ethernet_input)) {
LWIP_ASSERT("NULL == netif_add", 0);
}

netif_set_default(&dev_netif);
netif_set_status_callback(&dev_netif, eth_cb_netif_status);
netif_set_up(&dev_netif);

And both output low level functions are being called (catched by breakpoint). I 
presume you do mean (in my case):
ethernetif_output() -> etharp_output
ethernetif_linkoutput -> gmac_low_level_output
as they are set in netif:
netif->output = etharp_output;
netif->linkoutput = gmac_low_level_output;


________________________________________
From: lwip-users [lwip-users-bounces+inderjit.singh=evidente...@nongnu.org] on 
behalf of Sergio R. Caprile [scapr...@gmail.com]
Sent: 04 June 2018 18:18
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] tcp_connection (no SYN packet on server side)

OK, so it seems you are correctly calling lwIP in the loop, and your
networking parameters look good.
However, I failed to ask how do you setup your netif. You don't tell.
You should do something like this before actually calling tcp_connect():

IP4_ADDR(&gw, 192,168,100,1);
IP4_ADDR(&ipaddr, 192,168,100,250);
IP4_ADDR(&netmask, 255,255,255,0);

lwip_init();
netif_add(&netif, &ipaddr, &netmask, &gw, perhaps NULL,
ethernetif_init, ethernet_input);
netif_set_default(&netif);

Where your ethernetif_init() will properly init stuff...
netif->output = etharp_output;
netif->linkoutput = ethernetif_linkoutput;//driveroutputfunction

Can you fire a breakpoint at your ethernetif_output() and
ethernetif_linkoutput?

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to