Loading...
  Show Posts
Pages: 1 [2] 3 4 ... 231
16  Using Arduino / Interfacing w/ Software on the Computer / Re: [SOLVED with a last Question]Arduino Uno+WAMP+Ethernet,what are the IPs i need? on: May 16, 2013, 12:13:43 pm
You don't need udp port 80, but it won't hurt if it is a localnet server.

The ip choice is fairly logical. Don't use one that is already in use. I avoid ip addresses that may be issued by a dhcp server. The ips must be in the same subnet. That will depend on the netmask.

Don't feel intimidated. It took me 20 years to learn all this.
17  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Uno + WAMP + Ethernet, what are the IPs i need? on: May 16, 2013, 09:48:40 am
Have you tried a computer connected the same way to the WAMP server? You may have a firewall problem. Do you have the firewall set to allow access to port 80? Checking with a web browser on the server is not a valid check. It does not test the firewall.
18  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Uno + WAMP + Ethernet, what are the IPs i need? on: May 16, 2013, 07:49:46 am
You need to change the localnet on your ethernet port. It is the same subnet as your wireless interface. That causes a routing problem.

If the ip of your wireless interface is 192.168.1.3, then change the ip on your ethernet port to 192.168.2.1, and use 192.168.2.2 on the Arduino. Then use 192.168.2.1 for your server ip in the Arduino. That will eliminate the routing problem.
19  Using Arduino / Programming Questions / Re: enc28j60 error HTTP/1.1 404 Not Found on: May 16, 2013, 07:24:10 am
Would you like to see where the extra characters are put?
Code:
char buff[1];
char testBuf[16];
sprintf(buff, "?t=%d&h=%d&p=%d", t, h, p);
Serial.println(buff);
Serial.println(testBuf);
strcpy(testBuf,"Bad data");
Serial.println(buff);
Last time I checked, testBuf should show all characters except the '?', and the last line should show "?Bad data". You have just been lucky the SRAM was not being used before.
20  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Uno + WAMP + Ethernet, what are the IPs i need? on: May 16, 2013, 05:26:33 am
Quote
I tried as changed above with "2"s, and i also tried by changing the set ethernet IP to 192.168.1.1 so i got  serverName[] = { 192,168,1,1 };
You can't just make up some of this. The WAMP server ip is static, isn't it? What is the network settings on your WAMP ethernet port that is connected to the ethernet shield?
Quote
Is there some general reason to keep the same subnet?
Yes. If you want to connect to anything else, it must be in the same subnet. If you assign 192.168.1.2 to your Arduino and do not specify a netmask, it presumes the localnet is all 192.168.1.x devices. It also expects the gateway to other non-localnet ip addresses is 192.168.1.1.

If your server is 192.168.2.1, then the Arduino presumes that is not on the localnet, and tries to send the request to 192.168.1.1 (gateway), but there isn't a gateway at 192.168.1.1. Or is there?
21  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield, Power, Am I playing with fire? on: May 15, 2013, 04:22:18 pm
Quote
Am I playing with fire?
Probably, but not for the reason you think.

The ethernet shield has its own 3.3v regulator onboard. It uses the 5v bus on the Arduino to get its power. So far, so good.

Now the warning. This is from the Uno datasheet.
Quote
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
http://arduino.cc/en/Main/ArduinoBoardUno
The Mega 2560 has the same warning.
http://arduino.cc/en/Main/ArduinoBoardMega2560
On the Mega, this has been known to brick the usb port if you supply power to the usb port and the 5v pin concurrently. It has to do with the FET that shuts off the usb power to the 5v bus when Vin > 6.6v. But if you power the Arduino at the 5v pin, the FET keeps the two power supplies connected. Bad news. Here is the topic on that.
http://forum.arduino.cc/index.php?topic=82046.0
It is quite long, but you should read reply #32 on page 3.
22  Using Arduino / Installation & Troubleshooting / Re: Connecting Arduino UNO to Windows XP on: May 15, 2013, 03:54:34 pm
It has been a while since I did this with my XP box. As I recall, you go to
Control panel -> System -> Hardware -> Device Manager

