With iwlist you can only scan for networks when your AP is in client mode.
iwlist eth1 scanning
iwlist eth1 scan
wl ap 0 ; wl scan ; sleep 1 ; wl scanresults
To join a non-encrypted access point run these commands:
ifdown wan
nvram set wl0_ssid=
nvram set wl0_channel=
ifup wan; /sbin/wifi
When you set an interface to DHCP, OpenWrt runs the DHCP client on that
interface automatically at boot time. If you want to re-run the dhcp client,
for example because you joined another network, you can either reboot, or
you can run the ifup command:
ifup wan; /sbin/wifi
When using the bridged client mode, you should disable the DNS/DHCP server:
If the "chmod" command fails and reports a read-only file system you will
have to remove it instead (you can always put it back since it's just a
symlink to the real script):
chmod -x /etc/init.d/S50dnsmasq
OR
rm /etc/init.d/S50dnsmasq
The first step would be changing the Wrt's behavior from AP to client mode.
nvram set wl0_mode=wet # bridged client
OR
nvram set wl0_mode=sta # routed client
--------------------------------------------------------------------------------