Impressive! I have a need for something like this. Collaboration?
Impressive! I have a need for something like this. Collaboration?
Charles Linquist
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
Chris,
Maybe I did not make myself clear. At first I would like to use webpage that go into ethernet Mini to look up something on it. just like a router 192.168.01What I would like to make a simple task. I would like make port A0-A4, B0-B4 ,C0-C4, D0-D4 to turn it on (high) or off ( low) or read those port the value. I hope myself clear. I am not sure if we called it as web server or just remote the hub. I was hope someone has done this. I would like to see sample codes.
Reid
Hi Chris,
Fred participates here, and makes contact info available on his web site. Your project idea might be just what he's looking for, why not ask Fred if it'll work?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
In honesty the reason I posted was in the hope that Fred would contribute if he was able to assist or had the time to spare, and I've taken it that because he hasn't responded he had nothing to add. Perhaps he didn't read the message though ?
I have completed the project now so I'm fine. Although I would still be interested if the ported ethernet stack could be adapted to work as a TCP port redirector, it could be usefuyl at some time in the future !
Chris
Sorry Reid, mixed communications !
By port number redirection I am referring to the TCP/IP port. EG HTTP uses port 80, and so on.
The ethernet Mini appears to output raw packet data, which would require further desemination before you can get to the data you require. Although I don't have an ethernet Mini and may be speaking out of turn, it will demand some additional data processing to be applied before you get down to the basic transactions and connection handling.
Have you looked into HTTP ?
I guess from your message that you want to make some sort of remote control system, where you can send a command from a remote web connected PC, possibly via a browser, to interact with the hardware attached to the ethernet mini.
You could do this a number of ways, from using HTTP to TFTP, SNMP could also work, but I would suggest looking into those protocols more closely to find the one best suited to the functionality you are looking for.
Of course, you could easily implement your own protocol once you are handling TCP/IP or UDP directly, but it is usually a good idea to stick with accepted protocols over the internet.
If you can explain more about the type of functionality you need, and if it needs to operate in both directions, we might be able to pin things down more precisely
You might want to have a look at the Siteplayer webserver. I've been using the Siteplayer for a few years now. Very easy to get started with. Been interested in Lantronics and also the Rabbit solution but never experimented with them. I know Microchip also offers some form of web interface but I've never been able to wrap my head around it.
"It will never happen here!" just happened here.
My thoughts and prayers for Sandy Hook victims and families.
Bookmarks