Go Down

Topic: im working on a home automated system and the webserver is acting weird (Read 1 time) previous topic - next topic

michael040990

Feb 04, 2013, 09:17 pm Last Edit: Feb 04, 2013, 09:23 pm by michael040990 Reason: 1
ok heres my code
Code: [Select]

http://pastebin.com/u0ArQXCZ


when i connect to the 192.168.1.177 it shows something like this
http://i49.tinypic.com/2pzffbd.jpg
http://i45.tinypic.com/34qwqqf.jpg
http://i50.tinypic.com/14trd4p.jpg

and chainges every time you refresh or sometimes it wont even load
sometimes it will download a file called download with the contence of
Code: [Select]

http://pastebin.com/S6BBfEvi



the website is located here http://turnmylightson.no-ip.org/

im using arduino uno with the wizboy ethernet sheild connected through a tl-wr702n chinese router connected as a client to my home router

no serial communication seems to be going on through the arduino ide serial console
andsome times it says it can not find the serial port

this code worked a few times before do you think there is a problem with my arduino uno that doing this?

it seems my old code works fine what went wrong with the new code?
Code: [Select]

http://pastebin.com/73qqMwwt

SurferTim

If this is an Uno, you should leave D10-D13 alone. I see you might have something connected (or plan on it) to D10. A relay maybe?

And this is not right.
Code: [Select]
Ethernet.begin(mac, ip, gateway, subnet);
// it should be
Ethernet.begin(mac, ip, gateway, gateway, subnet);

The first gateway parameter is actually for the dns server ip, but the gateway works ok if you do not plan on using dns.

michael040990

#2
Feb 04, 2013, 10:00 pm Last Edit: Feb 04, 2013, 10:02 pm by michael040990 Reason: 1
thanks for pointing that out im trying it out now
it still crashed

and pin 11,12,13,4 will eventually go to the sd card reader
while pins 5,6,8,9 are relays and pin 3 is a ir led while pin 7 is a ir receiver
i got  

Code: [Select]
Oops! Google Chrome could not connect to turnmylightson.no-ip.org
Suggestions:
Go to no-­ip.­org
Try reloading the page
Search on Google:


it looks like its not connecting to the webserver or not sending the header or something


if i ping 192.168.1.177 it comes back

Code: [Select]
Pinging 192.168.1.177 with 32 bytes of data:

Reply from 192.168.1.177: bytes=32 time=4ms TTL=128
Reply from 192.168.1.177: bytes=32 time=2ms TTL=128
Reply from 192.168.1.177: bytes=32 time=1ms TTL=128
Reply from 192.168.1.177: bytes=32 time=1ms TTL=128

Ping statistics for 192.168.1.177:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 1ms, Maximum = 4ms, Average = 2ms

so its connecting to the arduino so it has to be something with sending the client.write commands to the server

SurferTim

Now I think I understand.
Do you have your public ip registered with no-ip?
Do you have your public ip interface sending port 80 requests to 192.168.1.177?
Can you access the Arduino from the internet by ip address?
Does your ISP block port 80 requests to non-commercial ip addresses? Mine does.

michael040990

turnmylightson.no-ip.org>24.160.73.173>router>192.168.1.177>arduino

no-ip info>Host Type:DNS Host (A)
i can not access it through either turnmylightson.no-ip.org|24.160.73.173|192.168.1.177

i know the noip works because the other skitch i uploaded worked fine

Code: [Select]
and i tried to add
byte dns[] = {
  192, 168, 1, 1 }; // dns server

and
Code: [Select]
  Ethernet.begin(mac, ip, dns, gateway, subnet);

but i get the error
Code: [Select]
webserver_home_automation_with_status:35: error: 'byte dns []' redeclared as different kind of symbol
C:\Documents and Settings\Michael\My Documents\Arduino_instalation\arduino-1.0.1\libraries\Ethernet/Dhcp.h:64: error: previous declaration of '<anonymous enum> dns'



as stated before this is the origional one i had that worked fine
Code: [Select]
http://pastebin.com/73qqMwwt

Go Up