Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a small project with my Tp-Link MR3040 using barrier breaker.

I am using the command iw wlan0 connect any which will connect to any open WiFi network.

Where I currently live, Time Warner Cable has its open WiFi across town and I don't want my device connecting since it does not provide internet (sites I go to are forbidden 403) is there a way to "blacklist" that ssid?

share|improve this question

You can scan, and choose which one to connect to by yourself Get scan results with signal strength and mac using

iw dev wlan0 scan

Parse it in a script and select which one to join manually. iw scan results would contain "RSN:" or "WPA:" or "WEP:" if they are not open. So you can wee out encrypted networks, and select one which is open, maybe with best signal strength "signal: -45.00 dBm".

Since its openwrt you can do it in a Lua script maybe.

buf = output from iw scan
buf = '\n'..buf..'\nBSS'     -- .. is concatenate in lua

Use this regex to match a single block (in Lua or anything else):

"[^A-Za-z%d]BSS"  -- %d is all digits in lua, maybe 0-9 otherwise

Within each block grep SSID, signal, and check if "[^A-Za-z%d]+RSN:", "[^A-Za-z%d]+WPA:", "[^A-Za-z%d]+WEP:" have any match, ignore the blocks which do, and ignore the ones with the SSID in your blacklist.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .