NeonMika.Webserver - Page 5 - Project Showcase - Netduino Forums
   
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

NeonMika.Webserver

webserver web server neonmika internet web server http sd xml json

  • Please log in to reply
213 replies to this topic

#81 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 08 December 2012 - 06:12 PM

I am working on loading this on my N2+.

namespace NeonMika.Webserver
{
    /// <summary>
    /// Interface between NeonMika.Webserver and the executing programm
    /// Use this class to work with your pins
    /// </summary>
    static public class PinManagement
    {
        //Standard output ports
        static private OutputPort Digital0 = new OutputPort(SecretLabs.NETMF.Hardware.NetduinoPlus.Pins.GPIO_PIN_D0, false);

Mercer,

I think part if not all of the problem may be the use of "SecretLabs.NETMF.Hardware.NetduinoPlus". Under 4.2.1 you should use "SecretLabs.NETMF.Hardware.Netduino" it now handles several of the boards.

Chuck

#82 Mercer

Mercer

    Member

  • Members
  • PipPip
  • 17 posts

Posted 08 December 2012 - 08:56 PM

Okay, now I get slightly different results

Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Diagnostics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.Netduino.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.OneWire.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Time.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\JSONLib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\SecretLabs.NETMF.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\SecretLabs.NETMF.Hardware.AnalogInput.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\NeonMika.XML.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\NeonMika.Util.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\NeonMika.Webserver.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Executeable\NeonMikaWebserver\NeonMikaWebserver\bin\Debug\le\NeonMikaWebserver.exe', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.dll', Symbols loaded.
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.SPOT.Hardware.dll

No additional information is included in the output window and no break point is hit in the program. After this point, I need to reflash the firmware to recover the device.

#83 Mercer

Mercer

    Member

  • Members
  • PipPip
  • 17 posts

Posted 09 December 2012 - 05:50 PM

Has anyone else built this on N2+ 4.2 SDK? If so, would you mind sharing the project? Thanks.

#84 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 December 2012 - 06:04 PM

Hi Mercer,

I am working on loading this on my N2+.

        static private OutputPort Digital0 = new OutputPort(SecretLabs.NETMF.Hardware.NetduinoPlus.Pins.GPIO_PIN_D0, false);

Please do the following:

1. Remove the SecretLabs.NETMF.Hardware.NetduinoPlus.dll assembly from your project.
2. Add the SecretLabs.NETMF.Hardware.Netduino.dll assembly as a reference instead.
3. Change your line to read ".Netduino.Pins." instead of ".NetduinoPlus.Pins."

Does that fix things for you?

Chris

#85 JJJ

JJJ

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationItaly

Posted 09 December 2012 - 06:16 PM

I had the same Mercer problem.
Changing from SecretLabs.NETMF.Hardware.NetduinoPlus.dll to SecretLabs.NETMF.Hardware.Netduino.dll does not resolve the problem. Th board hangs, and i need to re-flash it.

Any idea?
Gerardo

#86 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 December 2012 - 06:22 PM

Hi Gerardo,

Any idea?
Gerardo

If you can share a small code snippet (5-10 lines) which reproduces this issue, we'll be happy to test it out and figure out what's going wrong.

Are you using the latest (4.2.1.2) firmware?

Chris

#87 JJJ

JJJ

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationItaly

Posted 09 December 2012 - 06:29 PM

Chris, it's difficult to share the code, because VS hangs, the board hangs, the result in th debug window exactly the same of Mercer one.
I'm using N2+ with 4.2.1.2
Today i was testing even the netmftoolbox-20443 basic speaker sample, and i had the same result: VS and the board hang.

VS must be terminated, and the board must be reflashed.

Thank you, and I want to thank you for N2+, absolutely a great project!

Gerardo

#88 JJJ

JJJ

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationItaly

Posted 09 December 2012 - 06:45 PM

Chris,
FYI I had the same mercer problem explained here Blue screen.
I first suspected was my pc, but I tried at least 5 times and had always the same result using this web server project. After reflashing the board, I tested may other
project with no problem, as soon as I start this web server everything hangs.
Moreover, trying to detach the USB cable during VS hang, blue screen appears, while terminating VS first and then detach the board no blue screen appear, and I only have to
reflash the board.

Hope this could help you
Gerardo

#89 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 09 December 2012 - 09:55 PM

Has anyone else built this on N2+ 4.2 SDK? If so, would you mind sharing the project? Thanks.


Yes, I have it running on multiple Netduino Plus 2s. I have modified the project to work with my prototypes but I can try to recreate the upgraded base project. Just might need a day or so.

#90 Mercer

Mercer

    Member

