ARDUINO‎ > ‎BLOG-DUINO‎ > ‎

Finished my embedded Network Setup Page

posted 18 Aug 2011, 23:47 by JO3RI Read Grab Share
Embedded Ethernet Setup Page
In my last post, I told you I was working on a sketch for an Arduino Network Setup-page for the Arduino Ethernet (Shield). Now That project had to wait, because for one, I didn't have time for Arduino and mostly because I got stuck. I couldn't find out, how to get data out of the submitted forms and now I finally know how to do that.

The Text Finder library made it possible. When you submit a form, your address bar in your browser shows the submitted form like this: "http://192.168.1.1?DT1=192&DT2=168&DT3=1&DT4=2". Now with the Text Finder Library you can make the Arduino start looking for those DT's and there values. Once they are all found, the sketch saves them to EEPROM and after you reboot, the sketch uses the new values for it's Ethernet Shield.

In the picture on the left you can see that the forms are allowed to fill out MAC, IP, MASK and GW. Making it work with HEX for the MAC-ADDRESS wasn't easy, and frankly I even couldn't solve my problem. For MAC you have to fill out HEX and not DEC. So you would be putting things like AD:EF:FE:09:EE:AA in the form, but the Text.Finder() library couldn't cope with those letters.

After A long try, finding a solution I gave up, but find a way around the problem. I uses JavaScript to convert the HEX to DEC on the moment you submit the form. This way the sketch only receives numbers, problem solved. Now I you want to download the sketch, be free to check out the project page.