Setup STA mode first:

/index.php/network-and-yun/28-sta-for-managed-client-mode

Switch to first BSSID:

#!/bin/ash
uci set wireless.@wifi-iface[0].bssid=14:CF:E2:A2:XX:XX
uci commit 
wifi down; wifi up
/etc/init.d/network  restart

Switch to second BSSID:

#!/bin/ash
uci set wireless.@wifi-iface[0].bssid=48:5B:39:E7:XX:XX
uci commit 
wifi down; wifi up
/etc/init.d/network  restart