Skip to content

Ethernet Shield presence detection #6

Closed
@agdl

Description

From @ibantxo on January 7, 2016 21:6

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

Copied from original issue: arduino/Arduino#4400

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions