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

simple put to localhost confusing


  • Please log in to reply
2 replies to this topic

#1 micfiz

micfiz

    Member

  • Members
  • PipPip
  • 12 posts

Posted 15 November 2011 - 06:31 PM

I have been very successful in working the examples from book ...internet of things ... but when i deviate or do the extra credit things get confusing. so if I modify a client program such as simplePutRequst with a different URI like http://localhost:8080 i get these socket errors like 00054 and 0006. If put the ip address of my laptop plus the :8080/testHello it works too. My test web server on the development laptop I run and debug Netduino code is Apache and it works. What woks means is if the browser points to http://localhost/ I get the It Works! from there default htm file. I can ping the local host or 127.0.0.1. HOWEVER, if I use http://localhost:8080/ it don't respond or rather I get can not display page. My NetDuino is sending voltage values up to Pachube, a real web server. I want to stay in my own back yard to develop in a test environment. What does one have to check/configure on a local web server to get the NetDuino to communicate like on the real web servers? More than happy to share data of this problem for assistance. thanks for your time. This Netduino stuff is really cool. micfiz

#2 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 15 November 2011 - 07:28 PM

Perhaps there is some confusion about "localhost". It refers to the current computer, so if you use localhost on your PC, it refers to the PC. If however you use localhost in your Netduino program it would refer to the Netduino, not the PC. If you want to have the Netduino talk to the PC use the ip address of the PC, not localhost.

#3 Coding Smackdown

Coding Smackdown

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts
  • LocationLewisville, TX USA

Posted 26 November 2011 - 02:27 PM

You have to remember that a web server will only answer requests on the port that you configure it for. If you only have the server configured to listen on the default port which is port 80 then your request will fail on port 8080. To get the web server to respond on port 8080 you need to configure the web server to listen on other ports. If you double check the Apache docs, they should show you how to configure the web server to listen on additional ports. Otherwise, just don't try the request on port 8080.
Brewing Award Winning Beer with a Netduino!
http://diybrewery.com




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.