For opportunistic connection to open wireless networks we plan to use waproamd.
We will need a scheme to detect whether an open access point also provides an open connection to the internet. It can be a kind of authentication scheme using a script on our server and a shared secret.
Using two wifi cards we could be scanning on one and use the other one for connection. We'll try to get by with one by sticking our wifi logger into the waproamd connection scripts. We're mostly interested in finding good open ones anyway.
Links: