Getting Started with the Internet of Things by Cuno Pfister - Visual Studio - 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 by Cuno Pfister


  • Please log in to reply
37 replies to this topic

#1 SimonM

SimonM

    Member

  • Members
  • PipPip
  • 10 posts

Posted 22 June 2011 - 09:16 AM

Hi, is /has anyone else worked through this book yet? Although it is quite well written with good examples, and I have learnt quite a bit about the netduino plus, I can't get past chapter 10 with the 'Hello Web' example. Is there any one else out there with the same issue? Yours Simon M.

#2 Cuno

Cuno

    Advanced Member

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

Posted 22 June 2011 - 07:28 PM

Simon, could you please post the result of MFDeploy's Device Capabilities command? That might be helpful. Of course, I would also like to hear of others who tried out the server examples. Yaler traffic indicates that some readers successfully use servers based on the book examples, but I don't know much more than that. Cuno

#3 SimonM

SimonM

    Member

  • Members
  • PipPip
  • 10 posts

Posted 27 June 2011 - 06:41 PM

Simon,

could you please post the result of MFDeploy's Device Capabilities command? That might be helpful.

Of course, I would also like to hear of others who tried out the server examples. Yaler traffic indicates that some readers successfully use servers based on the book examples, but I don't know much more than that.

Cuno


Thanks for the pointer Cuno.

Here it is...


HalSystemInfo.halVersion: 4.1.2821.0
HalSystemInfo.halVendorInfo: Netduino Plus by Secret Labs LLC
HalSystemInfo.oemCode: 34
HalSystemInfo.modelCode: 177
HalSystemInfo.skuCode: 4097
HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000
HalSystemInfo.systemSerialNumber: 0000000000000000
ClrInfo.clrVersion: 4.1.2821.0
ClrInfo.clrVendorInfo: Netduino Plus by Secret Labs LLC
ClrInfo.targetFrameworkVersion: 4.1.2821.0
SolutionReleaseInfo.solutionVersion: 4.1.0.6
SolutionReleaseInfo.solutionVendorInfo: Netduino Plus by Secret Labs LLC
SoftwareVersion.BuildDate: Feb 14 2011
SoftwareVersion.CompilerVersion: 400902
FloatingPoint: True
SourceLevelDebugging: True
ThreadCreateEx: True
LCD.Width: 0
LCD.Height: 0
LCD.BitsPerPixel: 0
AppDomains: True
ExceptionFilters: True
IncrementalDeployment: True
SoftReboot: True
Profiling: False
ProfilingAllocations: False
ProfilingCalls: False
IsUnknown: False

#4 StanDeMan

StanDeMan

    Member

  • Members
  • PipPip
  • 14 posts

Posted 27 June 2011 - 11:05 PM

Hi Cuno, thanks for your great book. I enjoyed to read it and I perused it in three days because I couldn't stop. :-) I get some exceptions with yaler. Sometimes it's working and sometimes not. I'm confused. What's wrong (see below)? I registerd at yaler and got my domain and secret key replaced it at the code. I think the code is okay - but... Do you saw this error before? Regards and thanks Stanislaus DHCP enabled: True MAC address: 5C-86-4A-00-04-54 Device address: 192.168.2.100 Gateway address: 192.168.2.1 Primary DNS address: 208.67.222.222 Base Uri: http://try.yaler.net/gsiot-WPS0-061Z/ #### Exception System.Exception - 0x00000000 (1) #### #### Message: Assertion violated #### Gsiot.Contracts.Contract::Assert [IP: 0009] #### #### Gsiot.Server.HttpServer::Run [IP: 0032] #### #### LedController::Main [IP: 005d] #### Eine Ausnahme (erste Chance) des Typs "System.Exception" ist in Gsiot.Server.dll aufgetreten. #### Exception System.ArgumentException - 0x00000000 (1) #### #### Message: Precondition violated #### Gsiot.Contracts.Contract::Requires [IP: 0009] #### #### Gsiot.Server.HttpServer::ConsumeRequest [IP: 000a] #### #### Gsiot.Server.HttpServer::Run [IP: 0044] #### #### LedController::Main [IP: 005d] #### Eine Ausnahme (erste Chance) des Typs "System.ArgumentException" ist in Gsiot.Server.dll aufgetreten. #### Exception System.ArgumentException - 0x00000000 (1) #### #### Message: Precondition violated #### Gsiot.Contracts.Contract::Requires [IP: 0009] #### #### Gsiot.Server.HttpServer::ConsumeRequest [IP: 000a] #### #### Gsiot.Server.HttpServer::Run [IP: 0044] #### #### LedController::Main [IP: 005d] #### Eine Ausnahme (erste Chance) des Typs "System.ArgumentException" ist in Gsiot.Server.dll aufgetreten. #### Exception System.ArgumentException - 0x00000000 (1) #### #### Message: Precondition violated #### Gsiot.Contracts.Contract::Requires [IP: 0009] #### #### Gsiot.Server.HttpServer::ConsumeRequest [IP: 000a] #### #### Gsiot.Server.HttpServer::Run [IP: 0044] #### #### LedController::Main [IP: 005d] #### Eine Ausnahme (erste Chance) des Typs "System.ArgumentException" ist in Gsiot.Server.dll aufgetreten. #### Exception System.ArgumentException - 0x00000000 (1) #### #### Message: Precondition violated #### Gsiot.Contracts.Contract::Requires [IP: 0009] #### #### Gsiot.Server.HttpServer::ConsumeRequest [IP: 000a] #### #### Gsiot.Server.HttpServer::Run [IP: 0044] #### #### LedController::Main [IP: 005d] #### Ein

