I am trying to find a clear example of the use of Arduino with 'sockets'

Hi Guys'n'gals,

I'm trying to use sockets for my real-time switching and sensor reading project. Are there any clear'n'simple examples of their use with an Ethernet shield as the server and mobile phones as the clients.

The ones I have found to date are either very good but very complicated and not very well documented or too simple and reliant on libraries, which I still don't understand fully :-(

Basically, I need to control 4 hydraulic rams from a web page (extend/retract when a button is pressed with a locking mechanism) and then have multiple other screens (from jpg/png pictures) with sensors showing on/off and instructions.

Any help would be VERY welcome. I am used to automotive 'C' programming with some knowledge of C++ but I have to admit that this is out of my comfort zone.

Cheers,

Andy

Hi again,

Just to say that I am using the Arduino 2560 MEGA with 4 (or more) digital outputs, all of the I/O + some more that I need to add with some sort of multiplexer for digital inputs - TBA.

Thanks again,

Andy

Hi

Have you looked at the source code for my Arduino application on its website at http://www.2wg.co.nz.

My application is quite large and feature rich but everything you could need will be in there. My application also has an extensive overview document and the well written source code includes lots of additional documentation.

I use my mobile phone and a simple three button web page to open and close my garage door. You can extract and re-use that technology to switch any device. Once you solve the basic problem you could go back and extract other functionality as required such as web security, ram management, web socket management, data logging, etc.

Cheers

Catweazle NZ

Hi Catweazel,

Thanks bud. I haven't had time yet but will let you know.

Cheers,

Andy

Hi Catweazel,

Your code looks like I could make use of it -- Thank you :-)

A couple of questions regarding the password: The first matching password seems to be in the EEPROM. Is that correct? How do I use the cookie?

Cheers,

Andy

AndyFiore: Hi Catweazel,

Your code looks like I could make use of it -- Thank you :-)

A couple of questions regarding the password: The first matching password seems to be in the EEPROM. Is that correct? How do I use the cookie?

Cheers,

Andy

Yes - I store the password hash key in EEPROM. In the strings.xls Excel workbook you can see documentation of my application's EEPROM and text file usage. For EEPROM you have the code that I use to load EEPROM and within the application you have the code that pulls data out of EEPROM and the text files.

I documented the session cookie security implementation some time ago. Get the file http://2wg.co.nz/public/cookies.txt However the code examples therein are well out of date - you need to go through the current application source code to determine the current implementation. I have released a code update today including a correction for the cookie implementation in respect of web server applications running on internet ports other than port 80.

Cheers

Catweazle NZ