Free (GPLv2) TCP/IP stack developed by TASS Belgium
Dependents: lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more
PicoTCP. Copyright (c) 2013 TASS Belgium NV.
Released under the GNU General Public License, version 2.
Different licensing models may exist, at the sole discretion of the Copyright holders.
Official homepage: http://www.picotcp.com
Bug tracker: https://github.com/tass-belgium/picotcp/issues
Development steps:
initial integration with mbed RTOSgeneric mbed Ethernet driverhigh performance NXP LPC1768 specific Ethernet driverMulti-threading support for mbed RTOSBerkeley sockets and integration with the New Socket APIFork of the apps running on top of the New Socket APIScheduling optimizations- Debugging/benchmarking/testing
Demo application (measuring TCP sender performance):
Import programlpc1768-picotcp-demo
A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.
Revision 99:1c92cc810ecb, committed 2013-10-18
- Comitter:
- tass
- Date:
- Fri Oct 18 09:39:45 2013 +0000
- Parent:
- 98:b0575c2cc01c
- Child:
- 101:37763e3777a7
- Commit message:
- Issue #44 fixed.
Changed in this revision
EthernetInterface/EthernetInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EthernetInterface/EthernetInterface.cpp Wed Oct 16 12:47:37 2013 +0000 +++ b/EthernetInterface/EthernetInterface.cpp Fri Oct 18 09:39:45 2013 +0000 @@ -68,7 +68,10 @@ if (PICO_DHCP_ERROR == code) goto fail; - + + if (PICO_DHCP_RESET == code) + goto reset; + id = pico_dhcp_get_identifier(dhcp_xid); if (!id) goto fail; @@ -93,6 +96,9 @@ eth_dbg("DHCP request failed!\n"); dhcp_retval = -1; dhcp_mx.unlock(); + +reset: + eth_dbg("DHCP reset!\n"); } static void init_eth(void) @@ -149,12 +155,14 @@ } int EthernetInterface::connect(unsigned int timeout_ms) { + IGNORE_PARAMETER(timeout_ms); //dhcp_mx.lock(); do we still need this ? if (use_dhcp) { if (pico_dhcp_initiate_negotiation(lpc_eth, &dhcp_cb, &dhcp_xid) < 0) return -1; - dhcp_mx.lock(timeout_ms); // wait for a sign + dhcp_mx.lock(); // wait for a sign +//timeout_ms removed because rtos limit lock timeout to approximate 65 seconds. return dhcp_retval;