Show Posts
Pages: 1 ... 179 180 [181] 182 183 ... 392
2701  Using Arduino / Networking, Protocols, and Devices / Re: Port change from 80 to something else on: April 04, 2013, 01:51:32 pm
Did you port forward your port to the private ip? I'm not that familiar with that particular model of D-Link router, but normally that is under the advanced tab in the router setup as Virtual Server.
2702  Using Arduino / Networking, Protocols, and Devices / Re: WiFly - Server incorrectly displays page upon refresh on: April 04, 2013, 10:27:59 am
That is correct. Two of them together. But there may be a carriage return between them.
carriage return(\r) - line feed(\n) - carriage return(\r) - line feed(\n)
2703  Using Arduino / Networking, Protocols, and Devices / Re: Network Questions on: April 04, 2013, 07:44:10 am
See reply #2 above. Click on the link. That reads and displays the email server responses to all those sends. That way if something goes wrong, you will know what it was.

BTW, my email server does not take email with your code, even if everything is correct. If you do not read the response before sending again, my email server refuses the email with the reply "500 I don't take email from rude servers" and "hangs up" on you.
2704  Using Arduino / Networking, Protocols, and Devices / Re: WiFly - Server incorrectly displays page upon refresh on: April 04, 2013, 07:14:13 am
This is not right:
Code:
        //if HTTP request has ended
        if (c == '\n') {
You are probably leaving the rest of the client request in the rx buffer. If that is the case, the connection/socket will not close properly. You must read the request until you get a blank line (double cr/lf), not just a new line.
2705  Using Arduino / Project Guidance / Re: Exasperation: W5100 locking up nRf24L01 on: April 04, 2013, 07:07:58 am
Quote
Hate to do that but I've had no luck making the two share the bus.  The nRF24L01 randomly stops talking (returns FFFF for every register) after the webserver handles some number of requests.   I actually have to power off the whole UNO to get everything running again.  
Have you considered the possibility it may be that server code failing? You could compare that code to this sketch. It works well for me.
http://playground.arduino.cc/Code/WebServerST
And zoomkat has some server code that handles images stored on the SDcard. The SD is also a SPI device, and those work well together. So does my FTP code. It uses the w5100 and SD simultaneously.
2706  Using Arduino / Networking, Protocols, and Devices / Re: Non-Blocking Ethernet Library on: April 03, 2013, 08:47:37 pm
Quote
However my issue is that the rest of the sketch - the remainder of set up and loop- will not run.
Maybe you should post that sketch.

Quote
have yet to find out what happens when the DHCP server decides the lease is up and someone else takes the address in the mean time. reboot solves all but I am putting in sensors on a remote locationand hope to have reliable connection for 30 days at a time...
No, that is what Ethernet.maintain() is for.
http://arduino.cc/en/Reference/EthernetMaintain
Until half the lease time is expired, this does nothing and returns 0 (nothing happened). After that, it renews the dhcp lease just like it supposed to. I checked it. It works. I call it once every 20 minutes, but I don't see why you couldn't call it more often than that.
2707  Using Arduino / Programming Questions / Re: Arduio as a wifi client, Unable to connect to Port 80 on: April 03, 2013, 06:01:28 pm
I'm not sure that I am the one who is confused. This is what you posted earlier. Do you see the ip you used here?
To test , I created a folder named "search" under my websites folder and place a file arduino.txt in it.

and Now this url
http://192.138.26.1/search?q=arduino

takes me to

"Index of /search"

and shows me my file under it.

Hmm...may be now if I upload my code and try......

Do you see the ip address you used here?
Code:
IPAddress server(192,138,26,1);  // numeric IP for my server (no DNS)

edit: What I am trying to say is you may have the wrong ip assigned to your server. If you tried accessing that ip from your server web browser, it would work with the wrong ip for your localnet. But other computers will not be able to access that, especially you Arduino. It will almost certainly pick up a 192.168.x.x 255.255.255.0 ip/subnet, and the 192.138.26.1 ip would not be localnet. That request would be passed to the router gateway to forward out onto the internet.
2708  Using Arduino / Programming Questions / Re: Arduio as a wifi client, Unable to connect to Port 80 on: April 03, 2013, 05:42:48 pm
So that is a public ip? You are near Sierra Vista, AZ? Fort Huachuca? If so, my bad. I thought that was a private network ip.

edit: I guess you have me firewalled out. I can't reach that public ip from Florida.  smiley-sad
2709  Using Arduino / Programming Questions / Re: Arduio as a wifi client, Unable to connect to Port 80 on: April 03, 2013, 05:32:12 pm
Did you fix the IPAddress code in your sketch?
Code:
// change this
IPAddress server(192,138,26,1);
// to this
IPAddress server(192,168,26,1);
2710  Using Arduino / Programming Questions / Re: Arduio as a wifi client, Unable to connect to Port 80 on: April 03, 2013, 05:09:56 pm
Yes correct, I just changed that before posting to forum. but yes its in the format you mentioned
What does that mean? Why would you change that? It is a private ip. The computer I am on is 192.168.1.254. You can't get here from there. It is behind my router and firewall.

You must insure the ip address assigned to your server is within your localnet. Otherwise, it will be unreachable. PeterH gave you the test for that, and it sounds like it failed.

Are you sure this is a correct, valid ip for your network?
Code:
192.168.56.1
Do all the other devices on your network have a 192.168.56.x ip address?

Are you trying this using a localnet computer, or on the server?
Quote
2711  Using Arduino / Programming Questions / Re: Arduio as a wifi client, Unable to connect to Port 80 on: April 03, 2013, 04:46:25 pm
Are you sure this ip address is correct?
Code:
IPAddress server(192,138,26,1);
Most localnet ips are 192.168.x.x. Just checking.
2712  Using Arduino / Networking, Protocols, and Devices / Re: Network Questions on: April 03, 2013, 02:59:53 pm
You should read the responses from the email server. This code does that.
http://playground.arduino.cc/Code/Email
You can replace the "Press 'e' to send" with your trigger.
2713  Using Arduino / Networking, Protocols, and Devices / Re: WiFly - Server incorrectly displays page upon refresh on: April 03, 2013, 02:51:29 pm
I would suspect the String data type.
Code:
String readString; //create readString class
It has caused some really strange fails. You should replace it with a character array. I would use something like this.
Code:
char readString[128]; //create readString array

  // then later in your code
  WiFlyClient client = server.available();
  if (client) {
    // declare readCount and initialize to zero
    int readCount = 0;
   //Serial.println("Client connected");
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        //read char by char HTTP request
        if (readCount < 127) {
          //store characters to array
          readString[readCount] = c;
          readCount++;
          // add terminating zero
          readString[readCount] = 0;
        }
2714  Using Arduino / Networking, Protocols, and Devices / Re: How to locate CAN Bus "port" within a car on: April 03, 2013, 05:53:32 am
Normally it is pretty easy to get to. Dealers and repair shops access it to check the ECM or PCM status for troubleshooting dashboard warning lights. It may have a dust cover on the OBD socket.
2715  Using Arduino / Networking, Protocols, and Devices / Re: How to locate CAN Bus "port" within a car on: April 03, 2013, 05:47:27 am
Normally it is on the Engine Control Module or Powertrain Control Module, whichever they call it on your vehicle.
Pages: 1 ... 179 180 [181] 182 183 ... 392