| Reply | « Previous Thread | Next Thread » |
|
Hello,
I just got a new phone (E66). I tried to create a TCP/IP socket in python between the phone and my pc. I am using the TCP/IP examples here: http://www.mobilenin.com/pys60/info_networking.htm I have set the host and port variables correctly. First I start the server on the pc and then the client on the phone. The phone asks for an access point and after that nothing happens. I've tried WLAN and my operators connection and neither work. The script just hangs at "s.connect((HOST,PORT))". I see the connection icons but the socket just wont connect. I'm running the script file from the script shell with the most recent python version installed. Has anyone got any idea about how to get this working? EDIT: Actually after a long while I get a "Connection timed out" error. This still doesn't help solving the problem though. EDIT2: I determined the IP address of my pc from "whatismyip.com" is that the correct way to do it when the pc is connected to the net via wlan? Nokia E66 PyS60 1.4.4 final
Last edited by RICH? : 2008-08-13 at 16:05.
|
|
Hello Rich, as you saw on my other post, I have the same problem.
Have you tried to connect with Opera or other Browser like from your phone to that port on PC ? I've tried with Opera and the connection is ok, but only with python the connection hangs, it's a very strange problem. |
| tarantulae |
| View Public Profile |
| Find all posts by tarantulae |
|
Quote:
If you're using Windows, there's a command ipconfig which reports the IP address your PC is currently using. It is probably 192.168.1.10 or some such, depending on the brand of your router/firewall. Similarly Linux, OS X and other Unix-like environments have the ifconfig command. (You may need to specify the full path explicitly, for example /sbin/ifconfig, if running ifconfig from a regular user account.) You cannot originate connections from outside the firewall, unless you have instructed the router/firewall to pass a range of ports in to a specific IP address inside the firewall (port forwarding). So, in summary: If you're trying to connect using your phone operator, you'll need to enable port forwarding and use the external IP for connect(). If you're inside your private network through WLAN, you don't need port forwarding but need to specify the private IP address of your PC for connect(). |
|
Jethro, I'm sure that the IP is correct and is ok for external connections, is my real IP and the port is listening for connections, with Opera (using the same connection of python) I can connect, but with python, I get the same problem of Rich, I think that this is a python issue.
|
| tarantulae |
| View Public Profile |
| Find all posts by tarantulae |
|
Are you using a SIS-packaged application on a 3rd Edition device? Have you enabled the NetworkServices capability with Ensymble?
|
|
No man, I'm using a simple .py script running in PythonShell with all capabilities enabled.
|
| tarantulae |
| View Public Profile |
| Find all posts by tarantulae |
|
Thanks for the info jethro.fn
I'll check what I can try to do about it .To be continued... Nokia E66 PyS60 1.4.4 final |
|
Ok,the problem is definitely the way my wlan works, I'll see how to change the settings later.
I connected my phone to my laptop by bluetooth so that I could use the net on the pc. Then I ran the server on the laptop and the client on on the phone. They connected fine. I realize that the phone's internet connection is used for both server and client but it does the job.To be continued... Nokia E66 PyS60 1.4.4 final |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Browser monitoring | NevePankaj | General Symbian C++ | 19 | 2008-08-12 11:06 |
| Error with makesis.exe and creating the .pkg file | gramya87 | Symbian Tools & SDKs | 7 | 2007-10-10 14:53 |
| Carbide.vs 2.01 Registration Problem | baykal | Symbian Tools & SDKs | 5 | 2006-12-22 17:55 |
| problem with Code Warrior 5.2 | mayankkedia | General Symbian C++ | 4 | 2006-06-22 09:26 |
| Socket Connect never returns error | delipsingh | Symbian Networking & Messaging | 0 | 2005-05-14 03:08 |