开发者

Python application for updating an embedded device - is it feasible?

I am considering to write a tool for updating a WinCE based device. The update procedure consists of following steps:

  1. get several files from two different zip-archives
  2. start target and while it is booting send a command over serial interface RS232 (switch in bootstrap mode)
  3. transfer WinCE-OS image and a flash-tool over FTP
  4. connect via telnet and execute the flash-tool
  5. reboot target
  6. transfer customization files via FTP

Currently all this is done manually, which is very error prone and time consuming. Especially the step 6 is a pain in the a**, because FTP server on WinCE target often breaks.

I hope, Python could help me accomplish all these steps, the first look in the libraries showed, that there is everithing there: ziplib, ftplib, seriallib, telnetlib.开发者_如何学编程

Does anyone have done something similar? What are hidden problems there?

Thank you for any hint!

EDIT: There is not Python on target (and ihmo there is no need for). Target provides telnetd, ftpd via ethernet connection and a boot-console via serial connection. The entire file system is exposed via telnet and ftp - so any file can be accessed through these protocols from the host.


You can use pyserial or python for windows extensions to send the serial command, telnetlib to send telnet commands and and ftplib for the FTP part. Eventually, you even can install Python on the WinCE device, but should should not need it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