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

Web Browser Receive Failure


  • Please log in to reply
8 replies to this topic

#1 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 29 January 2011 - 02:16 PM

This weekends experiment with the N+ required me to work out how to talk to the N+ over the network. So what better than a small web server. All went well for the first hour or two and then came the acid test - talk to the N+ with a browser. Yippeeee - I'm serving web pages - but only when the debugger is attached and I have a breakpoint set. In any other case I get the following message displayed by the browser: ReadResponse() failed: The server did not return a response for this request. Has anyone else seen this? Thanks in advance, Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 January 2011 - 07:03 PM

Hi Nevyn, Hmm, haven't seen that. Instead of debugging, if you open up MFDeploy.exe (Start > Program > .NET MF SDK > Tools) and "connect (F5)" to your Netduino Plus...do you see the same issue? Chris

#3 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 29 January 2011 - 08:02 PM

Hmm, haven't seen that. Instead of debugging, if you open up MFDeploy.exe (Start > Program > .NET MF SDK > Tools) and "connect (F5)" to your Netduino Plus...do you see the same issue?


Still the same problem. Here's what I did:
  • Fired up MFDeploy as described and received a connected message.
  • Started Fiddler and then Chrome.
  • Issued a request for the default web page and received the same error as described. HTTP response code is 504.

Now I am issuing some response codes for errors but I do not have 504 anywhere in my code so it's coming from somewhere else.

I have just tried this without Fiddler between the browser and the N+ I get error 324 (Empty Response).

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#4 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 30 January 2011 - 10:45 AM

Think I have finally found the solution but in doing so it has me a little perplexed. In my app I had the following code:
using (Socket client = _socket.Accept())
{
    int requestSize;

    requestSize = client.Available;
    if (requestSize > 0)
    {
        // Process request here.
    }
}

When the debugger is attached to the project requestSize is always set to the size of the request, in this case 480 bytes. When the debugger is not attached requestSize is zero even though there is some data available. The subsequent call to client.Receive(...) does in fact pull back the 480 bytes of the request even though client.Available is zero.

Is this expected behaviour?

Thanks to all who looked at this.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 January 2011 - 06:30 PM

Hi Nevyn, The RequestSize should be identical whether or not you are attached to the debugger. If you have a small repro case, we'd be happy to look at it. Chris

#6 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 01 February 2011 - 08:43 PM

Hi Nevyn,

The RequestSize should be identical whether or not you are attached to the debugger.

If you have a small repro case, we'd be happy to look at it.

Chris

Chris - tried to reproduce in a smaller example but I'm now consistently getting 0 bytes available. According to the API reference I think it should always have a value as there is data there to read and I think I'm creating a non-blocking socket.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 February 2011 - 08:44 PM

Hi Mark, Can you post your example which is getting 0 bytes? Also, make sure you update to the newest firmware (4.1.0.6 rc1 or 4.1.1 a6)... Chris

#8 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 05 February 2011 - 06:41 PM

Can you post your example which is getting 0 bytes? Also, make sure you update to the newest firmware (4.1.0.6 rc1 or 4.1.1 a6)...


Updated to the 4.1.0.6 RC1 and code is working.

Updated worked like a dream - always nervous when flashing / updating firmware.

Thanks for the help,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 February 2011 - 06:51 PM

Updated to the 4.1.0.6 RC1 and code is working.

Updated worked like a dream - always nervous when flashing / updating firmware.

Thanks for the help,
Mark


Hi Mark,

So glad that the update fixed things for you. Woot! :)

BTW, it's more or less impossible to "brick" a Netduino via firmware update. We've built in multiple backup procedures and in the worst-case scenario you can erase your Netduino (connecting the 3.3V header to the gold ERASE pad via a jumper wire) and reflash everything from scratch. You can even recompile everything from scratch; viva open source :)

Chris




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.