SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #15 on: March 23, 2008, 06:11:45 pm » |
I'd be very interested in seeing how much smaller the code is for a wiznet based solution (which does up through TCP/IP at least in hardware, but may be complex to talk to) vs a solution that does all the work on the AVR (but can be customized to only do the pieces needed.)
|
|
|
|
|
Logged
|
|
|
|
|
USA
Offline
Sr. Member
Karma: 0
Posts: 452
Freeduino rocks
|
 |
« Reply #16 on: March 23, 2008, 07:05:30 pm » |
A very simple http server implemented on Arduino using the TCP/IP stack on the wiznet takes only a few lines of code. There is an example and I think uses some 250 lines of code corresponding to 3.5K sketch size and uses SPI to communicate with wiznet. Wiznet is about to announce a chip with 50Mbps transmission speed, the current chip supports up to 25Mbps... I think you need to use the direct addressing mode to get these speeds, instead of SPI. It is worth mentioning that the TCP/IP stack on the wiznet is much robust than the open source version.
|
|
|
|
« Last Edit: March 23, 2008, 07:40:25 pm by nkcelectronics »
|
Logged
|
|
|
|
|
New Zealand
Offline
God Member
Karma: 0
Posts: 999
Arduino pebbles
|
 |
« Reply #17 on: March 25, 2008, 07:47:17 am » |
a wiznet based solution (which does up through TCP/IP at least in hardware, but may be complex to talk to) The vendor supplied a sample driver that provides a Unix-like socket interface which I have ported to create an Arduino library libw5100. This code produces a simple serial <-> network proxy using the high level Serial-like interface of the NetworkConnection object ( from simple_serial_proxy.pde): // Configure the network device SpiConfiguration SPI = SpiConfiguration(); SPI.begin(); W5100Device W5100 = W5100Device(PIN_RESET); NetworkInterface Network = NetworkInterface(W5100);
// You need to customise these to your own environment Network.device.setIp(210,55,77,111); Network.device.setMask(255,255,255,128); Network.device.setGateway(210,55,77,1);
Serial.begin(9600); // Read the output in the Arduino serial monitor while (1) { NetworkConnection conn = Network.listen(7); Serial.println("Waiting for client..."); while (!conn.isConnected()) { delay(500); }
Serial.println("Connected...");
while (conn.isConnected()) { if (conn.available()) { Serial.print(conn.read(), BYTE); }
if (Serial.available()) { conn.print(Serial.read()); } }
conn.close(); Serial.println("Connection closed."); }
vs a solution that does all the work on the AVR (but can be customized to only do the pieces needed.) Incidentally, the W5100 does provide raw network socket access as well so you could theoretically port the usual AVR network libraries to it also. --Phil.
|
|
|
|
|
Logged
|
|
|
|
|
New Zealand
Offline
God Member
Karma: 0
Posts: 999
Arduino pebbles
|
 |
« Reply #18 on: March 25, 2008, 07:54:20 am » |
Wiznet is about to announce a chip with 50Mbps transmission speed, the current chip supports up to 25Mbps... I think you need to use the direct addressing mode to get these speeds, instead of SPI. I found some somewhat vague W5100/WIZ810MJ throughput figures but suffice to say I don't think you'll be getting 50Mbps :-) or even 25Mbps via SPI--in fact I don't think SPI's even an option on the new W5300. I would be interested to see what sort of numbers people get with libw5100 and a WIZ810MJ. --Phil.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 39
Arduino rocks
|
 |
« Reply #19 on: March 30, 2008, 02:21:48 pm » |
That should all work fine.
The XPort does act as a webserver, but it is limited. There is no ability to run scripts on the XPort, only serving static web pages - except, you can write a java applet to store with your html which gets loaded and runs on the browser. This java applet can open a telnet type connection back to the XPort (you'd need another port open on your router) which will send the data through its serial port to your processor, your processor would then return the appropriate data to the XPort which sends it via the telnet connection to the java applet in the browser.
Phew.
<snip>
Regards,
Mike
Mike, Many thanks for your reply. Yes, I was aware of all you posted. That stuff was fairly well covered in the published documentation. What wasn't covered, and what I was unable to locate, was the specifics of using the web server to do something over the serial interface. I decided that if the Xport folks don't care enough to document their chip, I don't care enough to waste any of my time or money on that flaky outfit's products. Life is too short. I appreciate your time and effort. Once again, many thanks. Tom
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 239
Arduino rocks
|
 |
« Reply #20 on: March 30, 2008, 06:54:25 pm » |
i think you need to be more specific what you mean by "the webserver to do something over the serial interface" the xport (not xport direct) can run its own webserver and 'talk' to the arduino thru the serial connection via java ie http://ltxfaq.custhelp.com/cgi-bin/ltxfaq.cfg/php/enduser/std_adp.php?p_faqid=943which is in the XPort product technical library or you can 'fake' a website by simply parsing the GET command over serial and spitting out whatever data ie http://ladyada.net/forums/viewtopic.php?t=5458do you mean something else?
|
|
|
|
« Last Edit: March 30, 2008, 06:56:31 pm by ladyada »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 39
Arduino rocks
|
 |
« Reply #21 on: March 31, 2008, 12:17:48 am » |
LadyAda,
I originally asked the question in my Reply #10 in this thread.
Thanks for your response.
Tom
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 239
Arduino rocks
|
 |
« Reply #22 on: March 31, 2008, 12:22:54 pm » |
if you mean "I gather I can load web pages. Can I export a Processing app to a web page, then load that page into the sever to get something intelligent running?" this is not an xport question, this is a java/processing question. in theory, any java app will run. however processing is (from what i have heard) rather bulky and may not fit into the xport space provided, without some effort. and "And would such an app be able to talk to the Xport's serial port (and thus, to the Arduino?) Or is there an easier way of providing some automation?" this is answered here: http://ltxfaq.custhelp.com/cgi-bin/ltxfaq.cfg/php/enduser/std_adp.php?p_faqid=943 which has step-by-step examples on how to use java to talk to the serial port what im confused by is "I decided that if the Xport folks don't care enough to document their chip, I don't care enough to waste any of my time or money on that flaky outfit's products. Life is too short." are you saying you are looking for a step-by-step on how to install processing on an xport to communicate with an arduino? what documentation, specifically, are you missing?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 2
Posts: 849
Arduino rocks!
|
 |
« Reply #23 on: March 31, 2008, 07:48:18 pm » |
The "magic" functionality I think we want here is a web page that can display status info the arduino reads from the real world, as well as controlling devices. As simple as the temperature sensor we've seen, to monitoring which doors are open or closed to a web interface to control every light in the house.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 39
Arduino rocks
|
 |
« Reply #24 on: April 01, 2008, 12:49:58 am » |
The "magic" functionality I think we want here is a web page that can display status info the arduino reads from the real world, as well as controlling devices. As simple as the temperature sensor we've seen, to monitoring which doors are open or closed to a web interface to control every light in the house. Yes, exactly. For stuff like that, it looks like the SimpleLAN might be a better choice. Its web page storage is minimal -- only 31k -- but in this thread, a user demonstrates that the SimpleLAN can interpret standard Javascript , making interactive web page construction simple and straightforward. You can do a lot with 31k of Javascript. It has a well-defined API, too. No hocus pocus. I believe that's the direction I'll pursue. Many thanks, everybody. Tom
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 39
Arduino rocks
|
 |
« Reply #25 on: April 01, 2008, 12:52:05 am » |
what im confused by is "I decided that if the Xport folks don't care enough to document their chip, I don't care enough to waste any of my time or money on that flaky outfit's products. Life is too short."
are you saying you are looking for a step-by-step on how to install processing on an xport to communicate with an arduino? what documentation, specifically, are you missing? No, I was looking for a web API reference for the Xport that would let you design interactive web pages that would interact with an Arduino connected to the Xport's serial port. Thanks, Tom
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 239
Arduino rocks
|
 |
« Reply #26 on: April 01, 2008, 01:41:08 pm » |
The "magic" functionality I think we want here is a web page that can display status info the arduino reads from the real world, as well as controlling devices. As simple as the temperature sensor we've seen, to monitoring which doors are open or closed to a web interface to control every light in the house. Yes, exactly. For stuff like that, it looks like the SimpleLAN might be a better choice. Its web page storage is minimal -- only 31k -- but in this thread, a user demonstrates that the SimpleLAN can interpret standard Javascript , making interactive web page construction simple and straightforward. You can do a lot with 31k of Javascript. OK well at least now its clear what you want. FYI, the SimpleLAN doesnt interpret Javascript (like Java applets, they are run on the web client), it does a find-and-replace type thing
|
|
|
|
|
Logged
|
|
|
|
|
|