On 03/14/10 21:03, Samsyn wrote: > I wonder if this could be a Verizon thing. What strikes me as odd is > that the UrlConnection works fine, and that must also be using tcp, so > is fundamentally the same as my subsequent Socket connection, which > fails. > > The differences are: > > * different server.. .MAYBE my server doesn't like the 3gs 'ip' > address of the client... > * server port 80.. MAYBE android or verizon is making a special > exemption for what looks like a web request, while applying extra > 'security' for the more generic tcp connection > * maybe I need to do something to enable the socket-over-3gs (bind to > a nic?) That UrlCconnection is smartly doing, but I am dumbly not. > > > > On Mar 12, 11:42 pm, Samsyn <[email protected]> wrote: > >> I'm sorry for what must be a really dumb question... my app is a >> client, the server is a linux box in a colo. I use android Sockets to >> connect to the server. It works great. >> >> that is, it works great when the phone is on wifi. >> >> But when the phone is on 3G, the socket connection times out. >> >> --- >> >> The ONLY permission my app is asking for is 'INTERNET' (which is >> apparently enough for it to work on wifi). >> >> What am I missing? >> >> My app also uses a URLConnection to discover the server address (by >> asking a second server, whose address is well known). That works both >> in wifi and 3G, but is a port 80 http request, so probably is >> considered pretty inoffensive. Still, it makes me feel like this is >> not some subtle radio startup issue. >> >> --- >> >> It smells like a permission issue, but reading through the >> permissions, I don't see any that scream out 'enable sockets on 3G' >> >> Note, the phone is always a client. this is not about incoming >> connections. This is an outbound TCP connection from the phone to a >> remote server (which is not a phone). >> >> It also works in the emulator, even when you tell the emulator to >> disable wifi, but I'm not sure that proves anything. >> >> Is there another permission I am missing? >> >> - Dan >> > I would suspect that there is no route from the phone to your remote server. This could be Verizon shenanigans, but I don't think so because other non-port-80 apps seem to connect happily to various hosts. This suggests a problem on your server (specifically Internet-to-server) side. Try running the app on an emulator through a different ISP from one the one hosting your server: does that work?
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