#5 StanDeMan

StanDeMan

    Member

  • Members
  • PipPip
  • 14 posts

Posted 27 June 2011 - 11:12 PM

Hi all, now HalloWeb isn't running anymore. The same exceptions. Hm? I'll try it tomorrow again. Regards StanDeMan

#6 SimonM

SimonM

    Member

  • Members
  • PipPip
  • 10 posts

Posted 29 June 2011 - 07:44 AM

Hi Stanislaus What happens if you try running it on you network only? (remove the 'RelayDomain =' and 'RelaySecretKey =' lines) Yours Simon M.

#7 Cuno

Cuno

    Advanced Member

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

Posted 29 June 2011 - 08:55 AM

Hi Stanislaus, also, did you successfully try out some Pachube examples? In other words, were you able to open an outgoing connection to some server on the Internet? Under the hood, my HTTP server does the same when it registers with try.yaler.net. Cuno

#8 Cuno

Cuno

    Advanced Member

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

Posted 30 June 2011 - 11:54 AM

Hi Stanislaus,

I've provided a small diagnostics program (GsiotDiagnostics) at my book Web site http://www.gsiot.info/download/. Could you please run it?

And as Simon indicated, did you try HelloWeb with the RelayDomain and RelaySecretKey properties removed (e.g., commented out)?

Best regards

Cuno

#9 Cuno

Cuno

    Advanced Member

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

Posted 30 June 2011 - 11:57 AM

Hi Simon, hi Stanislaus,

please replace the Gsiot.Server directory in your Visual Studio Projects directory with a test version of Gsiot.Server that I provide at my book Web site http://www.gsiot.info/download/. It gives more debug output.

Thanks and best regards

Cuno

#10 SimonM

SimonM

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 July 2011 - 11:47 AM

After a bit of behind the scenes email exchange, all is as it should be. But to make it work you must add /hello to the url you typed in to your browser. e.g. on a local network, debug reports your boards IP as 192.168.x.xxx, type in to your URL bar 192.168.x.xxx/hello where x.xxx is the IP given to your board. if you have a key from http://www.gsiot.info/yaler, then type in http://try.yaler.net...xxxx-xxxx/hello where xxxx-xxxx is your key. Yours Simon M.

#11 StanDeMan

StanDeMan

    Member

  • Members
  • PipPip
  • 14 posts

Posted 01 July 2011 - 09:07 PM

Hi Cuno, thanks for your feedback and your great book. I like it. After testing it the next day everything worked well. I really don't know what caused this issue? All changes were done the day before. I only opened Studio and deployed to netduino. Hm? Yaler is a very interesting technology. Is it available as a .NET port, too? I think for the moment the sources are in Java? What do I need as Web Server? Apache? Want to toy with it a little bit but only have IIS. Regards and nice weekend Stanislaus

#12 tamberg

tamberg

    New Member

  • Members
  • Pip
  • 7 posts

Posted 02 July 2011 - 08:50 AM

Hi Stanislaus, Thanks for your interest in Yaler. Yaler does not require a Web server to run. Java (JDK6) and a public IP address is all you need. To host Yaler on your own server please follow http://hg.yaler.org/...4eda/README.txt To run a .NET Web service on your desktop computer and make it available via Yaler we provide a basic C# library at http://hg.yaler.org/...553a4d9/CSharp/ Regards, Thomas http://yaler.org/

#13 StanDeMan

StanDeMan

    Member

  • Members
  • PipPip
  • 14 posts

Posted 09 July 2011 - 05:10 PM

Hi tamberg, thanks a lot for your support. I'll try to get it running soon. Thanks and kind regards, Stanislaus

#14 rmartinez

rmartinez

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationOrlando, FL

Posted 10 July 2011 - 08:42 PM

Yes, Simon is totally right. The "hello" word must be added to the URL to make the book's example work. As Simon said:
http://try.yaler.net...XXXX-XXXX/hello
After many attempts, I came across Simon's suggestion and applied it. It worked! Posted Image Now, I can continue to the book's next example "HelloWebHtml".

Congratulations to Cuno Pfister for his excellent, very well explained, book!

Regards

