I upgraded to Windows 10 last year. I was running my TalkTalk router successfully both wirelessly and hardwired. Occasionally I would go off-line for no reason. Leave it a few hours I was back. I complained and was given a new router. Plugged it in and it was seen by my phone and my brother-in-law's phone. Works perfectly with ethernet cable but not wifi. After much messing about a can see a list of the networks available to me. Mine is there. I try to connect and am told "unable to connect".
It seems as if the wifi is working but there is no communication with the router. Tried using wifi analyzer and can see the router working. Using command prompt the computer lists the networks it can see. Mine's there.

Why does my wifi connection not work?

Thanks for any help