IND.I/O D21G + ethernet mod. cannot get an IP address or create a connection

I want to create an network connection through the ethernet module of the IND.I/O. DHCP does not assigns dynamic IP, I can manualy set the IP adres but not create a connection, .

The sketch I first used is the TelnetClient example adapted for the IND.IO. I have an echo service on my machine who listens but the Arduino does not connect. The client.connect returns 0 thus unable to connect to the server.

The second sketch is the WebServer example and my browser could not connect to it.

Environment:

  • Industruino is connected to a external power supply
  • Green lights on the ethernet interface is blinking, red one is enabled
  • Tried different ethernet cables and switch ports
  • I changed the SPI speed to 4MHz (in 8MHz it coudn't set IP at 4MHz it can)
  • Firewall on my Windows is disabled
  • I use a static IP, with DHCP "Ethernet.begin(mac)" returns 0
  • Pinging the Arduino results in a time-out
  • Fram can be read and write (to test if the complete module was defective)
  • Changed all Serial to SerialUSB in the examples
  • I have not connected extra hardware besides the network module
  • My router registeres devices with a static IP, the Industruino is not listed
  • I use the Ethernet2 library
  • Connect from another machine to the echo service works

Source code for the TelnetClient: https://pastebin.com/0MguAvj0

Output of the code:

start ethernet...
IP:
192.168.250.176
connecting...
0
connection failed

disconnecting.

 

Do I have to add or change something in my code? Or is the module simply defective?

Lambert
Lambert
7
| 2 1 1
Asked on 3/20/18, 5:17 PM
0
vote
2210 Views

Hi, would you mind trying with the standard WebClient example (changing to your IP, and SerialUSB), and make sure you have no older versions of Ethernet2 on your system (SPI 4MHz issue).

Tom
on 3/20/18, 11:37 PM

Thanks Tom,

The default WebClient example with SerialUSB change is working .

The wierd thing is that I started with this example and it wasn't working. The SPI frequency was on 8MHz. Yet the router has registered the MAC and IP. I changed the MAC, IP and the SPI freq. and restarted the router. The entry was gone but still not working. Through the day I changed alot of things and used defferent examples without succes.

Now, 24 hours later the WebClient and WebServer (based on yesterday's changes which didn't work) example works. I used the MAC from the WebClient example and DHCP.

My conclusion is that the first registered MAC and maybe IP was persistent for the router and/or the switch(es). Changing that blocked communication. Now 24 hours later the tables holding the MAC address is cleared and I get a fresh start.

Versiosn of software I used:
Arduino v1.8.5
Ethernet2 by Various v1.0.4
SPI v1.0.0

Lambert
Lambert
7
| 2 1 1
Answered on 3/21/18, 7:53 AM
0
vote

glad to hear it works now, thanks for letting us know

Tom
on 3/21/18, 8:08 AM

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

43 follower(s)

Stats

Asked: 3/20/18, 5:17 PM
Seen: 2210 times
Last updated: 3/21/18, 7:55 AM