OK, at this point it just HAS to be operator error. This is not directly DCC++ (except that I'm trying to get this to work so I can use it with DCC++). I cannot seem for the life of me to get Ethernet working. I have: * Arduino UNO R3 (brand new) * Arduino MEGA 2560 (a bit older but very functional) Both of these boards have been tested and shown to work for a variety of non-Ethernet applications, including DCC++ I also have: * Kuman K15 Ethernet Shield W5100 (supposed to be compatible with the standard Ethernet library). * Seeed Studio W5200 Ethernet shield (with its own library) * Adafruit CC3000 WiFi Shield (also with its own library). Nevermind DCC++. I can't get ANY of these boards to work with EITHER Arduino, even with the example code from the respective libraries. The closest I've gotten is the UNO + the Kuman board, running the DHCP Address Printer example, for which I get a "Failed to configure Ethernet using DHCP" message (which means the Ethernet.begin(mac) call failed). When I run DCC++ configured for the Kuman board (W5100) It reports 0.0.0.0 for the address. I'm not even quite sure where to start debugging this, but I find it hard to believe that I have THREE shields and/or TWO Arduinos (that otherwise work fine) that have hardware problems. A little help here, guys? I'd really appreciate it.
Mark, Just a thought before I head to bed. Is it possible your router firewall is set to require MAC ID identification in order to operate on ypur wifi? I'll give it more thought tomorrow. Gute Nacht, Kevin
FTR, I've tried powering the board(s)... (A) just with USB power (wired Ethernet only) (B) With a 9V 2A supply on the Arduino's barrel connector (C) With a 12V 3A supply on the Arduino's barrel connector. I'm also trying (and failing) to get this to work with *only* the Arduino and the Ethernet or WiFI shield, nothing else hooked up to interfere.
If your Ethernet cards is of a Chinese flavor then this might apply to you: https://forum.arduino.cc/index.php?topic=351477.0 KeithswIII explain the problem with the Chinese cards well. If it applies, there are on the net various solutions to the problem but the easiest is the 2 resistors under the board.
I've always found most libraries that are supplied are not the greatest. Can you post your code that your trying and I'll take a look tonight. I have never had an issue with an Ethernet shield.
My shield does indeed have the 510Ω (marked "511") resistor pack. Now I have to decide whether I've got enough other stuff to order from my favorite electronics house to justify the shipping cost (which will be about 1000% of the resistor price!). Let's hope that's the problem...
I'm using the DHCPAddressPrinter example from the official Arduino library with the Kuman shield which claims to be 100% compatible with the official library (they don't provide their own), and on the UNO. Arduino.cc IDE version 1.8.1.
I took a look at that sample code, and I also looked up the Kuman board.. The kuman board apparently comes with it's own mac address, so I would try this, Try changing "if (Ethernet.begin(mac) == 0) {" to "if (Ethernet.begin() == 0) {" Or you can try changing: byte mac[] = {0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 }; (provided in the code) to byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; (manufacturers)
With some mjudicious soldering, you can use discrete resistors to replace the resistor pack.... Look at this posting on Dave Bodner's site.......http://trainelectronics.com/DCC_Arduino/DCC++/index.htm
@ Twindad. I have 2x 100 Ohm 1% resistors on mine. One on pin 1 &2 and the other one pin 3 & 6. (the easy way) The to complicate it a bit more, if it is a WIZnet chip it is also a bit fussy with some Ethernet libraries. There is a site or two that has WIZnet libraries but some are not always up to date.
Well forget my first suggestion anyway, I just tried it, and it won't even compile. But I have tested the sketch and it DOES work for me. Which lights are you getting on the Kuman board? I have PWR, LINK, 100M, FULLD, COLL is off, and RX & TX flicker the odd time. Is it possible your router is the problem?
OK, back at this a bit... LEDS... PWR is on solid (red). TX is blinking green, and the little yellow un-named LED next to the AREF and GND pins is flickering rapidly. That's all. Eventually the TX stops flashing, I suppose when it gives up I suppose it's possible there's a router problem, but I wouldn't know what it could be. I'm using a wireless adapter connected to the Kumon board's ethernet port (because my router is downstairs). It's a TP-LINK TP-W802N pocket router in "Client" mode. That same pocket router configured exactly the same way works flawlessly when connected to my Mac (with the Mac's own wireless disabled). So I don't think that's it either...
for testing purposes only, can you use a LAN cable and plug in directly to your router? if it works that way, you know it is the wifi adapter you are trying. just trying to eliminate items.
Basically the same results. The FULLD light did start blinking, but the router does not show the device as attached, and the Arduino sketch returned the "Failed to connect via DHCP" message. The router *did* show my laptop (which, for comparison purposes, I also connected via cable) as attached, with a DHCP-assigned address.
So no link light either than.. In that case, I'd say the Kuman Ethernet shield is bad.. Can you conduct the same test (connecting directly) with your other 2 shields and see it makes a difference? If you have the same problem, then I am at a total loss.. The only other thing would be your router I would guess.
Mark, I've used the TP 702N with DCC++, would it help to try to use your 802n in AP Mode just to see if the Wifi assigns an IP address?
TwinDad Many folks have issues with the SPI. Remove any card in the SD slot. Try Surfer Tim's test code at post #4 here....... http://forum.arduino.cc/index.php/topic,156082.msg1169948.html#msg1169948 And run the test by connection to a router, where you have a known DHCP server, which is not always the case when plugging in to a PC. If configuring for a PC connection that doesn't have DHCP, then use the static call: Ethernet.begin(mac, ip, dns, gateway, subnet); easy way Or configure the PC @youtube /watch?v=4xwwV_s9Gik&list=UUNNLL5gqyn0_8OEAKS8zzuQ not so easy way Hope you get this sorted soon. Steve.
OK, tried this... 1) Surfer Tim's Test as-is, with no SD card (i've never had an SD card installed, FTR) - it worked. 2) DHCP test with adding lines to drive pin 4 high, using W802N as wifi adapter to home WiFi - failed (no DHCP) 3) DHCP test with added lines, wired directly to my Netgear N600 router - failed (no DHCP) 4) Surfer Tim's Test with the pin-4 lines commented out (so it's the same SD-wise as the other code I've been testing) - it worked. So it appears the SPI stuff has been working OK all along, with or without disabling the SD, but we are still failing to connect to the network. One thing I failed to notice (and thus mention) ... the lights on the ethernet port itself are dark.
I think my next move is going to have to be replacing that resistor pack Fortunately I need to order a bunch of other stuff from DigiKey anyway. I also have an ESP8266 board on the wish list. Suggestions for a good specific model? I would prefer a shield but a module isn't out of the question.