Double click the device you believe is the Arduino. Click "Reinstall driver". You should end up in the Hardware Update Wizard. Select the "install from a list or specified location" radio button. Click "Next".

Now select "include this location in the search". Click "Browse" and navigate to the /arduino-1.0.4/drivers folder in your Arduino dowload. When you click on that folder, the OK button should highlight (become active) and you should select it.

Then click Next.
23  Using Arduino / Programming Questions / Re: ethernetshield ip address retriving on: May 15, 2013, 02:55:43 pm
If you need the default gateway for the ethernet shield, this will get it.
Code:
Serial.print(F("Default gateway = "));
IPAddress newGateway = Ethernet.gatewayIP();
Serial.println(newGateway);
24  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Uno + WAMP + Ethernet, what are the IPs i need? on: May 15, 2013, 02:41:47 pm
Keep them in the same subnet. I changed the w5100 ip below.
Code:
byte ip[] = { 192,168,2,3 };
byte serverName[] = { 192,168,2,1 };
25  Using Arduino / Networking, Protocols, and Devices / Re: Arduino+Wifi Shield sending email - 501 NULL character error on: May 15, 2013, 06:26:51 am
I don't know if this is causing your problem, but when you send helo, it should be followed by the public ip address.
Code:
// change this ip to your public ip
  client.println(F("helo 1.2.3.4"));

You could also be running out of SRAM. I don't know how much SRAM the wifi stuff takes. Try using the F() macro to keep the static strings in program memory. You must use client.print() or client.println() to use the F() macro. It fails with client.write().

edit: I added the F() macro to the code line above as an example.
26  Using Arduino / Networking, Protocols, and Devices / Re: Load pages from SD (W5100) on: May 14, 2013, 11:06:44 am
I have not tried v1.5.2 yet. Each version seems to have its own quirks. However, it seems lately we are upgrading from a lot of quirks to just a few quirks. I guess if we keep at it... smiley

My results with v1.0.4 agree with zoomkat. About 4 times as fast.
27  Using Arduino / Networking, Protocols, and Devices / Re: Load pages from SD (W5100) on: May 14, 2013, 10:20:55 am
It is because of the way you are sending it. One byte per packet is very inefficient.
Code:
if (webFile) {
  while(webFile.available()) {

// Here is your holdup. You are sending one byte per packet.
// 48 bytes of header, and one byte payload.
    client.write(webFile.read()); // send web page to client
  }
  webFile.close();
}
Here is another topic that covers this, and the cure.
http://forum.arduino.cc/index.php?topic=134868.0
28  Using Arduino / Networking, Protocols, and Devices / Re: Communication modbus/TCP on: May 14, 2013, 09:11:16 am
I do not think that would make a difference. I've had really good luck using the ethernet library using UDP and TCP protocols, even persistent connections. My longest persistent client connection was 12 hours without a single packet drop. I terminated it because I needed the computer and Arduino for other stuff.

Quote
I havent got the socomec device to see if it would send me back something.
If you do not have the device acting as the server, it will be very difficult to troubleshoot.
29  Using Arduino / Networking, Protocols, and Devices / Re: Communication modbus/TCP on: May 14, 2013, 07:04:33 am
Unless you are trying to maintain a persistent connection, you should move the client.write call to setup in this case. Otherwise it sends that string to the server every iteration of the loop(), but reads only one character from the rx buffer.
Code:
  delay(1000);
  Serial.println("Connexion en cours...\n");
  if (client.connect(server, 502)) {
    Serial.println("Connexion OK\n");

// Move client.write to here   
    client.write(message, sizeof(message));
  }
}

void loop()
{

// remove client.write from here
//  client.write(message, sizeof(message));

  // Lecture resultat requete
  if (client.available()) {
    char c = client.read();

    Serial.println(c, HEX);

  }
30  Community / Website and Forum / Re: The Forum is Buggy on: May 14, 2013, 05:58:04 am
Quote
All is fine now, probably an operational hickup.
It started Sunday, and it wasn't a hiccup. More like a "technicolor yawn".  smiley-wink
http://www.urbandictionary.com/define.php?term=technicolor%20yawn
Pages: 1 [2] 3 4 ... 231