Web Browser Receive Failure
#1
Posted 29 January 2011 - 02:16 PM
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
Posted 29 January 2011 - 07:03 PM
#3
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
Posted 30 January 2011 - 10:45 AM
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
Posted 30 January 2011 - 06:30 PM
#6
Posted 01 February 2011 - 08:43 PM
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.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
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
Posted 01 February 2011 - 08:44 PM
#8
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
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