my router needs a mac address for a wireless connection.
I write my programs in the arduino IDE but unfortunately I can't find any good code for getting that address anywhere.
Does anyone have a suggestion how to solve this problem?
Sorry for my bad english, it's not my native
my router needs a mac address for a wireless connection.
I write my programs in the arduino IDE but unfortunately I can't find any good code for getting that address anywhere.
Does anyone have a suggestion how to solve this problem?Sorry for my bad english, it's not my native
Google should find code easily, also is there not a sample sketch? ScanNetworks has it.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Ron, THANKS!!!!
I was for more then 3 days looking on internet for a file like this. I even asked on several forums but the answeres are mostly with python. Your answere did it. Many many thanks
Unfortunately, it turned out not to be the solution I thought.
This file gives the mac addresses of the access points and not of the Pico W.
Does anyone have a code to find out the mac address of the Pico W?
Thanks in advance
My PicoW is still on it's way to me, so it may be a short while before I can try to find its MAC address.
Maybe someone else can provide the solution for you in the mean time.
SteveG
@frits1956 Try ScanNetworksAdvanced, I think line 36 is where it prints your MAC.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@frits1956 The specific API is WiFi.macAddress(mac); That is how you retrieve the MAC address of the WiFi radio on the board. See the scan advanced for details.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@zander first of all thanks for your help.
I have compiled the ino file and the result is the message "WiFi 101 Shield not present"
I understand from this message the file is intended for an arduino with a shield, but I would like to know the address of my RPi Pico W.
It could also be that I have the wrong ino file.
https://github.com/arduino-libraries/WiFi101/blob/master/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino
This file has on line 36 " // print your MAC address:"
Unfortunately, it turned out not to be the solution I thought.
This file gives the mac addresses of the access points and not of the Pico W.
Does anyone have a code to find out the mac address of the Pico W?Thanks in advance
Just a thought... if you know the IP address, all you have to do is ping the device, and then check the arp (address resolution protocol), cache from your command prompt.
Running "arp -a" will display the arp table with all the IP to MAC address mappings, which is available on Windows, Mac and Linux.
This can be a lot quicker than compiling and uploading scripts.
Cheers
@frits1956 FORGET github and undo any 'stuff' you have done.
1. Have you installed the Pico and Pico W boards into preferences?
2. Do you understand about selecting your board using the board manager? Your errors look like you have the wrong board selected. See picture at end. Once you select the board then the built in examples will be populated with the sketches that work with that board ONLY. You just select the example from the file menu.
3. Now select the sample sketch as shown in the attached picture. That is from WiFi101.
4. I did the verify and you can see it worked and the code is also showig that will print your MAC. That is in the 3rd picture.
I don't have a PICOW with hdrs soldered on yet and I am too busy for the rest of the day so I can't help any more.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@frogandtoad Thanks for your idea. I'm going to look into how I can do that
Unfortunately, it turned out not to be the solution I thought.
This file gives the mac addresses of the access points and not of the Pico W.
Does anyone have a code to find out the mac address of the Pico W?Thanks in advance
Just a thought... if you know the IP address, all you have to do is ping the device, and then check the arp (address resolution protocol), cache from your command prompt.
Running "arp -a" will display the arp table with all the IP to MAC address mappings, which is available on Windows, Mac and Linux.
This can be a lot quicker than compiling and uploading scripts.
Cheers
Of course now he will want to know how to find out his IP.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Yes, I have already several programs that work fine on the pico and pico W. Also a self written program on the W that has a connection to a WiFi network. That's not the problem. I only miss the mac address of the pico W for a special application
By the way, it is not a error. Compile and upload works fine and line 29 (// check for the presence of the shield:) give the result "WiFi 101 Shield not present" on the monitor
Unfortunately, it turned out not to be the solution I thought.
This file gives the mac addresses of the access points and not of the Pico W.
Does anyone have a code to find out the mac address of the Pico W?Thanks in advance
Just a thought... if you know the IP address, all you have to do is ping the device, and then check the arp (address resolution protocol), cache from your command prompt.
Running "arp -a" will display the arp table with all the IP to MAC address mappings, which is available on Windows, Mac and Linux.
This can be a lot quicker than compiling and uploading scripts.
Cheers
Of course now he will want to know how to find out his IP.
😀
@frits1956 If you have a wifi pgm, then just add the call to print the mac, the code is where I told you and showed you, Good luck.
In case you forgot, HERE IS THE ANSWER
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting