Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago. This question has been closed. Reason: Problem Solved - Incorrect Wiring
Ethernet not working - no ip address (new stack)
Hi, I'm trying to get my mbed LPC1768 to communicate via ethernet, but can't get it to work.
I have wired up a MagiJack (SI-60008-F) as per the RJ45 page, I'm assuming it's the same as the top one as it has no LEDs but my part number is slightly different. The TD+/-, RD+/- are connected to the relevant mbed pins, RDC and TDC to 3.3V with a 100n cap to ground, and ground to, well, ground.
I'm trying to run the example code TCPSocket_HelloWorld - main.cpp here. I've plugged the mbed into the back of my router (a Sky hub if that matters) with a tiny 0.5m cat 5e cable, and the orange and green LED on the router port light up and flash a bit. So some communication is happening I think, but the printf from the mbed over serial just returns a blank IP address and then nothing afterwards!
"IP Address is "
Then nothing.
I don't really know what to do/try next, I can't do anything else if DHCP won't assign an IP to the mbed. It shows up in the router logs as "eth3 link UP 100 mbps full duplex" or similar, but not in the router's table of connected devices. It's not a very hackable router so I can't seem to find out any more detailed info from it :/ What would the mbed even show up as name-wise? The code doesn't assign any sort of device name to the mbed unless there is a default one configured behind the scenes...
Any ideas?
Thanks in advance!
2 Answers
10 years, 5 months ago.
I haven't worked with ethernet myself, so I probably can't help too much.
However the 60008 is definately not the same as the 60002. This is the 60002: http://www.farnell.com/datasheets/17297.pdf, and this the 60008: http://www.farnell.com/datasheets/302465.pdf.
Now I believe I read here once for very short distances it might be fine without the aditional stuff, but it is definately not just a different version of the same component.
Ah, so what have I got then? Is it just a straight through jack? I looked at the datasheet for mine, saw the transformer looking things and just assumed that was what 'integrated magnetics' was, but apparently not. I've never worked with ethernet before, had no idea it was this complicated!
So do I want to be using the second one down then on the ethernet page? This one:
| | | | --||--||--||--||----- Socket mbed / 8 | 6 | 4 | 2 | /| 1 TD+ / 7 5 3 1 / | 2 TD- / / | 3 RD+ / / | 4 / / | 5 / / | 6 RD- /___________________ / | 7 | -------- | | 8 | -- -- | | | --- | ---- | / || /--/-/-/-/-/-/-|| / ___ ________ || / 8 7 6 5 4 3 2|| / ________________ -/ \- ____ | ____ | || / / / / / / / / || / ,= ,++, /, , , , , ,\|, , ,| , , /, ,| , |, , ,_| || / / / / / / / / /|| / ============================================================ ||/ ' ' ' ' ' ' ' ' || / | | | | | | | | | | | | | | | | | | | | | ------------------- |/ | | | | | | | | | | | | | | | | | | | | --------------------- ^ ^ ^ ^ Ethernet Socket Front mbed Board TD+TD-RD+RD-
Oh and I've tried manually assigning a static IP in the code, which will then show up in the printf, but it still won't do anything after that. I'm guessing the router isn't going to like a device demanding a specific IP. It will want to assign one to it with DHCP. I can't ping it or anything using this static IP anyway, so I don't think it's actually properly registered or working.
posted by Jamie McKee 17 Dec 2013As requested, more details!
They say a picture is worth a thousand words, so here's a photo of my wiring:
Ignore the resistor, LED, and mosfet, they were just me messing around.
The wiring is exactly as described here, reproduced below for convenience:
The only difference is that my jack is a SI-60008-F not a SI-60002-F, but it has no LEDs either so I'm hoping it's the same?
I was running the example hello world program
Import programTCPSocket_HelloWorld - main.cpp
But I've since modified that a bit to try and get a bit more information about what's going on:
posted by Jamie McKee 18 Dec 2013Getting an IP address fails with code -1 :/
I'm stumped!
posted by Jamie McKee 18 Dec 2013