Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Network Toolkit and Netduino Plus


  • Please log in to reply
18 replies to this topic

#1 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 12 October 2010 - 11:57 PM

Hi, all. I have a Netduino Plus and am trying to get the Network Toolkit from CodePlex to work. Specifically the HTTP Webserver. http://mftoolkit.codeplex.com/ The project looks like it is written for the Microframework 3.0? The project files appear to have a reference to the various DNS.dll, IO.dll, HTTP.dll, MicroIO.dll, MicroHTTP.dll, etc. I'm assuming the project file are simply console application for testing the code for the Microframework? Does this mean I need to create my own project file and add references to the .DLLs that I need based on the example console applications? Finally, I'm assuming the .DLLs are compiled for Microframework 3.0 and I do not see any source where I can retarget them for 4.1? Any help or direction would be appreciated.

#2 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 13 October 2010 - 12:04 AM

The MFToolkit has class libraries for both .NET Micro Framework devices and regular .NET. The projects and compiled DLL's prepended with "Micro" are meant for the .NET Micro Framework. In order to make everything work with .NET Micro Framework 4.1, you'll will need to download the source code. Once you opened the solution, you will need to change the target framework for each project to .NET Micro Framework 4.1 (done in each project's properties section) and recompile the solution. For the regular .NET Framework projects (non micro) you'll need to set the target framework to .NET 4.0. Then you'll be able to add references in your project to the newly compiled DLL's.

#3 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 02:03 AM

The MFToolkit has class libraries for both .NET Micro Framework devices and regular .NET. The projects and compiled DLL's prepended with "Micro" are meant for the .NET Micro Framework.

In order to make everything work with .NET Micro Framework 4.1, you'll will need to download the source code. Once you opened the solution, you will need to change the target framework for each project to .NET Micro Framework 4.1 (done in each project's properties section) and recompile the solution. For the regular .NET Framework projects (non micro) you'll need to set the target framework to .NET 4.0.

Then you'll be able to add references in your project to the newly compiled DLL's.



Hi, thanks for the quick response.

I understand what you're saying, I just don't follow how I can re-use the original DNS.dll, HTTP.dll, etc., if they have been compiled with a different version of .NET?

For example, I opened the MicroHTTPConsole project, I removed the missing references and re-added them from the root directory of the project.

The build failed initially because of this line:

Error 1 The type or namespace name 'ExtendedTimeZone' does not exist in the namespace 'Microsoft.SPOT' (are you missing an assembly reference?) D:\Visual Studio 2010\Projects\NetworkingToolkit\MicroHTTPConsole\Program.cs 25 28 MicroHTTPConsole


I simply commmented it out, and now the build is returning this:

------ Rebuild All started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------
MicroHTTPConsole -> D:\Visual Studio 2010\Projects\NetworkingToolkit\MicroHTTPConsole\bin\Debug\MicroHTTPConsole.exe
C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.1\Device.targets(402,5): error MSB3021: Unable to copy file "D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroDNS.pe" to "bin\Debug\LE\MicroDNS.pe". Could not find a part of the path 'D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroDNS.pe'.
C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.1\Device.targets(402,5): error MSB3021: Unable to copy file "D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroHTTP.pe" to "bin\Debug\LE\MicroHTTP.pe". Could not find a part of the path 'D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroHTTP.pe'.
C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.1\Device.targets(402,5): error MSB3021: Unable to copy file "D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroNTP.pe" to "bin\Debug\LE\MicroNTP.pe". Could not find a part of the path 'D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroNTP.pe'.
C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.1\Device.targets(402,5): error MSB3021: Unable to copy file "D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroIO.pe" to "bin\Debug\LE\MicroIO.pe". Could not find a part of the path 'D:\Visual Studio 2010\Projects\NetworkingToolkit\LE\MicroIO.pe'.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

#4 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 02:10 AM

I'm not sure what the above errors means, but since I removed the original missing assembly reference and re-added, I changed the property for the assembly from "Copy Local" true to false. The build is successful. Unfortunately, I'm now getting an error when trying to deploy to my Netudino Plus. In VS2010 ErrorList window, I'm getting a: Error 1 An error has occurred: please check your hardware. The Output window returns: ------ Deploy started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------ ------ Deploy started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------ An error has occurred: please check your hardware. Object reference not set to an instance of an object. Source: Microsoft.SPOT.Debugger.CorDebug Stack : at Microsoft.SPOT.Debugger.VsProjectFlavorCfg.Deploy() in c:\depot\current\CLIENT_V4_1\Framework\CorDebug\VsProjectFlavorCfg.cs:line 893 at Microsoft.SPOT.Debugger.VsProjectFlavorCfg.<Microsoft.VisualStudio.Shell.Interop.IVsDeployableProjectCfg.StartDeploy>b__0() in c:\depot\current\CLIENT_V4_1\Framework\CorDebug\VsProjectFlavorCfg.cs:line 634 ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 October 2010 - 02:27 AM

dm3281, How big is the app you're trying to deploy (in bytes)? Is it more than 48KB? Chris

#6 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 02:36 AM

How can I tell?

#7 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 02:39 AM

The MicroHTTPConsole.exe that is created is 21,504 bytes

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 October 2010 - 02:39 AM

How can I tell?


