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 RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling 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:
129:dbf9eddc9109
Parent:
127:476fed453d4d
Child:
142:35da43068894
--- a/EthernetInterface/EthernetInterface.cpp	Thu Dec 05 08:31:32 2013 +0000
+++ b/EthernetInterface/EthernetInterface.cpp	Thu Dec 05 12:38:26 2013 +0000
@@ -41,6 +41,7 @@
 #include "pico_dhcp_client.h"
 #include "pico_dns_client.h"
 #include "pico_ipfilter.h"
+#include "pico_slaacv4.h"
 //#define eth_dbg mbed_dbg
 #define eth_dbg(...)
 
@@ -62,6 +63,23 @@
 static bool use_dhcp = false;
 static bool is_initialized = false;
 
+void slaacv4_cb(struct pico_ip4 *ip, uint8_t code)
+{
+    struct pico_ip4 nm_ip4;
+    if(code == 0 && ip)
+    {
+        dhcp_retval = 0;
+        
+        pico_ipv4_to_string(ip_addr, ip->addr);
+        nm_ip4.addr = long_be(0xFFFF0000);
+        pico_ipv4_to_string(nm_addr,nm_ip4.addr);
+    }
+    else
+        dhcp_retval = -1;
+        
+    dhcp_mx.unlock();
+}
+
 static void dhcp_cb(void *cli, int code)
 {
     void *id = NULL;
@@ -99,9 +117,7 @@
     return;
     
 fail:
-    eth_dbg("DHCP request failed!\n");
-    dhcp_retval = -1;
-    dhcp_mx.unlock();
+    pico_slaacv4_claimip(lpc_eth,slaacv4_cb);
     
 reset:
      eth_dbg("DHCP reset!\n");