[lwip-users] ppp-new threading question

2014-08-29 Thread Ivan Delamer
I feel almost embarrassed asking this but I haven't completely figured it out yet. In ppp-new, are packets sent to sio_write() from tcpip thread, or from the RX process thread? Or both? I just ask because sio_write() may block for some time (at least in my basic implementation) and I'm

[lwip-users] DHCP callback was removed - Correct way to obtain new address?

2014-08-29 Thread Chris Maier
Hi all, I am just porting my application from version 1.3.2 to the latest 1.4.2. and I was wondering why my application does not get called back from the stack when the DHCP As I found out the callback was removed. My application has to know the address for displaying purposes, so do I have

Re: [lwip-users] DHCP callback was removed - Correct way to obtain new address?

2014-08-29 Thread Paul Webber
Chris, I am using the TCP RAW. After starting DHCP I wait for the IP by using: While(main_netif.dchp-state != DHCP_BOUND). After the state changes to DHCP_BOUND the ip is in the pcb (main_netif.ip_addr). You can periodically check to see if the ip changes. I also include in the while statement

Re: [lwip-users] DHCP callback was removed - Correct way to obtain new address?

2014-08-29 Thread Sergio R. Caprile
When I did it, I basically polled for netif.dhcp-state == DHCP_BOUND and read ipaddr = netif.ip_addr; netmask = netif.netmask; gw = netif.gw; but now I realize the dhcp code calls netif_set_up() when it reaches that state, which also calls NETIF_STATUS_CALLBACK if

Re: [lwip-users] ppp-new threading question

2014-08-29 Thread Sylvain Rochet
Hi Ivan, On Fri, Aug 29, 2014 at 10:16:04AM -0600, Ivan Delamer wrote: I feel almost embarrassed asking this but I haven't completely figured it out yet. In ppp-new, are packets sent to sio_write() from tcpip thread, or from the RX process thread? Or both? tcpip thread only. (The stack

Re: [lwip-users] ppp-new threading question

2014-08-29 Thread Ivan Delamer
Ok, that's what I thought. I will have to re-implement sio_write(). What I'm concerned also is, sio_write() is meant to block until all data is pushed out. This can be more than a second in a slow 9600bps connection (still used sometimes!!!). Will PPP try to do something during this time like

Re: [lwip-users] ppp-new threading question

2014-08-29 Thread Sylvain Rochet
Hi Ivan, On Fri, Aug 29, 2014 at 02:38:11PM -0600, Ivan Delamer wrote: Ok, that's what I thought. I will have to re-implement sio_write(). What I'm concerned also is, sio_write() is meant to block until all data is pushed out. This can be more than a second in a slow 9600bps connection

Re: [lwip-users] DHCP callback was removed - Correct way to obtainnew address?

2014-08-29 Thread Noam weissman
Hi, ST micro has an example on how to use it. Check their latest examples for STM32F4 Hope that helped, Noam. -Original Message- From: lwip-users-bounces+noam=silrd@nongnu.org on behalf of Sergio R. Caprile Sent: Fri 8/29/2014 9:02 PM To: lwip-users@nongnu.org Subject: Re: