Solution 1:

Apple does not provide an API for forcing the band selection.

If you're seeing a bug or suboptimal behavior out of the band selection algorithm, it might be interesting to see the output from the "Wi-Fi" section of a full System Profiler report, because that'll show your current connection as well as the signal strength and other parameters of the other APs around you.

Well, on second thought, I suppose that only scratches the surface, because that wouldn't show how busy those other channels are, and it wouldn't show the effects of non-Wi-Fi interferers.

Solution 2:

Did you try to manually set the wifi channel number? If you want just to change from one frequency band to another then you can try the partial solution which I provide below. This worked for me (OSX Mavericks). Basically, if the frequency bands have different channel numbers then setting the channel number of the desired frequency will enable it. You can change the channel number using the airport, but first check if 2.4 and 5 GHz have different channel numbers:

  1. Open Wireless Diagnostics.app (it is located in /System/Library/CoreServices/Applications).
  2. In the application menu select Window->Utilities (or press cmd+2).Utilities window should appear.
  3. Select WiFi Scan from Utilities window and press Scan Now button. This will show you all available networks, info about them and your active connection.
  4. Now, verify that BSSIDs of 2.4 and 5 Ghz with the same network name are on different channel numbers. If so, then most likely you can change the band by setting the channel number of the desired frequency band.
  5. For this, open the Terminal.app and type: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --channel=num where num is the channel number to set. This command will only work under administrator account (so make sure that you are log as an Administrator i.e. su YourAdministratorAccount)
  6. You can check your active connection by re-scanning with Wireless Diagnostics or Alt+Click on the WiFi icon on OSX the menu bar.

That's it! P.S. If you can not set the channel try to turn off the wifi device before using the airport command. As suggested by 8bittree, the instructions were included here from this post.