Ethernet module w5100 connectivity issue. .

Hi,
here I am facing an issue. . .
I am using the mega2560 with Ethernet module w5100 and ariadne boot loader.
When I am trying to connect the Ethernet module with a switch, I am not able to establish the connection with my arduino.
But my pc is working through the same switch.
And checked with another switch then connectivity is fine. . .

here i am using D-link DES-1008A model switch.

Can somebody help me out with this problem. . . . . :confused:

When I am trying to connect the Ethernet module with a switch, I am not able to establish the connection with my arduino.

What tests have you done to say this?
Can you ping to the IP of the w5100 that you setup?
Are you using DHCP of fixed ip?
Post the ip address of computer, arduino code ...

I have to use static IP in arduino for remote programming. Checked by using both static and dynamic IP in my PC and checked with several IP 's in arduino.
I have given a sample code of ariadne(EEPROM) library.

sample_code.ino (634 Bytes)

This won't work. The gateway is unreachable, or the IP will be unreachable from other computers on this localnet.

IPAddress  ip(192, 168, 20, 41);
IPAddress  gateway(192, 168, 1, 1);
IPAddress  subnet(255, 255, 255, 0);

I looked at your code, and it doesn't use any ethernet library I recognize. This is how to post your code.

#include <avr/wdt.h>
#include <NewEEPROM.h>
#include <NetEEPROM.h>


byte  mac[] = {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC};
IPAddress  ip(192, 168, 20, 41);
IPAddress  gateway(192, 168, 1, 1);
IPAddress  subnet(255, 255, 255, 0);

word port = 46970;

String password = "r4nd0m_p4ss";


int ledpin = 9;

void setup()
{
  
  NetEEPROM.writeNet(mac, ip, gateway, subnet);

  //NetEEPROM.writePort(port);
  
  NetEEPROM.writePass(password);
  
  NetEEPROM.writeImgBad();

  pinMode(ledpin, OUTPUT);
  
  wdt_enable(WDTO_4S);
}


void loop()
{
  
  digitalWrite(ledpin, HIGH);
  delay(500);
  digitalWrite(ledpin, LOW);
  delay(500);
  
}

I used the ariadne bootloader. And the code i attached previously is used to configure the network setting of W5100 module. I have used with the same code and it worked properly. But while i am using the network switch it is not.

Please go through this link for ariadne bootloader .

That network setup will not work properly, no matter what library you use. The only IPs in that localnet are 192.168.1.2 to 192.168.1.254. Any requests for IPs outside that range (like 192.168.2.41) will be made to the gateway device.

What are the network settings on the PC? That will determine what settings you should be using on the shield.

You will probably need to contact Ariadne for help with their bootloader.

Sorry that was my mistake. It was an old code.
This is the actual code that i am using now

_1.ino (634 Bytes)

Where did you get the NetEEPROM.h library?

edit: I see now. That is part of the bootloader. You will probably need to contact Ariadne for help with their bootloader.

Please refer the GitHub link that i given above.

Once again, you will probably need to contact Ariadne for help with their bootloader.

edit: If you want to use the ethernet library included with the IDE (we can help you with that), then I have code in the playground for FTP.
http://playground.arduino.cc/Code/FTP

Thank you,
Can i use that for remote programming without the sd card ?

No. If that is your goal, contact Ariadne if their bootloader will allow that.