Friday, 20 October 2006
Wednesday, 18 October 2006
In order to get this working just use the "sync and run" to run these two commands on hte pc side:
control.py -x "import camera;im = camera.take_photo();im.save('c:\\pic.jpg')"
control.py -g 'c:\\pic.jpg' mypic.jpg
Sunday, 15 October 2006
It's a pain to download run and debug python scripts in the phone, so here I present a simple solution so developing becomes fun again!
Software you'll need:
- Python http://www.python.org/ (I'm using 2.4)
- pywin32 http://sourceforge.net/projects/pywin32/
- PySerial: http://pyserial.sourceforge.net/ I'm using pyserial-2.2.win32.exe, you'll also need pyserial-2.2.zip
- tcs60fs: find it in the files section
- control.py: in the files section too
Once you have installed the above things, run (respecting the order)
- install the tcs60fs sis on your phone
- extract tcp_serial_redirect.py from pyserial-2.2.zip and run it with the following params and leave it running!
- c:/>tcp_serial_redirect.py -p com5 -b 115200
- (note: substitute com5 with your bt virtual port)
- run tcs60fs on your phone and connect to the computer
- note: don't forget to run first the tcp_serial_redirect.py
- PUT files to the phone:
- usage: control.py -p
- example: control.py -p c:/my_prog.py c:/test.py
- GET files to the phone:
- usage: control.py -g
- example: control.py -g 'c:/my_prog.py' c:/test.py
- EXEC files on the phone:
- usage: control.py -xf
- example: c:/>control.py -xf c:/test.py
- EVAL commands on the phone
- usage: control.py -x "
- example: c:/>control.py -x "print 'hellow world'\n"
That's all! now you should be able to upload files and run programs on your phone from you pc.
If you found this useful please drop me a line ;-)