Notifications
Clear all

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

64 Posts
5 Users
9 Likes
6,052 Views
(@frits1956)
Member
Joined: 3 years ago
Posts: 29
Topic starter  

For those who do not know how to ping

https://www.minitool.com/news/how-to-ping-an-ip-address.html

Upload the program Bill is showing at 23:50

Β 

Ping the found WiFi.localIP, remove the usb cable, ping the found WiFi.localIP again and you should now get a fault. If so, you now know the WiFi.localIP is the right one.

Connect the usb cable, upload the program and ping again

at the command promt type arp -a and voila, the mac address apears...... (see FrogAndToad at the previous page)


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

@frits1956

Posted by: @frits1956

Ron, Frog, thanks for all the help.

It worked....., 😀Β 
It took a while but with the directions from Frog I found the right MAC address.
Thanks again

You're most welcome, I'm glad I was able to help πŸ™‚

Good luck with your project.

Cheers


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

@frits1956 I am glad to hear you got it to work, but a little concerned that the earlier post that specifically gets a MAC address didn't workΒ 

https://forum.dronebotworkshop.com/postid/32719/

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 the program does provide a mac address but possibly from the router? the address is very different from te address that functions.


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

@frits1956 That should have worked, I will test on a few of my picos, if the code is right then all the picos will report different mac's.

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  

I have 2 pieces. Now I have tested the 2nd and what strikes me is that only the first hex differs.

When you use the methode describeb bij Frog, Is then the mac the same?


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

@frits1956 The router MAC is the last line before Sleeping, it's SSID is RonsWiFi, the PICO MAC is the very top line. I only have one PICOW so can't do the test I planned but the sketch results are correct. I will try the test again then also do the ping/arp method to verify. I probably will not have time until later tonight, but it will get done.

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: 6907
 

@frits1956 I finally was able to do the other test and see that the MAC is different. I am not sure what MAC the WiFi call is returning, I know it's not my router as it is displayed later on. Anyway, you are solved, I will figure out what I am seeing most likely with the expert help of mr @frogandtoad

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
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @zander

@frits1956 I finally was able to do the other test and see that the MAC is different. I am not sure what MAC the WiFi call is returning, I know it's not my router as it is displayed later on. Anyway, you are solved, I will figure out what I am seeing most likely with the expert help of mr @frogandtoad

I really don't understand what the issue is here?

DNS names map to an IP address, and an internal IP addresses maps to local MAC addresses.

arp -a will show all IP addresses mapped to their MAC addresses currently stored in cache... if they are not found in the cache, then you have to ping the IP address first, which will add the IP/MAC address combination into the cache - "arp" is available in Windows/MAC/Linux.

Likewise, you can use for Windows: C:\>ipconfig /all

...to obtain IP and MAC address information, and for Linux:

user@Linux:~$ ip address

If you want to narrow down the MAC address to a specific IP address, then you can just run:

arp -a <THE_IP_ADDRESS_YOU_SEEK_INFO_FOR>

Cheers


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

@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 .....


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

@frits1956

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 .....

The method I suggested will always provide the exact result, because if arp failed, then TCP/IP protocol fails, and that is impossible πŸ˜‰Β  In my last post, I offered both ways to determine what IP's vs MAC addresses are being seen and by whom, and where and how they are stored.

Using that information, you all should be able to determine for yourselves which IP actually belongs to which MAC address.

MAC addresses and IP addresses are not ghosts, and they are unique (at least locally), so you should be able to determine for yourselves what belongs to which... since I am not privy to your full results, I cannot determine what either of you are seeing.

Cheers


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

@frits1956 The piece of code I was using for some reason printed the MAC in reverse order. I entered the corrected MAC into the online MAC decoder and it did identify it as belonging to Raspberry Pi Trading Ltd.

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: 6907
 

@frogandtoad Understood re arp, but I think I missed a step somewhere, where did you get the ip to ping?

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
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @zander

@frogandtoad Understood re arp, but I think I missed a step somewhere, where did you get the ip to ping?

You should know the IP... that you got from the server sketch?

Cheers


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

@zander Use the program off bill to connect to a network. thats all.

See the first post on this page (4) en start atΒ  23:50


   
frogandtoad reacted
ReplyQuote
Page 4 / 5