Compiling the Netduino.IP Network stack

Reading the source code, UdpSocket.cs, I found that it can only buffer one packet at a time. Looks like a trivial thing to fix but I ran into problems trying to compile the original code.

I added Netduino.IP.csproj and Netduino.IP.Interop.csproj to my project and also references to them. The reference to Netduino.IP.Interop in Netduino.IP was not found so I had to remove it and add it again.

Compiling it gives me this error:

Cannot parse method signature ‘DhcpStateMachine’ … \Netduino.IP - master\Netduino.IP\DHCPv4Client.cs 299

What am I doing wrong?

I also suspect that if I get it to compile I may have problems to deploy it since the stack is already in the firmware.

I use VS 2015.
I downloaded the code from:

Try compiling the code here:

I believe the Netduino.IP repo may not be complete.

OK. Do you mean this one?

It gave me the exact same error.

No, the code here:

Are you sure? I have searched the entire SDK without finding the source code for the stack. If it’s there you have to guide me how to find it.

Gah, maybe you’re right. I think I have misunderstood something in our build. Let me get back to you.

This is an issue with VS2015 and NETMF compiling an array of structs. Either use an earlier VS, or change the struct to a class (for a minor performance ding).

1 Like

Thank you! Now it compiles on VS2015 and runs on my device. Seems like it overrides the existing stack. Had to change about 4-5 structs. I guess, in some circumstances, using a class could also be a performance gain.

Well seems like I was a bit hasty there… I thought it was running because it deployed the assemblies and I could set a breakpoint and it stopped. But any changes I made was not executed. It is still running the original stack. I guess I need to remove it from the firmware in order to run my changes. Correct?

Finally had some time to work on this again and removing all except Netduino.IP.Interop.featureproj from TinyCLR.proj and build a new firmware made it possible to compile it and fix the UDP issue. One thing was strange though. The Netduino.IP.Interop version in the source code is but in the compiled version in the Netduino_SDK it is What is the difference? Where can we find the latest source code?