Show Posts
Pages: 1 ... 164 165 [166] 167 168 ... 408
2476  Using Arduino / Programming Questions / Re: Everything seems fine but arduino won't reach internet on: July 07, 2013, 08:08:51 am
Does your router have a html setup page? Should be
http://192.168.1.1
Can you connect to that ip with the Wifi shield?
2477  Using Arduino / Programming Questions / Re: Everything seems fine but arduino won't reach internet on: July 07, 2013, 08:04:42 am
What does the "IP Address:" show when you start the Arduino?
2478  Using Arduino / Storage / Re: Storage card micro SD and internet W5100 working together on: July 07, 2013, 05:36:29 am
You are probably running out of SRAM. Try using the F() macro to keep the static strings in program memory. And call Serial.begin() only once.

Here are examples from your code. Do the same to all other static strings in your code. See if that helps.
Code:
  Serial.println(F("DHT11 TEST PROGRAM "));
  Serial.print(F("LIBRARY VERSION: "));
  Serial.println(DHT11LIB_VERSION);
  Serial.println();
  Serial.print(F("Initializing SD card..."));
  if (!SD.begin(4)) {
   Serial.println(F("initialization failed"));
   return;
  }
  Serial.println(F("Initialization done"));
2479  Using Arduino / Networking, Protocols, and Devices / Re: ntp and sd card write, incompatible? (probably solved) on: July 07, 2013, 05:23:40 am
Below is size of sketch after compilation, could be this a problem? What the strategy for optimization.
 31.072 bytes (din maxim 32.256 bytes)
Are you using an Uno? If so, you may be running out of SRAM. If you are close to using all the program memory, it is probable that you are running low on SRAM.

Post the sketch code.

edit: If this is a post with your code, stay on that thread.
http://forum.arduino.cc/index.php?topic=175889.0
2480  Community / Website and Forum / Ethernet library reference change #2 on: July 06, 2013, 07:27:59 am
As long as you are in the ethernet library reference, the following pages need an addition.
http://arduino.cc/en/Reference/ClientWrite
http://arduino.cc/en/Reference/ServerWrite

The pages are missing one of the most useful functions if you plan on sending any NULL (zero) bytes.
client.write(dataString,count);
server.write(dataString,count);

Parameters
dataString: the array to write (byte or char array pointer)
count: the number of bytes of the dataString array to write (int)

edit: Corrected dataString parameter to "byte or char array pointer".
2481  Using Arduino / Storage / Re: Storage card micro SD and internet W5100 working together on: July 06, 2013, 05:44:50 am
The best thing to do is post your sketch code and mention which Arduino you are using.

edit: My bad. I see you mentioned the Uno. You have probably run out of SRAM. Post your code.

2482  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield DHCP/Static IP error on: July 05, 2013, 11:28:56 am
Can we please get back to the original topic about andrepcg's problem?  I have the same setup: Aduino Uno + ethernet shield + LCD keypad shield.  There is no SD card inserted in the ethernet shield. 

If I remove the LCD shield DHCP works just fine.  I can even ping my setup without any additional code to handle ICMP ping packets.  However, if I add the LCD shield back onto the stack DHCP works unreliably.  I print the ethernet board's IP address to the LCD screen and I get different addresses everytime or none at all.
Then this is not the same problem and topic as the OP. That part was solved, as it appears it is with your's. Now you have a LCD conflict problem. I recommend starting a new thread with the following info:
Your sketch code.
What LCD shield are you using?
How are you powering all this? The ethernet shield takes a bit of power on its own.
2483  Using Arduino / Networking, Protocols, and Devices / Re: webClient example problem on: July 05, 2013, 06:24:21 am
Most of the defaults are covered on the Ethernet.begin() reference page.
http://arduino.cc/en/Reference/EthernetBegin
I suggested adding the default dns server here:
http://forum.arduino.cc/index.php?topic=175768.0
2484  Community / Website and Forum / Ethernet library reference change on: July 05, 2013, 06:22:02 am
This reference page should be changed to reflect the default setting for the dns server in the function Ethernet.begin(mac,ip).
http://arduino.cc/en/Reference/EthernetBegin
Here is the requested change:
Quote
ip: the IP address of the device (array of 4 bytes)

dns: the IP address of the dns server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

gateway: the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0

edit: Changed wording. My bad.  smiley-red
2485  Using Arduino / Programming Questions / Re: Send email and send data to Emoncms in the same sketch on: July 05, 2013, 05:08:47 am
If you are using an Uno, you are probably running out of SRAM.

