Netduino Plus as web service server
#1
Posted 21 November 2012 - 05:38 PM
#2
Posted 21 November 2012 - 06:54 PM
I'd recommend my book, but admittedly I'm a bit partialHello all,
I have a Netduino Plus (probably pick me up a Plus 2 now ) and want to know how I can have it use the Ethernet to respond to a web service call from another host computer. Basically I am wanting to control calling a method which will pass data into several shift registers which are daisy-chained to light LEDs. I thought about using a web page type example and then looking at the query string to figure out which LEDs should be on but it seems that a real web service might be a better (possibly more secure?) way to go. Any examples or thoughts are appreciated.
http://www.amazon.co...s/dp/1449393578
I am waiting for my Netduino Plus 2 so that I can test the examples there as well, with NETMF 4.2.
Cuno
#3
Posted 21 November 2012 - 07:21 PM
Ohh it's a good book, I vouch for that!I'd recommend my book, but admittedly I'm a bit partial
http://www.amazon.co...s/dp/1449393578
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#4
Posted 21 November 2012 - 07:26 PM
I've followed your link to Amazon.com, but don't see a specific answer to the original question--can the Netduino Plus 2 be used to expose a web service?
I'm curious about this as well--in my case I'm not lighting LEDs, I'm simply storing data. What I'm out to do is to create a simple data logger, based on the Netduino Plus 2, that exposes two web service methods. These mimic the web service interfaces exposed by our cloud data center--the data logger will enable us to support temporary field installations of digital energy meters, and record the meter data for replay at a later date.
(Background: we make digital energy meters, which typically report energy consumption over an IP network. In some circumstances clients want to meter energy consumption in places [construction sites, temporary mining or drilling sites, etc.] where Internet connectivity is impractical, and the weight, bulk, and cost of a PC make the project impractical. A Netduino Plus, an Ethernet cable, and a couple of pieces of Velcro to place the logger in our enclosure would do the trick perfectly.)
I have seen the "Embedded Netduino-Compatible Web Server" project on Codeplex--I'm a bit concerned about the explicit warning against HTTPRequest headers larger than 1K, but don't think that will be a problem. Do you discuss this web server (or another) in your book?
Thanks for your help.
I'd recommend my book, but admittedly I'm a bit partial
http://www.amazon.co...s/dp/1449393578
I am waiting for my Netduino Plus 2 so that I can test the examples there as well, with NETMF 4.2.
Cuno
#5
Posted 21 November 2012 - 07:38 PM
I'd recommend my book, but admittedly I'm a bit partial
http://www.amazon.co...s/dp/1449393578
I am waiting for my Netduino Plus 2 so that I can test the examples there as well, with NETMF 4.2.
Cuno
That's the book that got me started on the Netduino!
I have not used Pachube since I folllowed your examples. I know there have been some changes to Pachube since then. Is the book still OK for a complete internet novice (as I was)?
Paul
#6
Posted 22 November 2012 - 06:49 AM
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 down - 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. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#7
Posted 22 November 2012 - 09:28 AM
Yes, definitely. The book has three parts, the third part is about exposing simple RESTful Web services on a Netduino Plus. (No DPWS or similarly heavy-weight Web services though.)can the Netduino Plus 2 be used to expose a web service?
Originally I tried developing the book examples with Microsoft's HTTP classes, but they used up too much RAM and Flash for the NP, so I wrote my own simple Web server for the book. Even there I came uncomfortably close to the NP's memory limits. With the additional 64 KB of RAM on an NP2, this will be far less of an issue. Hope that it will arrive any day now...
Do you need to access devices behind a firewall? If so, the book shows a robust way without the hassles of port forwarding or similar schemes.
#8
Posted 22 November 2012 - 09:31 AM
Pachube has been sold and is now called Cosm. The REST API has changed somewhat, but not much (http://www.gsiot.inf...achube-to-cosm/).I have not used Pachube since I folllowed your examples. I know there have been some changes to Pachube since then. Is the book still OK for a complete internet novice (as I was)?
I will test everything again, including the modifications in Part I for NETMF 4.2, when I get my Netduino Plus 2.
#9
Posted 25 November 2012 - 05:16 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users