Easy PyMaemo developping on PC using SSH/SCP

Wanna develop Maemo programs in Linux without Maemo SDK? Or even in Windows?

 

Nothing is impossible if you know Python! Working on PyMaemo, all we need are:

1. N800 with python2.5-runtime.

2. A pc with wireless card (laptop), running Ubuntu or Windows.

(Using a desktop PC without wireless card will be discussed at last)

 

Case One - Using Ubuntu:

Step 1 (Setting up Ubuntu): Establish a wireless network (either AP or Ad-hoc mode). Use a static IP as you like.

 

Step 2 (Setting up N800): Access the created network from N800 and give N800 a static IP (# ifconfig wlan0 ip) within the same domain as PC's. Use ping to check whether they're successfully connected.

 

Step 3: Install python2.5 runtime on Ubuntu:

# sudo apt-get install python2.5*

 

Step 4: Start whatever an IDE (e.g., Eric) or code editor (e.g., GEditor) to write your code (python script), save it in your PC.

 

 

Step 5: Start GFTP, use "root" as username, "SCP" as protocol (password is your N800 admin password, which is "maemo" by default) to logon to N800. Then you can explore N800 as a FTP server! Copy your code from PC to N800.

 

Step 6: Run this in Ubuntu terminal to open a login terminal:

$ ssh root@N800IP

 

It will make us able to input N800 commands from pc keyboard. Commonly, we just use it to start our application on N800 quickly (use script "run-standalone.sh") instead of click the tiny screen.

 

  

Case Two - Using Windows:

Step 1 & 2: Same to case one.

Step 3: Download python2.5 runtime (sure you can get the pure Python runtime from Python official site if you do not need those GTK supports as me) from

http://www.bonifazi.eu/appunti/pygtk_windows_installer.exe

It includes: Python2.5.2, IDLE, GTK+, PyGTK, PyGObject, etc.

 

Step 4: IDLE is the ealist Python IDE around the world, which is made by the author of Python. But you may use whatever IDE as you like to write Python code in Windows. 

 

Step 5: Download WinSCP from: http://jlbc.skycn.com/down/winscp407setup.zip

It's an amazing tool with FTP-like GUI that makes N800 act as a FTP server.

Start WinSCP, input root@n800ip as host name, default "maemo" as password, and change the file protocol into "SCP". After that, "login".

WinSCP works as GFTP, but it can synchronize directories and files between N800 and PC.

 

Step 6: Download PuTTy - SSH in Windows:

http://mhsin.org/putty/files/putty.exe

Input root@n800ip as host name too, and select "SSH". Then "open".

 

All works done! Now we can write Maemo programs or run N800 tereminal commands on the PC, using no SDK any longer.

 (However, making .deb package still needs SDK.)

 

What a great language - Python!

  

 ---------------------------------------------------------------------------------------------------------------------------------

What if I got no laptop or no wireless card for my desktop? There is also a way to connect N800 to PC (only tested in Ubuntu so far):

 

Step 1 (On N800): Run following commands to turn N800 into ethernet mode (pay attention that "insmod ..." needs to be runned twice)

$ sudo gainroot
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/g_ether.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/g_ether.ko

 

Step 2: Connect N800 to PC with usb cable, and then N800 will appear as "usb0' interface in Ubuntu. Use "ifconfig" to set ip of eth0 and usb0, which should also be in a same domain.

 

Step 3~6: Same as case one.

 

 ---------------------------------------------------------------------------------------------------------------------------------

See more about Python-Win32 all-in-one installer:

http://www.bonifazi.eu/appunti/2008/04/pygtk-all-in-one-installer.html

 

See more about WinScp:

http://www.skycn.com/soft/735.html

http://winscp.net/eng/docs/lang:chs

 

See more about PuTTy:

http://mhsin.org/putty/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值