N80 camera phone will serve as an eye of the roomba. To get the 640x480 jpg-picture from the camera, the desktop must run a tcp/ip server process. The phone has a client process (since servers are hard to implement in a phone) that sends pictures to the server over the CS department wlan. The application program that runs in the same computer as the server process, communicates with server using two named pipes, cmdpipe and signalpipe, that are created by the server. The user writes a line "PIC" to the command pipe and as soon as it receives a line "done" from the signalpipe, the picture should be ready in the picturefile, that was specified when the desktop side server was started.
It seems that the final rate of pictures will be about one picture per second. Furthermore, the picture is rotated 90 degrees clockwise - a command "jpegtran -rot 270 -outfile pic-90 pic" solves the problem by rotating "pic" to "pic-90".
Phone 2, as labelled on the backside of the phone, communicates with desktop dop-136. Phone 1 communicates with dop-49.
chmod u+x eyesrvr.py
./eyesrvr.py cmdpipe signalpipe picturefile
python a.py cmdpipe signalpipe picturefile
This is provided so you can bypass the eyesrvr.py running in the desktop if yoy wish.
cmd = "START" connect to server while True: pic = take new picture if cmd == "PIC": send to server the picture length + \n as a string send to server picture contents elif cmd == "QUIT": exit send to server "NEXT\n" cmd = read line from server