Xport Direct vs. Direct+ (or something else?)

Hey all. Newbie alert, so please be gentle.

I'm taking the plunge with Arduino and I'm probably going to order a starter Decimillia-based kit from Adafruit. I really think I'm going to want to be doing Internet or web-based stuff (temperature monitoring via a web page, etc...), so I'm trying to figure out the differences between the various Ethernet boards available.

From what I can see, the difference between the XPort Direct and Direct+ seems to be that the Direct+ has a built-in web server. What does this web server actually allow you to achieve? Will it allow me to upload pages to it somehow that will then interact with sensors on the Arduino board? Does the XPort Direct only give you the option to send data over the network, whereas the XPort Direct+ allows you to browse to it over the network and view information directly?

My first project is going to be a web-based temperature sensor. If I get the Direct+, will I be able to construct a sketch to upload to the Arduino, and then construct some kind of web page to display the data coming from this sketch?

Alternatively, is there a Wi-Fi module equivalent to the XPort Direct+ that also has a web server? That would certainly be more convenient, if I can also make the kit battery powered.

Thanks all

Actually... after reading some more...

Are there actually three XPort modules? The 'XPort', 'XPort Direct' and 'XPort Direct+'? Both the XPort and XPort Direct+ have web servers, but the XPort Direct doesn't?

This would certainly be what http://site.gridconnect.com/docs/PDF/XPort-Compare-Plus.pdf is suggesting, too...

Confused.

The web server facilities are pretty limited and you can't easily interface from a web browser direct to hardware connected to the XPorts.

The way it works is that you can write a Java applet that you load into the XPort. That applet connects to the XPort using telnet and simply passes data through the XPort to whatever processor you have connected to the serial port.

The applet gets loaded into your webpage and can display the data returned from the XPort.

There is 386k (or something) of memory for webpages, it is paged, so in practice it is only capable of storing data for 6 pages.

I was a little disappointed when I found the limits, but that said, it will do what you want it to do.

LadyAda does a nice shield for it.

Regards,

Mike

That's brilliant. Thanks for the heads-up.

I was wondering if you knew of any good tutorials or guides for setting that up? I can find guides for getting the XPort Direct to do HTTP GET commands and parse the results, via Arduino sketches and LadyAda's AF_XPort library, but I can see any examples for how to write and upload Java applets onto a XPort Direct+.

Any help (or pointers to examples) would be greatly appreciated!

Hold the phone. Just had a thought.

I'm going to want to be viewing the web page that displays the results from the temperature sensor on my iPhone. As far as I can make out, the XPort and XPort Direct+ will only allow you to display a Java applet in the page you get when you browse to the web server on the XPort directly. Java applets run on the client-side and require a JVM - something the iPhone doesn't have.

Bummer. So it's back to the drawing board... and I'm probably going to have to set up some kind of web server on a box elsewhere that can periodically request temperature results from the Arduino and then display them in an iPhone-friendly page.

Any better ideas anyone?

p.s. Java applets? What made them choose that outdated technology?!?!

I'm working on a very similar project. My current plan is to not run a webserver on xport but rather just use xport to send a separate webserver my data and have a PHP script on this other server put that data into a nice format. I already have a hosting service and webpage setup so this method should be better for me. This way I don't need to get a static IP at home or worry about my home firewall stuff.

why would you need an applet to display the temperature? i guess if you want some sort of crazy graphing stuff
otherwise
you can just use the 'basic' webserver example on an xport direct
http://www.ladyada.net/make/eshield/examples.html
except just have it display temperature instead of led color

I'm working on a very similar project. My current plan is to not run a webserver on xport but rather just use xport to send a separate webserver my data and have a PHP script on this other server put that data into a nice format. I already have a hosting service and webpage setup so this method should be better for me. This way I don't need to get a static IP at home or worry about my home firewall stuff.

Yes, I think this makes much more sense. Running the web server on the XPort itself seems too artificially limiting.

why would you need an applet to display the temperature? i guess if you want some sort of crazy graphing stuff
otherwise
you can just use the 'basic' webserver example on an xport direct
Ethernet shield - Examples of use
except just have it display temperature instead of led color

Yes, this would be the next best solution, I think. I don't want anything crazy or fancy, I just would like to be able to access the Arduino kit directly via a web browser and for it to display the information collected from its sensors. I'm trying to avoid running a separate web server at the moment (for reasons of power consumption).

Thanks for your help, all. Standard XPort Direct it is then!

Or there is this thread on LadyAda's forum:

http://forums.ladyada.net/viewtopic.php?t=5458

A basic webserver running in the Arduino.

Mike

if you want to do graphing, or maybe even connect to remote temperature sensors (or maybe share your own temperature sensor data) maybe this would be a good solution: www.pachube.com
if you click around on the site you can find a template for the ladyada shield

Correct me if I'm wrong, but it looks like the Xport will run javascript, no? In which case it should run on the iPhone.

http://www.ladyada.net/make/eshield/examples.html

You could also have the xport spit the data to a PHP script running on a server, which you could pull up on the iPhone.

I've played around a little with the sourcecode for the XPort firmware. It would be possible, and I don't know why this isn't standard, to handle custom server-side includes (which is supported by HTML already, the XPort web server just needs to know what to do). A custom SSI could send a query to the serial port, wait a short amount of time for a response, which would then be printed inline with the rest of the HTML.

The advantage of this would be pushing the web server tasks and page storage back into the XPort and letting the Arduino handle the actual application you're doing.

The Java method just lets you run an app on the client machine to access the Xport's serial passthrough port. It's nothing special and not really web based anymore.

Since I have access to a lot of web servers anyway, I agree the most simple method would be to have the XPort craft an HTTP GET packet to send data to PHP for more processing. Starts to make sense if you have a lot of XPorts and just one web server.

I wrote this tutorial about using Xport and PHP to get an Arduino talking to a web server.

http://www.glacialwanderer.com/hobbyrobotics/?p=15

FYI, If you would like to use Pachube, we have the tutorials mentioned above here: http://community.pachube.com/?q=node/9 for using Arduino; there is a link to a small script that uses LadyAda's ethernet shield and xport Direct. Yes, this would make graphing your values pretty straightforward, and even possible to embed the graph in a webpage. e.g. see here, for the realtime updated, 24 hour light level graph of an arduino in our office (which uses a nuelectronics shield): http://pachube.com/feeds/60/datastreams/0/history.png

so you could add your feed to pachube, then view the URL on your iPhone.

on the other hand, if you want your iPhone to share its sensor data with pachube (and potentially with your arduino) in the other direction, then here's a tutorial on getting iPhone to share it's geolocation as a sensor feed (which of course could be accessed by your arduino in the same way): http://community.pachube.com/?q=node/57

basically means you could have your iphone and your arduino sharing sensor data back and forth using pachube as the web proxy.