RCM5760 web interface - embedded image sometimes does not load

Hi All,

I have an embedded application running on my 5760 with a web interface, using the standard http.lib. The main index page embeds a product logo with the usual

Have you tried using Wireshark to look at exactly what is being returned by the device? You should be able to capture the entire session and see exactly what was returned and when.

Regards,
Peter

Thanks for the response and good suggestion. Now I’m running wireshark and sniffing I can’t replicate the problem :(. Will keep the forum posted if I solve the problem.

FW

It’s amazing how often these things go into hiding when you go looking for them :slight_smile:

Keep in mind that the addition of a hub or managed switch with port mirroring can have subtle effects on the timing and that can unfortunately influence the results. If you revert to the original setup and the fault comes back you may have to get a bit more creative to get a proper look at the data.

Do keep us posted on your progress.

Regards,
Peter

I’ve been doing some more testing and have not seen the problem re-occur. I only added the call

tcp_reserveport(80);

fairly recently and think that may have fixed the problem. Before I had that call I would see the problem in about 1 out of 25 requests.

My project, which I inherited, has these declarations that I’ve never changed:

#define HTTP_MAXSERVERS 3
#define HTTP_MAXBUFFER 1024

If HTTP_MAXSERVERS defines the number of simultaneous connections the server can handle then I would’ve thought 3 would be enough. My web page is pretty simple, all in one HTML file with an img tag referencing one image. I would think this should cause at most 2 simultaneous connections from the browser…

There is an issue I’ve seen before with other systems whereby Internet Explorer (and I think other browsers) will open several connections to a web server to try and download all the seperate elements of the page in parallel. This can lead to problems as many people assume a browser makes a single connection. There is a setting that cen be changed to tune this behaviour but I can’t remember where it is. Some of our customers had changed it from the default of 2 up to 8 and it knocked our device over.

Regards,
Peter

That’s interesting, I didn’t know the # of connections was settable in the browser.

I am not used to these small scale web server, on my embedded Linux projects I just run Apache, far easier (if you can run Linux).

I think Rabbit should make a 32bit chip with flat memory model, would make development a lot easier.

The setting can be changed via a registry setting see the following http://www.pctools.com/guides/registry/detail/536/

In the instance where it caused problems for me, the customer had run one of those “PC Tune Up” programs and it had upped the connection.

The Rabbit 6000 has some scope for improving things but the biggest issue usually comes down to memory and for many embedded systems the memory is relatively small for cost and power reasons.

Regards,
Peter