Show Posts
Pages: 1 2 3 [4] 5 6 ... 359
46  Using Arduino / Networking, Protocols, and Devices / Re: Nrf24l01 & SDCard (ether shield) combination (mega 2560) on: April 07, 2014, 06:55:48 am
Try each device code with both devices (or three if ethernet shield) connected to the Arduino. Try the nRF24 code first with this added to the setup function.
Code:
void setup() {
  // disable w5100 SPI
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  // rest of the nRF24 setup code

Does it do any better?
47  Using Arduino / Networking, Protocols, and Devices / Re: RFID Reader + Ethernet Shield on: April 07, 2014, 06:49:43 am
Test each separately with both devices connected to the Mega. Try the RFID code first with this added to the setup.
Code:
void setup() {
  // disable w5100 SPI
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  // rest of your setup
Does this do any better?
48  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield Problems... on: April 06, 2014, 05:52:50 am
If it is crashing your network, it must be using an ip that is already assigned to another device. The best thing to do is post your code.

49  Using Arduino / Networking, Protocols, and Devices / Re: arduino send email with w5100 ethernet shield on: April 05, 2014, 08:41:01 am
If it rejected your email from your ip, don't bother setting up your own email server with the same or similar ip. It will be rejected also.

Check with your ISP tech support. Explain your challenge. Tell them you can't use SSL or TLS due to memory restrictions, and see if they have an alternative plan for you. Maybe they can open their email server to take port 25 relay email from your ip.

50  Using Arduino / Project Guidance / Re: Ethernet + SD card (FAT32) code becomes too long for my UNO on: April 05, 2014, 06:46:22 am
It sounds like you are running out of SRAM and it is causing your code to restart when it overflows (wraps around). Go through your code and use the F() function with your static strings.
Code:
  Serial.print(F("server is at "));
  Serial.println(Ethernet.localIP());
51  Using Arduino / Project Guidance / Re: building a door lock. Arduino freezes after 2 days on: April 05, 2014, 05:36:03 am
It appears this is server code. I don't see where you are closing the connection. That is the server's duty to close the connection when it is finished sending. You need a client.stop() somewhere or you will probably run out of sockets. There are only 4 of them.
52  Using Arduino / Project Guidance / Re: Ethernet + SD card (FAT32) code becomes too long for my UNO on: April 05, 2014, 05:21:23 am
Try to reduce the code size by using shorter static strings and eliminate (comment out) the Serial.print() debug strings as you debug each section of code.
53  Using Arduino / Project Guidance / Re: Ethernet + SD card (FAT32) code becomes too long for my UNO on: April 05, 2014, 05:10:43 am
Mega 2560?
54  Using Arduino / Networking, Protocols, and Devices / Re: arduino send email with w5100 ethernet shield on: April 05, 2014, 03:41:29 am
Did you try this?
http://playground.arduino.cc/Code/Email

You may have problems with it also. It sends email like an email server sends to another email server. The problem may be your email will be rejected because your ip address is not in a commercial subnet. If your account with your ISP is a residential type and your IP is issued by dhcp, then it will probably be rejected by many public email servers like Gmail and Yahoo.

Since the ethernet library does not support SSL or TLS, you can't send email to either of those services as a client.
55  Using Arduino / Networking, Protocols, and Devices / Re: Can't get UDP packet size from WiFi Shield driver on: April 04, 2014, 04:36:40 pm
You are correct about the buffer. If you blast it with data faster than it can take it, it will fail. The TCP server code has the same bug. It accepts client requests faster than the shield can process them, and the incorrect or corrupted page is returned to the client.

It also has a UDP bug that it will return a response to a packet from a different port that you sent the packet to. I send a packet to the wifi shield to port 5005, and it returns the packet to the correct port, but it will be from port 4097 on my shield.

I have received and sent 48 byte UDP packets at 10 per second with no problems. I haven't tested it at rates faster than that.

This is why I use an ethernet shield instead.
56  Using Arduino / Networking, Protocols, and Devices / Re: Can't get UDP packet size from WiFi Shield driver on: April 04, 2014, 03:59:15 pm
You have upgraded the WiFi shield firmware to version 1.1.0, correct? After the shield status check, add the firmware version check below. If it does not report 1.1.0, then you need to upgrade.
Code:
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

// check firmware version
Serial.print(F("Firmware version: "));
Serial.println(WiFi.firmwareVersion());

// rest of your setup code
57  Using Arduino / Networking, Protocols, and Devices / Re: Can't get UDP packet size from WiFi Shield driver on: April 04, 2014, 03:27:51 pm
Take a look at the WiFi UdpSendReceiveString sketch in the WiFi examples. It is the Udp.parsePacket() function that returns the packet size.
58  Using Arduino / Networking, Protocols, and Devices / Re: control an Alen&Heath QU-16 digital mixer by MIDI over TCP on: April 03, 2014, 06:02:19 am
The way I test this is to disconnect the ethernet cable from the ethernet shield once the connection is established. You should test your code the same way. Let your Arduino connect to the mixer, then pull out the CAT5 cable from the Arduino, then plug it back in after a few seconds. If it doesn't reconnect, then your code needs some more work.
59  Using Arduino / Networking, Protocols, and Devices / Re: control an Alen&Heath QU-16 digital mixer by MIDI over TCP on: April 03, 2014, 05:03:02 am
If the connection fails or the server stalls, it will lock up your code. The client.connected() call will return true until the server closes the connection and the client gets the close message. If the connection is broken or the server stalls, that close message is never received by the client. The client will then wait for packets that will never arrive, locking up your sketch.

The best way to avoid that is to incorporate a timeout feature to close and reopen the connection. I don't have a persistent connection example, but here is my client sketch in the playground.
http://playground.arduino.cc/Code/WebClient
Look through the GET example for the variable loopCount. If no packet is received from the server in 10 seconds, it closes the connection on the client end. You should do the same. If you do not receive a packet for 10 seconds, close the connection on your end and immediately reopen it.
60  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet.begin() fails! on: April 01, 2014, 10:15:12 am
That would be a good idea if the OP used an ethernet card with a ENC28j60 instead of a w5100 ethernet controller.
Pages: 1 2 3 [4] 5 6 ... 359