#15 Tim Drew

Tim Drew

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 September 2011 - 05:43 AM

Guys, I am also working through the book examples for 'Getting Started with the internet of things' and I am having trouble getting the 'HelloPatchube' example in chapter 6 to compile. I am using Visual C# 2010 Express, I have downloaded and installed the 'Gsiot.Server+V20110630+test+version' zip file into the visual studio\projects directory in MyDocuments, added in the reference to the dll as detailed but it refuses to compile indicating that "The type or namespace name 'PachubeClient' does not exist in the namespace 'Gsiot'". I have recreated the project from scratch a couple of times thinking I might have a typo somewhere, but no luck so far. Has anyone had this issue before, are there any suggestions to resolve this issue or point me in the right direction ?

#16 Cuno

Cuno

    Advanced Member

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

Posted 05 September 2011 - 07:47 AM

I am having trouble getting the 'HelloPatchube' example in chapter 6 to compile. I am using Visual C# 2010 Express, I have downloaded and installed the 'Gsiot.Server+V20110630+test+version' zip file into the visual studio\projects directory in MyDocuments, added in the reference to the dll

Hi Tim,

thanks for reading my book! The project Gsiot.Server only contains support for Web servers, not for Web clients. "HelloPachube" is a client program and needs the project "Gsiot.PachubeClient". The project is contained in this zip file.

Hope that helps!

Best regards

Cuno

#17 Tim Drew

Tim Drew

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 September 2011 - 11:55 AM

Hi Tim,

thanks for reading my book! The project Gsiot.Server only contains support for Web servers, not for Web clients. "HelloPachube" is a client program and needs the project "Gsiot.PachubeClient". The project is contained in this zip file.

Hope that helps!

Best regards

Cuno


Cuno

Thanks for the help, much appreciated, I will try it out now.
I think I must have got myself confused somewhere along the way.

Great book by the way, good explanations and fantastic approach.
Well done.

Tim

#18 Tim Drew

Tim Drew

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 September 2011 - 12:05 PM

Cuno

Thanks for the help, much appreciated, I will try it out now.
I think I must have got myself confused somewhere along the way.

Great book by the way, good explanations and fantastic approach.
Well done.

Tim


Cuno
My build issue is all sorted now, many thanks.
I was definitely looking at it way too long and could not see what was staring at me.
Now to add my apiKey and feedId ..... :D
Tim

#19 PhilG

PhilG

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationMaine

Posted 20 September 2011 - 08:41 PM

I just received a Netduino Plus today and have been following the examples in the GSIOT book. I have been trying to get the board to work on my local network with no success. It is connected through a swich to the router. The PC is connected to the same switch and is working OK. When I run the HelloWeb app with the RelayDomain lines commented out I see this in the Output window: DHCP enabled: True MAC address: 5C-86-4A-00-1E-33 Device address: 192.168.5.100 Gateway address: 192.168.5.1 Primary DNS address: 208.67.222.222 Base Uri: http://192.168.5.100/ My DHCP is set to a range of 192.168.1.100 and up. If I look at the router's DHCP table all my devices are there but the Netduino. Explorer will not connect to the Base URI (http://192.168.5.100/hello). I ran the GSIOTDiagnostics program and it crashed after a nullrangeexception for s and a socketexception of 10060. So it appears to not be connected to my network. I tried a different Enet cable on the port that the PC was working on with no success. Suggestions? Phil

#20 Tim Drew

Tim Drew

    New Member

  • Members
  • Pip
  • 5 posts

Posted 21 September 2011 - 12:31 PM

I just received a Netduino Plus today and have been following the examples in the GSIOT book. I have been trying to get the board to work on my local network with no success. It is connected through a swich to the router. The PC is connected to the same switch and is working OK. When I run the HelloWeb app with the RelayDomain lines commented out I see this in the Output window:

DHCP enabled: True
MAC address: 5C-86-4A-00-1E-33
Device address: 192.168.5.100
Gateway address: 192.168.5.1
Primary DNS address: 208.67.222.222
Base Uri: http://192.168.5.100/

My DHCP is set to a range of 192.168.1.100 and up. If I look at the router's DHCP table all my devices are there but the Netduino.
Explorer will not connect to the Base URI (http://192.168.5.100/hello).

I ran the GSIOTDiagnostics program and it crashed after a nullrangeexception for s and a socketexception of 10060. So it appears to not be connected to my network. I tried a different Enet cable on the port that the PC was working on with no success.

Suggestions?

Phil


Phil, I ran mine using the free relay site, yaler, and it worked pretty much first go. I have not tried a local only version just yet. If I get a chance I will try it out and let you know. I have a similar networking setup at home myself. I did give the NetDuino Plus a static ip address outside the dynamic range my router can use.
Did you have any issues running the "C:\Program Files\Microsoft .NET Micro Framework\v4.1\Tools\
MFDeploy.exe" tool ?




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.