Getting Started with the Internet of Things 4.3.1 - Netduino Plus 2 (and Netduino Plus 1) - 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

Getting Started with the Internet of Things 4.3.1


  • Please log in to reply
7 replies to this topic

#1 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 28 April 2014 - 09:41 PM

I have published a new beta release of the samples for my book Getting Started with the Internet of Things here:

 

http://www.gsiot.inf...nd-mountaineer/

 

This is for NETMF release 4.3.1, and there are versions both for Netduino Plus 2 and for our own Mountaineer Ethernet Mainboards.

 

The samples have been revised and restructured, so that they are easier to set up, and easier to use on several platforms.

 

Cuno



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 April 2014 - 11:47 PM

Hi Cuno,

Thanks for sharing the code updates for your book!

One quick recommendation...be sure to add a little bit of code to make sure that the board has an IP address before connecting to the network. We're testing the next version of Netduino Plus 2 firmware and it starts apps quicker than before...before the ENC28J60 network chip even has a chance to get its DHCP address.

This has always been a best practice--but going forward it's going to be necessary for users who take advantage of the most enhanced firmware. Just watch for a valid IP in a loop at the beginning of your code.

And of course thank you for including us in the new revision of your book,

Chris

#3 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 29 April 2014 - 05:07 AM

Just watch for a valid IP in a loop at the beginning of your code.

Thanks, Chris, sound advice! Fortunately, that loop is already in there in the Web server  :) Had to be, as we're using the Ethernet controller built into the STM32, and use interrupt-driven DMA in the driver for the best possible speed. For Web clients, it appears to be less critical, though I'll have to do more testing to make sure.



#4 Randyrtx

Randyrtx

    New Member

  • Members
  • Pip
  • 2 posts

Posted 06 May 2014 - 05:51 PM

Cuno,

 

I've been working my way through the examples in the book, and have had success with setting up both the Xively and Yaler services. I'm now trying to run the HelloWebHtml example without the relay by commenting out the RelayDomain and RelaySecretKey assignments, and have hit a problem.

 

I've traced it to line #151 in Oberon.HttpServers.HttpServer.Open():

 

string[] elems = serviceRootPath.Split('/')

 

The serviceRootPath variable is set to null at this point, so the above line throws an exception on execution.

 

I'm using a Netduino Plus 2 updated to 4.3.1 and Gsiot 4.3.1 Device Beta 3.

 

Update: I got around the problem by hard-coding LocalUrl for the NP2's local network IP in the constructor for SocketServerStreamProvider, but I'm sure that is not the best way to correct the problem.


Edited by Randyrtx, 06 May 2014 - 07:56 PM.


#5 pajtimi

pajtimi

    New Member

  • Members
  • Pip
  • 2 posts

Posted 14 May 2014 - 06:19 PM

1



#6 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 14 May 2014 - 06:46 PM

Update: I got around the problem by hard-coding LocalUrl for the NP2's local network IP in the constructor for SocketServerStreamProvider, but I'm sure that is not the best way to correct the problem.

Dear Randyrtx

 

Thanks for this bug report, and the workaround! I'll prepare a correction for the next release.

 

Best regards

 

Cuno



#7 drakefang

drakefang

    New Member

  • Members
  • Pip
  • 2 posts

Posted 16 May 2014 - 04:43 AM

Hi Cuno,

 

I'm trying to implement POST method on netduino server using Gsiot 4.3.1 Device Beta 3 and seems like there's no POST method in RequestRouting class.

 

It might sounds silly but... how should I get started?

 

Also, does gsiot server support CORS ?



#8 Jack Chidley

Jack Chidley

    Advanced Member

  • Members
  • PipPipPip
  • 99 posts

Posted 18 May 2014 - 04:59 PM

I'm pretty sure that you can add a POST method (or any others you like) to the class. POST will probably be a derivative of the PUT case.

Jack




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.