Connecting to WiFi with restricted MAC List

I need to make a WiFi connection to a WPA2 protected router which also has a restricted MAC list.

The MAC address for any wireless device has to be connected is hardcoded into a list in the router.

The WPA2 connection example page shows an example with SSID and Password only.

How would one formulate a connection string to include the mac address?

FWIW I am using a Wee Serial wifi module, but If someone gave me a generic example, I could hopefully figure it out from there.

The mac address is a property of the hardware. You do not have to supply the mac address to the adapter when you tell it to connect to a network; it already has a mac address and knows to use it.

In order to connect to any network, the network adapter must have a MAC address (and it must be unique within the network). Often these addresses are set at manufacture and cannot be changed (part of why it's used as access control :stuck_out_tongue: ), and are written on a label on the device. It is a 6 byte long number, expressed in hexadecimal, usually with a - or : between each byte, ex: AB:04:23:E3:23:40.

Some devices may allow you to set the MAC address, and almost all have some way to read it out - consult the documentation for the wifi module

If you can't find the MAC address on the label and the docs aren't any help, you can always take a network that doesn't have MAC restricted access, log into the router's management pages, and look at the list of connected devices, where it will list the MAC address, and then connect with that wifi module, and refresh the list of connected devices; the new entry corresponds to the wifi module, and that's the mac address you have to allow.

DrAzzy:
If you can't find the MAC address on the label and the docs aren't any help, you can always take a network that doesn't have MAC restricted access, log into the router's management pages, and look at the list of connected devices, where it will list the MAC address, and then connect with that wifi module, and refresh the list of connected devices; the new entry corresponds to the wifi module, and that's the mac address you have to allow.

Good idea - I temporarily disabled the allow list, and was able to find the mac number.

So far I am not able to connect.
The following string is a list of special characters forming part of the password - alphanumeric characters have been omitted.

#define PASSWORD    "+~%@]?\$,{=&<#";

Do any of the above special characters need to be escaped?