sstaub / Ethernet3

Ethernet library for Arduino and Ethernetshield2 / WIZ550io / WIZ850io / USR-ES1 with Wiznet W5500 chip
Other
82 stars 33 forks source link

Wiz550io Help! #55

Closed EdBeardon closed 1 year ago

EdBeardon commented 1 year ago

Hi, I'm trying to run a basic piece of code to pick up the MAC address stored on my Wiz550io. I've had a look at the help files but can't find an example to start with. I've got this working on the Ethernet2 library but I need it working on Ethernet3. The code pick up the IP address fine but MAC is shown as 00:00:00:00:00:00. See code below:

`#include

include

define WIZ550io_WITH_MACADDRESS

int8_t isConnected = 0; uint8_t mac[6]; // array for mac address void macAddress(uint8_t mac[]); // get the MAC Address const char* macAddressReport();

IPAddress ip(192, 168, 0, 50);

void setup() {

Serial.begin(9600); Ethernet.begin(mac, ip);; Serial.println("Write something here");

}

void loop() {

Serial.println(ip);

delay(1000); }`

sstaub commented 1 year ago
EdBeardon commented 1 year ago

Hi, thank you. Can you confirm the following should now work?

`#include

define WIZ550io_WITH_MACADDRESS

int8_t isConnected = 0; uint8_t mac[6]; // array for mac address

IPAddress ip(192, 168, 0, 50);

void setup() {

macAddress(uint8_t mac[]); // get the MAC Address Serial.begin(9600); Ethernet.begin(ip); Serial.println("Write something here");

}

void loop() {

Serial.println(ip); Serial.println(macAddressReport()); delay(1000); }`

sstaub commented 1 year ago

It should work, maybe macAddress will work after Ethernet.begin(ip)

EdBeardon commented 1 year ago

Hi again, see below:

image
sstaub commented 1 year ago

Use macAddress(mac[]); // get the MAC Address This are basics of c programming

EdBeardon commented 1 year ago

Thanks for your help so far, unfortunately its still not compiling. I was hoping I could find an example to base my code from. Thanks again!

image
sstaub commented 1 year ago

Sorry try macAddress(mac); // get the MAC Address

sstaub commented 1 year ago

Sorry, I don't understand what you do. Please learn the basics of C before doing wrong things.

sstaub commented 1 year ago

The short answer NO