Difficulty getting my Teensy connected to my network.

Status
Not open for further replies.

billiam

New member
Hey all, longtime lurker here posting for the first time. Just switched from Arduino to Teensy. Here's my situation:

Software:
Win7
Arduino 1.6.5r2
Teensyduino 1.24

Hardware:
Teensy 3.1
WIZ820io & Micro SD Card Adaptor
WIZ820io

I am attempting to get this stack to communicate over Ethernet. The first sketch I was trying to run to confirm that everything works is the Ethernet library's WebServer example. (code found here: https://www.arduino.cc/en/Tutorial/WebServer)

I changed nothing in the example code and gave it a run, and here is my output in the serial monitor:

Code:
server is at 255.255.255.255

Okay, I thought, not getting an IP. Here's what I've done so far to debug:

-Confirmed that the Teensy was plugged into an active Ethernet port.
-Connected said active Ethernet port straight to my router as opposed to the switch it was connected to.
-Changed the example code's IP and MAC address several times.
-Tested the continuity of each pin from the WIZ820io module to the Adapter and finally to the Teensy with a multimeter.
-Made sure that the WIZ module and adapter module are connected in the proper orientation.
-Confirmed that no SD card was plugged into the adapter.
-Added these lines of code to the start of the WebServer's setup routine as suggested by the adapter's PJRC website page:
Code:
pinMode(4, INPUT_PULLUP);
  pinMode(10, INPUT_PULLUP);
  delay(1);  // allow time for both pins to reach 3.3V
-Ran an example sketch from the SD library to ensure that the SD portion works. (Successfully printed out a directory listing of an SD card I had lying around)

After all that, I'm led to believe that my WIZ820io module is not working properly.

When the Teensy is plugged in and running the WebServer sketch, the two lights on the Ethernet jack light up. The green one is solid and the orange flashes periodically. Connection and activity, I presume.

So, with the idea that the WIZ module is faulty, I decided to hook it up to an Uno I had lying around and use the same WebServer sketch to see if it would work there. No dice. Not even getting the two leds on the jack to light up.

I guess my question is - do you think that this module is indeed DOA, or have I missed something? I figured I would post here before I RMA the thing.

Thanks!
 
IP address 255.255.255.255 suggest the wiznet isn't getting a DHCP response from the LAN and your router's DHCP server.


Let's say your LAN is 192.168.1.x and your router is configured as such. And your router would customarily be 192.168.1.1.
Now look in your router's DHCP server configuration web page. It will say words like DHCP range 192.168.1.100 to 192.168.1.199. Or something like that.
That range (100 to 199) is the range of LAN addresses that the router will "hand out" after getting a request from a device on the LAN.
It's best to setup you Wiz820 with a non-DHCP-assigned address but rather, a "static" or pre-defined address. Using the example above, 192.168.1.10 should be uncommitted.

Tell your Wiznet (via library code calls) to use the above static address (192.168.1.10) and don't use DHCP.
This simplifies getting the thing going first time. And thereafter the Wiz's address won't change from dot 10.

If the LEDs on the ethernet cable RJ45 jacks on each end go off when the cable is unplugged, and on when plugged, you have a "link".
If not, then the Wiznet isn't getting power or its reset pin is stuck true, etc.
With a link, and the static IP address as above, no matter what the microprocessor is doing, your PC, at a command window, should be able to
ping 192.168.1.10
and get a response. This ping response comes from the Wiznet module's firmware; the Teensy isn't in the loop,
 
That's a good idea. Didn't occur to me to use IP addresses from outside the DHCP range, as I've had several standard Arduino Ethernet shields communicating via IPs in that range.

Anyhow, I'm afraid that upon connecting everything back up and trying your suggestion, I'm no longer getting the LEDs on the RJ45 jack to light up. Additionally, when I just run the vanilla WebServer sketch that previously yielded RJ45 jack lights and 255.255.255.255 output, now I get no lights and
Code:
server is at 0.0.0.0

I checked the pins on the WIZ and it's getting 3.3v like it should. I'm stumped.
 
If a SD card works, that means pins 11, 12, and 13 are connected properly.

The WIZ820 used those, and also pins 9 and 10. Pin 9 is absolutely required, so maybe double check that one?
 
Status
Not open for further replies.
Back
Top