Skip to content

Ethernet Shield presence detection #4400

@ibantxo

Description

@ibantxo

Hi,

I want that my code works in 3 cases:

  1. Without ethernet shield connected to Arduino.
  2. With ethernet shield, but unpluged cable
  3. With ethernet shield with a working network

The third scenario works well. But the first one "hangs" in this code line (waiting forever...):
ethClient.connect(server, port);

Is there any way to detect presence of ethernet shield or to insert a timeout in connection attempt?

Many thanks

Iban

Metadata

Metadata

Assignees

No one assigned

    Labels

    Library: EthernetThe Ethernet Arduino libraryfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions