(Assuming Linux system)
Once you have the MAC address of the AP, e.g. via iwconfig:
$ iwconfig eth1
eth1 IEEE 802.11g ESSID:"OSU_PUB"
Mode:Managed Frequency:2.427 GHz Access Point: 00:0D:9D:C6:38:2D
Bit Rate=48 Mb/s Tx-Power=20 dBm Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=91/100 Signal level=-39 dBm Noise level=-87 dBm
Rx invalid nwid:0 Rx invalid crypt:860 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:39 Missed beacon:8
The AP has hw addr 00:0D:9D:C6:38:2D
so you can use tcpdump to sniff for traffic from that hardware address, which usually will reveal the IP address of it as the source sooner or later:
$ tcpdump -i eth1 -s 0 -v -n ether host 00:0D:9D:C6:38:2D
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
13:15:49.106475 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 (00:0D:9D:C6:38:2D) tell 192.168.1.2, length 28
If the AP responds to broadcast pings you could probably send a broadcast ping to its specific MAC address to elicit a reply, but there doesn't seem to be a tool capable of doing that.
Did you manage to solve this?
In case it's helpful, I've found a partial solution.
The utility WirelessMon - http://www.passmark.com/products/wirelessmonitor.htm
It allows you to override Windows wifi selection, and explicitly connect to an AP by MAC address.
I had the highly frustrating problem of needing to use a public hotspot network with a portal website, and every time my wifi roaming jumped AP, every ~5 minutes or so owing to two of them being very similar signal strength, I'd have to re-enter my login details.
The downsides of using WirelessMon are, it's only a 30-day trial, and it also tends to screw up the connection itself by constantly scanning in the background. The best solution I've found is to set its sampling rate to the maximum of 60 seconds, which helps enormously compared to the default of 3.
If anyone knows of a free app that does a similar job, please post about it!
Best Answer
In a command prompt (you can launch one by using Win+R and type "cmd") type:
and press enter.