Notifications
Clear all

Need help with finding mac-adress of a Pico W using arduino IDE

64 Posts
5 Users
9 Likes
6,094 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6939
 
Posted by: @frits1956

@frogandtoad

My problem is completely solved with your directions and I'm glad you wrote the linux solution also.

The new question, that has now become visible, is why your method gives a correct mac address and @Zander's normally working method does not. Rob and I are curious about that. Is there a library cause or is there something else because it seems to occur only with picoW .....

I failed to notice the print code for the MAC was backwards, have a look at the MAC I gave you but reverse it, should be the same as what you got via the ping/arp method.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6939
 

@frogandtoad Sorry, I assumed that you did it without any sketch loaded since if you did, why bother with the arp when you could just get the mac in the sketch. I suspect your answer will be similar to you already had a piece of server code that displayed the IP available and it was quicker to follow that with the arp than to write the get mac decode mac code.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@frits1956)
Member
Joined: 3 years ago
Posts: 29
Topic starter  

@zander Yes you did. I have adjusted the void.

@zander @frogandtoad Gentlemen I learned a lot. THANKS!!!

void printMacAddress(byte mac[])
{  for (int i = 0; i <= 5; i++)
     { if (i > 0) 
           Serial.print(":");
        if (mac[i] < 16)
            Serial.print("0");
        Serial.print(mac[i], HEX); 
     } 
     Serial.println();
 }

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @zander

@frogandtoad Sorry, I assumed that you did it without any sketch loaded since if you did, why bother with the arp when you could just get the mac in the sketch. I suspect your answer will be similar to you already had a piece of server code that displayed the IP available and it was quicker to follow that with the arp than to write the get mac decode mac code.

🙂

You suspect correctly!
Why load a sketch to get the MAC details already available if you know the IP address?

That was the whole point of my initial response.

Cheers


   
Ron reacted
ReplyQuote
Page 5 / 5