Shop OBEX P1 Docs P2 Docs Learn Events
WizNet W5100 code does not work with some switches?!? — Parallax Forums

WizNet W5100 code does not work with some switches?!?

agsags Posts: 386
edited 2011-01-24 11:24 in Accessories
I just lost about 30 hours of my life that I want back!

I'm using the W5100_SPI code and the DHCP code. Very nice work!

The good news is that I now know pretty much exactly how that code works - because I've been staring at it looking for bugs for two days with little sleep. The bad news is that there are no bugs (that I found). The problem I've had turns out to be with a switch that I was using to gain another port on my LAN.

I inserted the Linksys EZXS55W (v2.0) "5-Port Workgroup Switch" between my development machine and my router, and then connected the W5100 to that switch. No link light (just a pulse once approximately every 5 seconds). Could not get DHCP response. Backed down to just brute-force IP assignment, still no luck. Since it's a brand-new board and brand-new code (to me) I assumed coding errors. I tried different cables. I tried different MAC & IP addresses. I modified the code. I made a big mess.

Finally, I just disconnected my development machine from the router and connected the W5100 directly to it. And I was amazed to see my Serial Terminal print out all the things I'd been looking for for almost three sleepless days. Sent DHCP Discovery; Received DHCP Offer; Sent DHCP Request; Received DHCP Grant.

So then I went out and bought a more "modern" switch (a NETGEAR FS105) and inserted it in the exact same topology as the Linksys that didn't work. Now I have my development machine and my W5100 blinking happily away.

Does anyone know what the heck is going on with this? Is there some new protocol (it didn't look like ARP was doing anything with the W5100) or standard that the "old" Linsys doesn't comply with?

I guess the reason I'm interested in understanding what was wrong is that if there are older implementations that don't work, knowing what is going wrong might allow making the W5100 code more robust for additional applications (that, and I want my three days back!).

Anyone have any ideas or interest in this?

Al

Comments

  • kuismakuisma Posts: 134
    edited 2011-01-13 23:07
    No link? Not as simple as a MDI/MDIX issue? The new hub using auto uplink, but the old not, and you using crossed cables..?
  • agsags Posts: 386
    edited 2011-01-14 01:49
    kuisma wrote: »
    No link? Not as simple as a MDI/MDIX issue? The new hub using auto uplink, but the old not, and you using crossed cables..?

    I wish it were that easy (actually, not - then I'd really be angry at myself for wasting so much time). The (bad) Linksys has an auto MDI/MDIX uplink port, which was connected to my router. My dev machine and the WizNet were connected to two other ports. My dev box worked, the Wiz did not. I even swapped out cables.
  • kuismakuisma Posts: 134
    edited 2011-01-14 01:53
    Your dev machine may have auto uplink, and the W5100 not, and it would explain this result.

    Have you tried connecting the Spinneret to the Linksys uplink port just to see if you'll get link?
  • schillschill Posts: 741
    edited 2011-01-14 05:06
    I don't know what's happening in this case, but I do know that over the years when I've played with different network devices (for use with microcontrollers) there seem to have always been cases where they were not compatible with switches. I don't recall any cases where they were not compatible with routers (or the switches in them) but I expect they were out there too.

    I don't remember what the device was, but I had something that would not work on my network. But, if I added another switch in between the device and my network it worked fine. I also had something (going back further) that would only work if I put a 10mb hub in between it and the rest of the network (a switch would not work).
  • agsags Posts: 386
    edited 2011-01-21 15:17
    BTW, I also tried the WizNet connected to the (bad) Linksys switch with crossover and straight cables. It made no difference. I guess that will just be another unsolved mystery. However, it's great having the WizNet running. Just tested some new Prop code and was succesfully sending/receiving at speed (the Rx/Tx LEDs were on solid - about 2Mbps, I'm estimating). It was limited by the timing of what I'm driving with the Prop IO pins - controlled by frames sent over the LAN.
  • xanaduxanadu Posts: 3,347
    edited 2011-01-21 19:50
    Auto-MDIX only needs to be on one side to swap the TX/RX pins. The W5100 is very capable of Auto-MDIX up to 100Mbps. The datarate and duplex are set to auto there's no reason why Parallax would disable Auto-MDIX. I cannot find one device in my office that does not support auto mdi-x so I can't test it either.
  • PaulPaul Posts: 263
    edited 2011-01-22 11:34
    Having just started working with the Spinneret, I'm certainly glad I found someone was having the same or similar problem. I just Googled MDIX and now I know what to look for. (I think) I though it was odd that it would cycle every 5 seconds and I could ping the IP port if I timed it just right. Thanks for the info and the direction.

    Paul
  • agsags Posts: 386
    edited 2011-01-22 18:16
    Yes, as xanadu says above (and as the WizNet documentation states):
     [FONT=Arial,Arial][FONT=Arial,Arial]Supports 10/100 Base TX [/FONT]
    [/FONT] [FONT=Arial,Arial][FONT=Arial,Arial]Supports half/full duplex operation [/FONT]
    [/FONT] [FONT=Arial,Arial][FONT=Arial,Arial]Supports auto-negotiation and auto cross-over detection[/FONT][/FONT]

    [FONT=Arial,Arial]This is configurable with OPMODE{2:0] pins, which are tied low on the WIZ812MJ module, and even then, it is not possible to disable MDI/MDIX auto detection, only speed and half/full duplex operation. And, I have straight and crossover cables, which I tried, so I think we can rule out MDI/MDIX as being the cause of the problem. It has to be something else specific to the Linksys EZXS55W switch (and perhaps others). Not understanding the specific cause of the problem makes the "and perhaps others" sidenote troublesome for me, as by not understanding why it's not working, that means it is unpredictable when it might not work in other situations - until you're in the middle of them.[/FONT]
  • PaulPaul Posts: 263
    edited 2011-01-24 11:24
    I have a Belkin 5-port network switch, Mod# F5D5131-5 that work fine with the PC and our SNMP cards and other odd cards. Just not the spinneret.

    Paul
Sign In or Register to comment.