Visual Studio should tell you how many bytes it's trying to deploy right after compiling...and right before your Netduino app starts running. It may be in the Output window.

Chris

#9 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 11:46 AM

This is all I'm seeing ------ Build started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------ MicroHTTPConsole -> D:\Visual Studio 2010\Projects\NetworkingToolkit\MicroHTTPConsole\bin\Debug\MicroHTTPConsole.exe ------ Deploy started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------ ------ Deploy started: Project: MicroHTTPConsole, Configuration: Debug Any CPU ------ An error has occurred: please check your hardware. Object reference not set to an instance of an object. Source: Microsoft.SPOT.Debugger.CorDebug Stack : at Microsoft.SPOT.Debugger.VsProjectFlavorCfg.Deploy() in c:\depot\current\CLIENT_V4_1\Framework\CorDebug\VsProjectFlavorCfg.cs:line 893 at Microsoft.SPOT.Debugger.VsProjectFlavorCfg.<Microsoft.VisualStudio.Shell.Interop.IVsDeployableProjectCfg.StartDeploy>b__0() in c:\depot\current\CLIENT_V4_1\Framework\CorDebug\VsProjectFlavorCfg.cs:line 634 ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 October 2010 - 03:18 PM

dm3281, Are you just compiling and deploying source...or are you referencing assemblies built with an old version of .NET MF? Just for sanity sake...create a new empty Netduino app and try to deploy that. Does that work? If so, the problem is in the Netduino App itself. If you can attach it here as a ZIP file, we could take a look at the project to help determine a solution... Chris

#11 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 03:55 PM

Hi - Thanks for the reply. I can deploy other projects succesfully without issue. I've attached a zip named MicroHTTP.ZIP which is basically the project that I was trying to deploy. I've only included the files which I believe are required. Please note that this is basically the Network Toolkit that is available on CodePlex at http://mftoolkit.codeplex.com/ that I was trying to convert to MF 4.1; unsuccesfully. I'm using a Netdunio Plus with latest beta firmware as shown in previous post entry. Thanks again!

Attached Files



#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 October 2010 - 04:04 PM

dm3281, The assemblies that you've added to your project are built using .NET MF 2.0 or 3.0 from a few years back. .NET MF has matured and changed a bit...and integrated a lot of these features since then--so you'll need assemblies which are built for .NET MF 4.1. Notes: With .NET on the desktop, you can generally include assemblies built with an older version of .NET--but on .NET MF the assemblies are targeted to a specific version. The general idea is that you can load all the files into your solution and compile them all together (but can still reference the PE/DLL files as in the desktop .NET world). Does the MF toolkit provide the source code so that you can just add the projects to your solution and then compile it all together? Also, many/most of these features may be built into .NET MF now. If you look at other TCP/HTTP projects (in the project showcase section for instance), you can get a good starting point for building network-enabled projects... Does this help get you started on the right path? Chris

#13 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 October 2010 - 07:43 PM

Hi, thanks for researching this for me. Yes, I didn't see where the assembly source was included for the MicroHTTP, MicroDNS, etc. It would seem that the author just provided the assemblies and the source only for the sample applications that use it. :( OK, at least I'm not doing anything wrong. I've pinged the author to see if he can provide the source. In the meantime, I guess I will look at some of the other available sample projects on this site. Thanks!

#14 mmw

mmw

    New Member

  • Members
  • Pip
  • 5 posts

Posted 18 October 2010 - 11:36 AM

Yes, I didn't see where the assembly source was included for the MicroHTTP, MicroDNS, etc. It would seem that the author just provided the assemblies and the source only for the sample applications that use it. :(

There are source files for the MicroHTTP and MicroDNS projects. They look empty because they're just referring to the .cs files located at HTTP and DNS projects. Have a look at the textual view of MicroHTTP.csproj, there you'll find references like:

<Compile Include="..\HTTP\HttpServer.cs">
      <Link>HttpServer.cs</Link>
    </Compile>

The same with MicroDNS, MicroNTP and maybe others.

Regards,
Myszor

#15 Michael Schwarz

Michael Schwarz

    Member

  • Members
  • PipPip
  • 21 posts

Posted 05 November 2010 - 01:17 PM

Just to inform you: I have upgraded all project files to support Visual Studio 2010 and build against .NET MF 4.1.

Download the release at http://mftoolkit.cod...ases/view/55143

Regards,
Michael

#16 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

Posted 06 November 2010 - 12:42 AM

Download the release at http://mftoolkit.cod...ses/view/55143.

There was a period at the end of you URL. The working link is http://mftoolkit.cod...ases/view/55143

#17 Michael Schwarz

Michael Schwarz

    Member

  • Members
  • PipPip
  • 21 posts

Posted 06 November 2010 - 08:32 AM

There was a period at the end of you URL. The working link is http://mftoolkit.cod...ases/view/55143



Thanks...

Michael

#18 dm3281

dm3281

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 02 December 2010 - 02:02 AM

Thanks. Michael. Do you think you can provide sampesnof usingmyour libraries. Real world stuff?

#19 Earthed

Earthed

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationAustralia

Posted 14 November 2011 - 10:52 PM

Had a similar problem on my GHI Fez Cobra and resolved:


refer to: GHI Fez Cobra Solution

somehow one reference in the project file got the following XML attribute set: processorArchitecture=MSIL, once removed , was able to deploy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.