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

Sending data from netduino+ethernet/wifi shield to a sql server (MS) on the web

ado.net sql server wifi

  • Please log in to reply
3 replies to this topic

#1 luther

luther

    New Member

  • Members
  • Pip
  • 1 posts

Posted 01 February 2013 - 08:17 PM

Hi, this is my first post in netduino's forum, I find this community great and helpful. My new project is to use netrduino to: *sensor my room temperature and store data in a sd card *with the use of a wifi/Ethernet shield, send every 2min the data stored in my sd card to a SQL Server (MS) on the web *I've created a website that will retrieve data from the sql server and display all the data in browser, so that when I'm away from home I can monitor my home temp. I've read many solutions, but in most cases i need a pc that acts like a bridge between the netduino and the sql server.

Furthermore I'm using MS azure as sql server and would I like to know ado.net can be used to program the netduino? if not what is the best solution?  

Thanks in advance



#2 strent

strent

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 02 February 2013 - 11:12 PM

You will need to create a web service to handle the SQL input.

 

I have created something similar using WCF REST. My netduino posts a JSON string to my service and then the service saves the values in the database.



#3 Mark Anderson

Mark Anderson

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationChciago

Posted 07 January 2014 - 09:05 PM

You will need to create a web service to handle the SQL input.

 

I have created something similar using WCF REST. My netduino posts a JSON string to my service and then the service saves the values in the database.

 

Would you mind posting your solution (never done anything with REST or JSON before)



#4 David Karlas

David Karlas

    New Member

  • Members
  • Pip
  • 9 posts

Posted 08 January 2014 - 06:07 PM

Because SQL database TCP protocol is very complex compering to HTTP requests. You should not connect directilly to database but instead to your web service which should run inside same application as your website.
 
I suggest you to create restful web service where you will call something like this http://youraddress-a...livingroom/23.4.
 
Since your data is so simple you don't even have to bother with JSON or XML...(see last link for more details)

 

Here is guide about creating WebServices with ASP.NET on msdn: http://msdn.microsof...(v=vs.108).aspx
Also nice explination about RestFul on CodeProject: http://www.codeproje...ASP-NET-Web-API

Google and Youtube can be alot of help aswel.

 

What you have to do on NetDuino side is something like this:

Quick sample: http://stackoverflow...etrequeststream

Nice blog post(focus on function [color=rgb(0,0,0);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:12px;]SendPulseOximeterData)[/color]: http://mikedodaro.ne...st-web-service/






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.