I am guessing when you connect via you local wifi you can't browse the internet from the phone. Your local wifi should setup the phone using DHCP to tell it what DNS servers, default gateway and ip address to use. If your local wifi isnt doing this then it is possible your local wifi is not correctlly configured. Does a laptop connect correctly to the internet via your wifi? rgds