Show Posts
|
|
Pages: 1 [2] 3 4 ... 231
|
|
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? 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
|
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? 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
|
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. 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/ArduinoBoardUnoThe Mega 2560 has the same warning. http://arduino.cc/en/Main/ArduinoBoardMega2560On 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.0It 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.
|
|
|
|
|
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. // 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.
|
|
|
|
|
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. 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. 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);
}
|
|
|
|
|