  • Members
  • PipPip
  • 17 posts

Posted 09 December 2012 - 10:15 PM

Yes, I have it running on multiple Netduino Plus 2s. I have modified the project to work with my prototypes but I can try to recreate the upgraded base project. Just might need a day or so.


That would be awesome. Thanks!

#91 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 10 December 2012 - 07:44 PM

I've started with a clean version of NeonMika Webserver. I've made the appropriate changes to run on the Netduino Plus 2 and have deployed and tested it on the Netduino Plus 2.

You can download the modified project from this DropBox Link (sorry was too big to post here).

#92 gfcwfzkm

gfcwfzkm

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts
  • LocationBrig-Glis, Switzerland

Posted 10 December 2012 - 08:54 PM

=) Very Nice. I go Transform my Netduino to a Webserver =D EDIT:// I have many Problems to Port it to VisualBasic :(

#93 Mercer

Mercer

    Member

  • Members
  • PipPip
  • 17 posts

Posted 11 December 2012 - 04:47 AM

Thanks Dave. The download you provided works perfectly. I did have to make one small change when using DCHP.

//Dynamic IP
  interf.EnableDhcp( );
//interf.RenewDhcpLease( );

Calling RenewDhcpLease() sets the IP address to 0.0.0.0. Just calling EnableDhcp() enables DHCP and gets an address.

Thanks again!

#94 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 11 December 2012 - 11:22 AM

=) Very Nice.

I go Transform my Netduino to a Webserver =D

EDIT://
I have many Problems to Port it to VisualBasic :(


I would advise in a project this large to leave it in C#. You can build the project and create the DLLs, then create your master VB project and consume the DLLs.

#95 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 11 December 2012 - 11:26 AM

Thanks Dave. The download you provided works perfectly. I did have to make one small change when using DCHP.

//Dynamic IP
  interf.EnableDhcp( );
//interf.RenewDhcpLease( );

Calling RenewDhcpLease() sets the IP address to 0.0.0.0. Just calling EnableDhcp() enables DHCP and gets an address.

Thanks again!


You are correct. I forgot to change that in the project. I made the same change when using it my project. The RenewDhcpLease is only applicable if you already have an IP and are looking to renew the expiration of the lease with your network route or if you are connected to the network. If the RenewDhcpLease method runs while not connected to a DHCP enabled router or network, it will remove the network settings.

#96 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 12 December 2012 - 11:53 AM

avI am happy that you got it working :)avI am happy that you got it working :)

Dave, do you mind if I include your 4.2 version to my codeproject so everyone can download the version he/she needs?

@gfcwfzkm: You do not need to translate the code into VB. As Dave said, you can use the generated NeonMika.Webserver DLLs.
Though I never tried it, there is probably the possiblity to use both languages side-by-side. I don't know if it works on .Net MF, but I know it works on normal .Net ;)

Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#97 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 12 December 2012 - 12:04 PM

Dave, do you mind if I include your 4.2 version to my codeproject so everyone can download the version he/she needs?

Greets, Markus


Markus,

Yes, please include it. I know everyone is very busy and it is hard to find time to make upgrades and changes. Make any changes you feel are necessary. I simply fixed the 4.2 errors and was made it work on the ND+2.

I am happy that I was able to contribute back to you. I am using your web server on a new project and it works great!

#98 JJJ

JJJ

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationItaly

Posted 13 December 2012 - 02:09 PM

Dave, Markus thanks very much for your work. Now it works on NP+2, even if I did the same Dave's changes it seems that Dave hand it's better than mine ;-) Just a question: did you notice any latency into web response? It seems that sometimes the web server does not reply and Firefox reply with a timeout, than after few seconds it reply. Thanks Gerardo

#99 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 13 December 2012 - 02:21 PM

Dave, Markus
thanks very much for your work. Now it works on NP+2, even if I did the same Dave's changes it seems that Dave hand it's better than mine ;-)

Just a question: did you notice any latency into web response? It seems that sometimes the web server does not reply and Firefox reply with a timeout,
than after few seconds it reply.

Thanks
Gerardo


I haven't noticed any issues. In fact in my little testing it seems the Netduino Plus 2 responds faster than with Netduino Plus.

#100 Bendage

Bendage

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts
  • LocationIrvine, CA

Posted 27 December 2012 - 09:00 PM

I've started with a clean version of NeonMika Webserver. I've made the appropriate changes to run on the Netduino Plus 2 and have deployed and tested it on the Netduino Plus 2.

You can download the modified project from this DropBox Link (sorry was too big to post here).

 

Hey Dave,

 

If you remove the 2 unneeded 72mb dat files it will compress to about a meg and a half.

 

Question...

 

Why did you remove references to SecretLabs.NETMF.Hardware.NetduinoPlus and replace with SecretLabs.NETMF.Hardware.Netduino?







Also tagged with one or more of these keywords: webserver, web server, neonmika, internet, web, server, http, sd, xml, json

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.