By Lubomir Petrik on Mar 04, 2009
Couple days ago I setup my new wireless router (hidden and secured by WPA2). The problem I had was that OpenSolaris 2008.11 was not able to join it. It offers to specify a network using the NWAM GUI, but strangely not the password. However there is a way, let's use dladm command.
First you need to setup a password and then you may join the network using this password.
# pfexec dladm create-secobj -c wpa private_key1 # pfexec dladm connect-wifi -k private_key1 -e private_wifi iwk0
Where private_key1 is the key object (you'll be interactively asked to provide the password), private_wifi is the name of my router (ESSID), iwk0 is my wireless interface (like bge0 for ethernet). Note that the driver (iwk in my case) must support WPA2 otherwise this will not work.
Once the connect_wifi command is started the NWAM kicks in and network is configured and can be used later automatically, without typing the above commands ever again.
Worth mentioning are also show-wifi, disconnect-wifi and delete-secobj sub-commands of the dladm. For a complete reference type man dladm.