Internet connection hangs?
First of all,. it is quite fun playing around with this port of Python. I think some people did a hell of a job!
I tried several examples on a real device (the orginal NGage) and emulator and I found out that the weather stuff and my own internet access is not working properly anymore: after working for two times, it somehow does not get to the maps on the internet anymore. When I use the same url in the WAP browser it works fine, so there isn't a problem with the WAP gateway.
Has anyone experienced a similar problem?
Thanks, but still having problem...
Thanks for answering, but this solution does not work for me..
Let me give some more details:
First I thought by using an supported phone (6600) the problem would disappear... but:
GPRS works, for every address, but NOT within python! When I try to fetch the weathermap or another picture from my own webserver in the wap browser the image is shown, so my conclusion would be that there are no access restrictions concerning my GPRS account (Btw it is a TMobile Holland GPRS PrePaid account)
I found out by removing the try/except block in the weather_maps example that an IOError was raised by line 162 in socket.py. Looking into this code in the emulator oddly enough the source of the exception is gethostbyname...looks some weird is wrong in the e32python.pyd?
So, I thought, let try to grab an image from my own IP address, so the gethostbyname wouldn't get called. No error, it just hangs. When I cancel the GPRS connection/attachment I get the 'Connection timed-out' problem.
Conclusion: I just don't see the obvious solution or something is really wrong...
I went down the same path
I also removed the exception handling code and got the same sorts of errors you describe. I also spent some time watching the traffic using the "Conn. Mgr." app on the phone. Even when my apps were hanging they were generating traffic... so it definitely looked like a problem upstream.
I checked out the docs on my service providers web site ([url]www.vodafone.co.nz[/url]) and discovered that i was missing the generic internet connection settings. The key difference between that connection and the other two was the name of the access point (it also sets the 'Authentication' to secure where the other two connections have it set to 'Normal').