I recommend using one email send function and both code sections use that same email send function. I have an example email sketch in the playground. It uses an 'e' sent by the serial moitor as a trigger, but you could change that to suit your needs.
http://playground.arduino.cc/Code/Email

Call Ethernet.begin() in setup(), not in loop().
2486  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet library modification on: July 04, 2013, 12:48:24 pm
Quote
arduino settings are for 4 sockets and 2K memory per socket, I think that if we can change this setting for 4 sockets but 4K,2K,1K,1K memory per socket, we can improve the rate transfer, in my attempt I got double speed but no stability (the begining of the file is ok and after garbage data...)
I am not surprised at all, especially if any UDP functions are being used, like dhcp, dns, ntp. One of those could get your big socket. Then the library will use the next socket. You can end up rotating through all the sockets over a period of time.

You could modify the crap out of this library, or write your own, that uses specifically that one socket. But then you are limited to that one socket for your "big stuff".
2487  Using Arduino / Networking, Protocols, and Devices / Re: webClient example problem on: July 04, 2013, 12:00:41 pm
So, there are expectations built into the library as to what the gateway, DNS server, subnet mask, etc. are that are not explained in the documentation.

These expectations are not necessarily the same expectations built into the other library, and are most likely not valid for OPs situation.
Yes and yes. But the second should be no. It should be so easy to change that one last call in the last begin function to a 28J60 setup call. It is all there for you, regardless of the processor you are about to initialize.
2488  Using Arduino / Networking, Protocols, and Devices / Re: webClient example problem on: July 04, 2013, 11:38:02 am
This is from Ethernet.cpp. Note how each constructs the next ip and calls the next begin() below it. The dns server ip is constructed the same as the gateway.
Code:
void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip)
{
  // Assume the DNS server will be the machine on the same network as the local IP
  // but with last octet being '1'
  IPAddress dns_server = local_ip;
  dns_server[3] = 1;
  begin(mac_address, local_ip, dns_server);
}

void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server)
{
  // Assume the gateway will be the machine on the same network as the local IP
  // but with last octet being '1'
  IPAddress gateway = local_ip;
  gateway[3] = 1;
  begin(mac_address, local_ip, dns_server, gateway);
}

void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway)
{
  IPAddress subnet(255, 255, 255, 0);
  begin(mac_address, local_ip, dns_server, gateway, subnet);
}

void EthernetClass::begin(uint8_t *mac, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet)
{
  W5100.init();
  W5100.setMACAddress(mac);
  W5100.setIPAddress(local_ip._address);
  W5100.setGatewayIp(gateway._address);
  W5100.setSubnetMask(subnet._address);
  _dnsServerAddress = dns_server;
}
2489  Using Arduino / Networking, Protocols, and Devices / Re: Problem On webclient example with arduino and ENC28J60 ethernet on: July 04, 2013, 10:59:55 am
You may also be correct there, but I can't tell from here. If I was as familiar with, and confident in, the 28J60 library as I am the 5100 library, I could be a bit more positive on that answer.

I don't think zoomkat meant that code did not work on the ENC28J60. He was mentioning only it was tested on a w5100. I think he is in the same boat with me. I don't think he has a 28J60 either.

For the longest time, these two libraries were not interchangeable.

edit: If someone will verify these known-good w5100 sketches work with an ENC28J60, I'll change the header on both pages.
http://playground.arduino.cc/Code/WebClient
http://playground.arduino.cc/Code/WebServerST
2490  Using Arduino / Networking, Protocols, and Devices / Re: Problem On webclient example with arduino and ENC28J60 ethernet on: July 04, 2013, 10:18:32 am
The class that OP is using is not the one designed for the W5100 chip, but it is supposed to provide the same interface and same responses as the one that is designed to work with the W5100 chip.

The comment is a cover-your-ass thing that says only that you have tested the code with the library designed for the W5100 chip and that you know that it works.

There is nothing in the sketch that is dependent on the W5100 chip. It is only dependent an a specific interface that the library that supports the W5100 chip agrees to implement. Other code supporting other chips can implement the same interface, and your code should work.

The fact that it does not, for the poster, is not a problem with your code or his library. It appears to be either a network problem on OPs end, a router configuration issue, or a PEBKAC issue (that's the most likely cause, in my opinion).
I agree with the first statement. They should both be able to work with the same function calls. This just means that nobody has debugged the ENC28J60 like we have the W5100. It is the IC sold on the Arduino ethernet shield, so it will probably be the most popular.

I have tested and debugged the W5100/ethernet library as best I can. The remaining tests would be up to someone else, since I do not have a ENC28J60 shield.
Pages: 1 ... 164 165 [166] 167 168 ... 408