i finally found where the problem is with ” unable to join network ” error message , after months of research and trying every single trick on the net not working , the problem is with channel overlapping from the router . i have downloaded ” inSSider ” network analyzer and found that my home network is overlapping with four other networks , though when i try to connect from another place where there is no channel overlapping it connects just fine . most routers use 2.5 Mhz frequency , so you get a lot of overlapping there , but if you try to connect from a 5 Mhz router , its fine . so you could download the inSSider app for pc and check for the channel where there is no channel overlapping and use this channel . This is a hardware issue anyway , if the wifi circuit and wifi antenna are ok in your phone then you should not have any problem connecting , but if either of them are faulty , you will get that error . so you either fix it or taking it to apple to replace it . and it is possible that when you go to apple store you would not see the problem , thats what happened to me , that is because they probably have a 5 Mhz router and that would rarely interfere with other networks .