W5100 wont connect to a switch

I have an arduino mega with a W5100 shield running a program that receives UDP packets.

When I connect the W5100 directly to my laptop ethernet port it works perfectly. Receiving all the packets.

When I connect the W5100 instead to a 10/100 switch and the laptop as well the arduino refuses to hold a connection to the switch and does not receive any packets.

  • I have tried 2 switches including a brand new one.
  • The ethernet cable between the computer and the switch works … the switch holds the connection. My cable tester also shows it is good.
  • I have disabled wireless on my laptop so the only connection is the wired one
  • when I try to ping the W5100 I get no response. There is also no ARP table entry for it on my laptop

I am out of ideas … any guesses as to what i am doing wrong is appreciated.

keithsw1111: I have an arduino mega with a W5100 shield running a program that receives UDP packets.

When I connect the W5100 directly to my laptop ethernet port it works perfectly. Receiving all the packets.

When I connect the W5100 instead to a 10/100 switch and the laptop as well the arduino refuses to hold a connection to the switch and does not receive any packets.

  • I have tried 2 switches including a brand new one.
  • The ethernet cable between the computer and the switch works ... the switch holds the connection. My cable tester also shows it is good.
  • I have disabled wireless on my laptop so the only connection is the wired one
  • when I try to ping the W5100 I get no response. There is also no ARP table entry for it on my laptop

I am out of ideas ... any guesses as to what i am doing wrong is appreciated.

Question? Is this a HUB or a Switch? A switch by definition only rebroadcasts packets to the addressed individuals. A UDP datacast has no destination specified. I had a similar problem with a Smart Switch. I had to configure it to broadcast UDP packets. Don't know if this is your Issue.

Another possibility, can you get the W5100 to broadcast a ping or something. This would give the switch an entry for its MAC table. It might not be sending anything out the W5100's port because it does not think anything is there?

Chuck.

Definitely a switch

Udp packets are unicast.

The arp protocol should help locate the w5100 and I can see them being sent in wireshark but no responses are received.

Did you try the last thing that chucktodd suggested? It is probably not the PC that is the problem. It is the switch. If the switch doesn’t have any communication with the Arduino, it might not be able to determine which switch port the Arduino is connected to. Send something from the Arduino, even if it is bogus.

edit: Any communication attempt from the w5100, whether TCP or UDP, will cause the w5100 to send an ARP request to the switch. At that point, the switch should be able to route packets to the Arduino from the rest of the network.

I did try it and it didnt work. My workaround was to add a static arp entry on my pc. That works but it is not ideal.