Ok I think I have finally solved this most frustrating of issues.
Basically a nearby router that my macbook can see is incorrectly configured with the wrong country code (or someone has imported a foreign router).
When the macbook wakes it looks for any wireless signal to understand what country it is in and then only listens on the wireless channels for the country detected.
I have about 10 wireless networks around me and one of them is set for Country "TW" - I am in Country Code "GB"
Most of the times the first network I see is the GB one and my laptop looks for my wireless network on the GB wireless channels and connects OK.
Sometimes, my laptop detects this rogue TW router first and only listens on wireless channels that are correct for TW - it hence can't see my wireless network as it is configured on channel 48 which is not part of the TW approved set of channels:
Here is a snippet from my syslog:
Nov 9 18:18:11 GarysMacBook kernel[0] <Debug>: en0: 802.11d country code set to 'TW'.
Nov 9 18:18:11 GarysMacBook kernel[0] <Debug>: en0: Supported channels 1 2 3 4 5 6 7 8 9 10 11 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
Hence, the options are find the neighbour with the rogue router and get it fixed/binned, or choose a channel that can be seen by both the rogue router country and your own country.
The GB channels are:
Nov 4 14:01:23 GarysMacBook kernel[0] <Debug>: en0: 802.11d country code set to 'GB'.
Nov 4 14:01:23 GarysMacBook kernel[0] <Debug>: en0: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Unfortunately for me, my Netgear WNDR3700v2 (N600) router only allows me to chose channels 36, 40, 44 or 48 - None of which are visible if my laptop detects the country as TW !!!!
I need to find the neighbour with the rogue router, I guess...
Oh well, at least I know what causes the problem...
BTW - I could do with the forum thankyou points, so please be generous...
Rgds
Gary