Quote Originally Posted by Reid View Post
I am curious if any of you are still working on Ethernet Mini or not. I would like to make a small HTTP server. I am new on this. I would like to see your code or picture of your project.

Reid
Reid,
I used a Lantronix Xport-03, which has the ability to do port redirection between the ethernet socket and the two wire serial interface. This means that you can attach a pic to the serial port of the Xport and read the actual HTTP requests for files as they arrive, and in my case i responded by serving the suitable file from an SD memory card.

I would recommedn that you look at the relevant RFC documentation covering things like HTTP, TFTP and FTP etc, because you will be working with it at a very low level if yoiu decide to go down this route.

you would also need a fast method for serving files, which in my case consisted of reading a block of 512 bytes from the SD Card into a buffer on the pic and then using Hserout to transmit the buffer's contents to the serial port of the Xport. The actual etehernet side of things is dealt with for you by the Xport The SD Card used 2 wire SPI mode, which actually seemed quite slow in the end, especially when serving images >20kB in size and I would have preffered to use the 4 wire mode. But I got the SD software (SDFS) for free and mustn't complain.

If you take a step back from what you are trying to achieve, you really are only moving large chunks of data between devices. The remote web server 'knows' what to do with the file it requested, yoiu simply need to send it when requested. Unless, you want to start serving live data. I ended up serving live data via an HTML file which is created only once, at the time the request for the data is made, and the usual HTML tags are inserted one by one as part of a loop. This probably also led to the program being slower than I would have liked.

There are a lot of options available now for bridging a pic to the internet and I think yoiur best source of info is going to be the datasheets from the devices themselves. As well as the Xport, there is also something called a 'WebLynx' which seems to be similar although I am not sure if they are doing port redirection with that device yet.

Chris