sde1000 / nanodeuip Goto Github PK
View Code? Open in Web Editor NEWPort of uIP library to Nanode
Home Page: http://wiki.hackspace.org.uk/wiki/Project:Nanode/UIP
Port of uIP library to Nanode
Home Page: http://wiki.hackspace.org.uk/wiki/Project:Nanode/UIP
From 5f386f3 Mon Sep 17 00:00:00 2001
From: maniacbug [email protected]
Date: Sun, 8 Jan 2012 14:24:33 -0800
Subject: [PATCH] Packet slicer.
Allows processing of (and ignores checksums on) packets which are smaller than the packet header believes. This is very useful in highly-constrained memory environments. The most likely case of a sliced packet is the network later truncated it because the packet is larger than the UIP buffer.
uip.cpp | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/uip.cpp b/uip.cpp
index 8e577a9..5618d50 100644
--- a/uip.cpp
+++ b/uip.cpp
@@ -690,6 +690,8 @@ void
uip_process(u8_t flag)
{
register struct uip_conn *uip_connr = uip_conn;
if(flag == UIP_UDP_SEND_CONN) {
@@ -876,7 +878,8 @@ uip_process(u8_t flag)
} else {
UIP_LOG("ip: packet shorter than reported in IP header.");
@@ -950,7 +953,10 @@ uip_process(u8_t flag)
UIP_STAT(++uip_stat.ip.drop);
UIP_STAT(++uip_stat.ip.chkerr);
UIP_LOG("ip: bad checksum.");
UIP_LOG("Ignoring because packet was sliced.");
goto drop;
@@ -1100,7 +1106,10 @@ uip_process(u8_t flag)
UIP_STAT(++uip_stat.udp.drop);
UIP_STAT(++uip_stat.udp.chkerr);
UIP_LOG("udp: bad checksum.");
UIP_LOG("Ignoring because packet was sliced.");
goto drop;
From e7db1e7d356eaff1d6f8c53a6e017673bd55748c Mon Sep 17 00:00:00 2001
From: maniacbug
Date: Sun, 1 Jan 2012 21:50:05 -0800
Subject: [PATCH] Fixed a buffer overrun bug in enc28j60ReadBuffer. This
writes all over memory it doesn't own. Bad stuff.
---
enc28j60.cpp | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/enc28j60.cpp b/enc28j60.cpp
index 3d5630e..ee04647 100644
--- a/enc28j60.cpp
+++ b/enc28j60.cpp
@@ -86,7 +86,6 @@ void enc28j60ReadBuffer(uint16_t len, uint8_t* data)
*data++ = SPDR;
}
disableChip();
- *data='\0';
}
static word enc28j60ReadBufferWord() {
--
1.7.5.4
Hi guys,
I am developpin' on an arduino UNO board rev 3 and I have plugged into it a ENC28J60-H ethernet shield.
I'm using the NanodeUIP,NanodeUNIO librairies for my application and I don't know how to get an IP address usin' DHCP. I've also tried the uiptest example but it doesn't work at all.
Maybe I'm just an ignorant newbie in the Arduino World but I definitively don't know how to make it works.
Please I need some help.
Cheers
You might want to point out in the readme that DHCP can cause issues for a 450-byte packet size. The default DHCP Offer packet is 590 bytes. Some routers have a configuration to reduce it down to the ~300 necessary bytes, but others do not. (See http://www.linksysinfo.org/index.php?threads/dhcp-reduce-packet-size.20699/ for one example).
In fact, RFC2131 says, "A DHCP client must be prepared to receive DHCP messages with an 'options' field of at least length 312 octets. This requirement implies that a DHCP client must be prepared to receive a message of up to 576 octets, the minimum IP datagram size an IP host must be prepared to accept [3]. " No help to those of us on MCU's!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.