Skip to main content

Posts

Showing posts with the label PDA

Communicating between a Windows laptop and the Windows Mobile PDA using sockets

Introduction Having successfully installed Python on my Windows Mobile PDA I wanted to investigate if I could communicate between my Windows XP machine and my PDA using sockets. I used Cygwin to act as a Linux emulator, although there are Windows-based Python solutions, such as Enthought's Pylab . Step One: Communication between processes on the same machine As a first step, try communication between processes on a single machine. I used the command ipconfig in a Windows command prompt to determine that my IP address is 192.168.1.64. To create the server, I used the following Python code, which is largely from http://www.devshed.com/c/a/Python/Sockets-in-Python/1/ . Create a file called server.py with the following contents: #! /usr/bin/env python import socket mySocket = socket.socket (socket.AF_INET, socket.SOCK_STREAM) mySocket.bind (( '192.168.1.64', 1200 )) mySocket.listen (1) while True: channel, details = mySocket.accept() print 'Opened a connection with...