You might get some ideas from this thread.
It's a little clumsy, tho.
When you turn on a Windows laptop, and it doesn't find a recognized network, it immediately offers you a list of networks it does
see. That would be kind of nice ... and the various security options that may or may not be needed, also complicate things.
I'd like to see an elegant solution. The suggestion of wifi-radar in the linked thread may work for you on Ubuntu.