Timeline for Couldn't connect to local server using Ethernet Shield and Arduino Mega 2560
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:50 | history | edited | Community Bot |
replaced http://arduino.stackexchange.com/ with https://arduino.stackexchange.com/
|
|
Dec 31, 2016 at 5:24 | comment | added | Manav | Hahaha you're welcome π The key here was network bridging π¬ | |
Dec 31, 2016 at 5:10 | vote | accept | Vimukthi Saranga | ||
Dec 31, 2016 at 5:10 | comment | added | Vimukthi Saranga | changing following line worked 'client.println("Host: localhost");' tnx for all the support | |
Dec 31, 2016 at 4:50 | comment | added | Vimukthi Saranga |
192.168.1.120 - - [31/Dec/.&checktime(2016,10,19,':'):52 +0530] "POST /add.php HTTP/1.1" 400 472 "-" "-" 192.168.1.120 - - [31/Dec/.&checktime(2016,10,19,':'):57 +0530] "POST /add.php HTTP/1.1" 400 472 "-" "-"
|
|
Dec 31, 2016 at 4:44 | comment | added | Vimukthi Saranga | Hi @Manav, now it's working.. I check the apache access log and the request is there, but it's returning 400 - bad request ? `data = "temp1=10&hum1=20"; client.println("POST /add.php HTTP/1.1"); client.println("Host: " + server); // SERVER ADDRESS HERE TOO client.println("Content-Type: application/x-www-form-urlencoded"); client.print("Content-Length: "); client.println(data.length()); client.println(); client.print(data);' | |
Dec 31, 2016 at 3:52 | comment | added | Vimukthi Saranga | and one more thing to add, I create a server on the shield instead of the client. It's working fine, I checked the IP and port using the laptop browser and I can connect to the server. Shield's client is the issue... | |
Dec 31, 2016 at 3:47 | comment | added | Vimukthi Saranga | I did as you pointed, then it created a new connection with wifi and ethernet, but stii I can't connect. byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x85, 0xD9 }; //physical mac address byte ip[] = { 192, 168, 1, 5 }; // ip in lan Ethernet.begin(mac,ip); // initialize Ethernet device | |
Dec 30, 2016 at 18:04 | history | edited | Manav | CC BY-SA 3.0 |
added 174 characters in body
|
Dec 30, 2016 at 17:36 | history | answered | Manav | CC BY-SA 3.0 |