Airport becomes Wi-Fi in Lion

If you run networksetup and do a -listallhardwareports in OS X Snow Leopard, you’ll see that the Hardware Port: for en0 (on an MBA at least, but you should get the point even if it’s a MacPro) is AirPort. If you run the same command in Lion, you’ll notice the the hardware port is now Wi-Fi.

This change cascades to any commands like -listpreferredwirelessnetworks where the hardware port might get called on. For most of my scripts for assigning AirPort networks, etc I was able to mostly just find-and-replace AirPort for Wi-Fi, provided I didn’t use AirPort anywhere else (e.g.$AirPort, etc).

Similar Articles:

4 Comments

  • Will P
    July 20, 2011 - 1:03 pm | Permalink

    Wi-Fi currently does not work as a hardware port, networksetup is broken.

    It will only take en1 (or en0 for airs) as a valid wireless nic.

    I have a bug report in for that and preferred at index not working.

    • July 21, 2011 - 8:40 pm | Permalink

      That explains some issues I was having with a script. I filed an additional report to hopefully get it some more attention…

  • Søren Theilgaard
    October 18, 2011 - 2:38 am | Permalink

    We can detect the device with this line:
    /usr/sbin/networksetup -listallhardwareports | grep -A 1 Wi-Fi | grep Device | cut -c 9-12

  • Comments are closed.