SSIDs are required to contain printable ASCII only. Otherwise, they must be specified in hex.
Let's document this explicitly. diff c20bd74017ceeadb2db0f78a352ed1f1e2b77c2b /usr/src blob - 3fb0780ba7cf1333894f5c3485a95e71885fbd6d file + sbin/ifconfig/ifconfig.8 --- sbin/ifconfig/ifconfig.8 +++ sbin/ifconfig/ifconfig.8 @@ -972,8 +972,9 @@ list if they are found during a scan. .Pp The .Ar id -can either be any text string up to 32 characters in length, -or a series of hexadecimal digits up to 64 digits. +can either be a printable ASCII string up to 32 characters in length, +or a series of hexadecimal digits up to 64 digits preceded by +.Dq 0x . If .Ar id is the empty string @@ -1077,6 +1078,12 @@ Remove specified flag. .It Cm nwid Ar id Connect to the network with NWID/ESSID .Ar id . +The +.Ar id +can either be a printable ASCII string up to 32 characters in length, +or a series of hexadecimal digits up to 64 digits preceded by +.Dq 0x . +.Pp Unlike .Cm join , the