Problem solved now, but would anyone care to offer an explanation why this happened?
A neighbour asked me to help connect her ipad2 to a tp-link wifi.
It was using wpa2 personal and randomly generated Pass phrase that contained two hyphens. She had successfully connected a MacBook, 2 iPhones, but iPad2 would not connect. My ipad1 would not connect. When I removed hyphens from the pass phrase, the iPads connected so we changed pass phrase on the other devices accordingly.
What's going on? These are all apple devices, I could maybe have understood pcs and androids experiencing different issues.