Show Posts
Pages: 1 2 [3] 4 5 ... 361
31  Using Arduino / Networking, Protocols, and Devices / Re: Minimum FTP Client on: April 17, 2014, 06:53:51 am
If the command connection opens and allows you to login, then fails at the data connection open, that is normally a FTP server firewall problem.

With the HTTP code, you can't use 127.0.0.1 for the server on the Arduino. That is localhost. If the server is on a localnet, you must use the local ip address of the server.
32  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet UDP hang on: April 17, 2014, 06:34:00 am
@Lugination: Looks like you did not add the include files required to compile the sketch. UDP requires these includes.
Code:
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
33  Using Arduino / Networking, Protocols, and Devices / Re: Minimum FTP Client on: April 17, 2014, 06:26:49 am
If you need only one text file from a server to the Arduino, you can use http protocol and a standard web server.

If you want to use my FTP code from the playground, I need to know what the response from the FTP download attempt.
Does it connect to the server?
Does it log in?
Does it open the data channel?
34  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield Coding on: April 16, 2014, 04:43:05 pm
Is that a switch or a router?

Do you have a commercial account (static IP) with your ISP? If not commercial, it is probable that your ISP blocks certain ports, like port 80 requests from the internet.
35  Using Arduino / Programming Questions / Re: GSM 900 sms ÿÿ0€ error reading sms messages on: April 16, 2014, 08:30:20 am
I don't know about the GSM, but normally, Arduino functions return -1 when no characters are available from that device. That will display the funny y.
Funny y = ÿ = 255 = -1 = no characters available
36  Using Arduino / Networking, Protocols, and Devices / Re: Testing Ethernet shield example on: April 16, 2014, 06:43:48 am
Try this sketch. It tests the SPI bus and the SPI end of the w5100. Does it show 192.168.2.2 on the serial monitor? If it shows anything else, like 0.0.0.0, then check the shield connection to the Arduino. Insure all pins are inserted into the sockets.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,2,2);

void setup() {
  Serial.begin(9600);

  // disable SD card if one in the slot
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Serial.println("Starting w5100");
  Ethernet.begin(mac,ip);
  Serial.println(Ethernet.localIP());
}

void loop() {
}

BTW, the dhcp example I posted in Programming wouldn't work if you are connected directly to your PC. It doesn't have a dhcp server set up on that interface. That would have been helpful to know.
37  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield Coding on: April 16, 2014, 06:37:14 am
I will reply to the post you started in Networking. It belongs there.
edit: I see a moderator merged both subjects. Thanks!  smiley
38  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield Coding on: April 15, 2014, 08:17:03 am
Try this test code. It uses dhcp to get an ip and the other network stuff. If you don't understand the results, post them here and I'll see if I can help you.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0x00, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

void setup() {
  Serial.begin(9600);

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

  Serial.print(F("Starting ethernet..."));
  if(!Ethernet.begin(mac)) Serial.println(F("failed"));
  else {
      Serial.print(F("IP: "));
      Serial.println(Ethernet.localIP());
      Serial.print(F("Subnet: "));
      Serial.println(Ethernet.subnetMask());
      Serial.print(F("Gateway: "));
      Serial.println(Ethernet.gatewayIP());
      Serial.print(F("DNS server: "));
      Serial.println(Ethernet.dnsServerIP());
}

void loop() {
}

edit: My bad. I forgot the includes. I added them.
39  Using Arduino / Programming Questions / Re: DHCP Lease renewal on: April 15, 2014, 06:11:03 am
Return values 1 and 3 indicate the renew failed, and the lease was not renewed. As I recall, maintain will reattempt to renew the lease at 3/4 the lease time, and again when the lease expires. edit: In the mean time, it will continue to use the ip it was last assigned.

Normally return values 2 or 4 indicate the lease was renewed successfully, usually indicating your device got the same ip as before, but not guaranteed you got the same ip. That depends on the router running the dhcp server.
40  Using Arduino / Networking, Protocols, and Devices / Re: Using Arduino UNO and WIZ550io - crashes when using ethernet.begin(macData) on: April 15, 2014, 06:05:46 am
Post the code or a link to that example code.
41  Using Arduino / Networking, Protocols, and Devices / Re: Arduino wiznet5100 and remote ip trougth http service on: April 15, 2014, 06:03:03 am
Post the code you tried to get the remote ip or links to that code. The "Tinywebserver" may be so small it doesn't include the low level functions required to use the mods.
42  Using Arduino / Programming Questions / Re: DHCP Lease renewal on: April 15, 2014, 05:27:47 am
You must call Ethernet.maintain() in the loop function. You can call it as often as you want, like every iteration of the loop because it does nothing until half the lease time has expired.

edit: I use this. Ethernet.maintain() returns 0 if no action was taken, so nothing is printed for  a zero return value.
Code:
     byte rtnVal = Ethernet.maintain();
      switch(rtnVal) {
        case 1: Serial.println(F("\r\nDHCP renew fail"));        
                break;
        case 2: Serial.println(F("\r\nDHCP renew ok"));        
                break;
        case 3: Serial.println(F("\r\nDHCP rebind fail"));        
                break;
        case 4: Serial.println(F("\r\nDHCP rebind ok"));        
                break;
      }
     
43  Using Arduino / Networking, Protocols, and Devices / Re: Why can't I assign my Ethernet shield and IP address? on: April 14, 2014, 08:26:10 am
I think this should be the warning:
DO NOT USE SD CARD IF USING ETHERNET COMMUNICATION UNLESS YOU UNDERSTAND HOW TO USE BOTH TOGETHER

edit: Or considering the number of SPI problems posted here, how about this warning?
DO NOT USE MULTIPLE SPI DEVICES UNLESS YOU UNDERSTAND HOW TO USE THE SPI BUS
44  Using Arduino / Networking, Protocols, and Devices / Re: Communicate between microcontrollers: Automatic address and request-less send? on: April 14, 2014, 08:04:00 am
Is there something wrong with using digital pins for the button presses? Use one digital pin from each remote microcontroller to the core Arduino to determine "first press" and use the serial for transferring stuff like scores, etc.

45  Using Arduino / Networking, Protocols, and Devices / Re: RFID Reader + Ethernet Shield on: April 14, 2014, 07:24:58 am
The Ethernet Shield has a hardware flaw. The MOSI line is active the whole time. It ignores it's chip select signal. FIX: I bought a new Ethernet shield that included a fix.
The MOSI line (Master Out, Slave In) should be active the whole time. It would be the MISO line (Master In, Slave OUT) that would cause problems.

Which ethernet shield model had the flaw? Which model did you replace it with?
Pages: 1 2 [3] 4 5 ... 361