Skip to content

Ethernet - apply MAC address in begin(mac) #748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ethernet - apply MAC address in begin(mac)
tested with "ENC28J60 Mbed EMAC" and "Nano 33 BLE"
  • Loading branch information
JAndrassy committed Oct 31, 2023
commit 21b7bf3ccf0ca0b04895b0355a06f2a3ffb833d3
4 changes: 4 additions & 0 deletions libraries/Ethernet/src/Ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ int arduino::EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned
if (eth_if == nullptr) return 0;
}

if (mac != nullptr) {
eth_if->get_emac().set_hwaddr(mac);
}

unsigned long start = millis();
eth_if->set_blocking(false);
eth_if->connect();
Expand Down