Python

Forgive me if this is a basic question, or if this is the wrong thread. I recently got the Digi Connect 9210 ME with Linux Jumpstart Development Kit. I saw in the datasheet that it is supposed to support python scripting, but I can’t find the python interpreter on the device. My package came with the 5.0 version of Digi Embedded Linux.

Does it need to be installed, and if so, is there a step-by-step guide how to do so?

Thanks!

it can be included in to rootfs. Rightclick on your kernel/rootfs project and select “configure project”. Scroll all the way down to rootfs configuration. There will be a section for prebuild application that you can include in to your rootfs. Select python, save close ,build.

Thanks for the reply. The project was on hiatus for a while, but I just got back into it. I followed your instructions, and have a successful build. But now I need to know how to install this onto the Connect ME 9210. The build created the following files:
7205908 2010-04-06 21:38 rootfs-cme9210js-64.jffs2
5083136 2010-04-06 21:38 rootfs-cme9210js.squashfs
165156 2010-04-06 21:27 u-boot-cme9210js.bin
1076056 2010-04-06 21:35 uImage-cme9210js

How do I install this onto the ConnectME? Which files should I upload, and what is the best way to do this?

after compiling the project, right click on it and select “install project”.
now to test your new images you can interrupt U-boot at startup by pressing any key, then from U-boot prompt:
dboot linux tftp
this should transfer kernel diretcly in to your memory over tftp protocol and mount rootfs located on the host using NFS.
Obviously host and target’s IP have to be configured to be on the same subnet if not done this already.
To put new images in to module’s FLASH, use from U-boot:
update linux tftp
update rootfs tftp
update u-boot tftp

Thanks again.
Is there a way to save the factory default image? ie: if I want to revert to the factory state in case I mess something up on my end?

Factory default images are somewhere on DVD. This is why you first should try to boot from TFTP/NFS (dboot linux tftp). this does not touch your FLASH and is good for developement.

How do you specify server IP, and is a TFTP server and NFS setup by Eclipse? Is there something I need to do on the server (development) side after I have this configured?

in U-boot use printenv command, then setenv command
something like setenv serverip xxx.xx.xx.xx
setenv ipaddr …
netmask, gatewayip
you should seriously consider reading documentation. There is really good online help in DIGI ESP.
All of the answers to your questions are there.

Thanks for your help with this. I totally didn’t realize that the help in the Eclipse was specific to the Digi EL platform…figures. The documentation helps a great deal.

I was able to create a simple image (using default values), boot it and mount the filesystem using NFS.

I’m now going to try to play with actually putting on Python, but I’m seeing that my original build was close to 7MB, so it will never fit on the connect ME 9210. This included Python and SSL. Hopefully I can trim a bunch of stuff out to make this work.

Any resources to identify how much space each option requires?

The easiest would be to try each option and see what comes out:
Default images for me9210 includes ssh, http and ftp (missing python and ssl):
leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ ls -la /tftpboot/cme
-rw-r–r-- 1 leonidm leonidm 1189640 2010-02-17 12:47 /tftpboot/rootfs-cme9210js-64.jffs2
-rw-r–r-- 1 leonidm leonidm 933888 2010-02-17 12:47 /tftpboot/rootfs-cme9210js.squashfs
-rw-r–r-- 1 leonidm leonidm 172960 2010-02-17 12:47 /tftpboot/u-boot-cme9210js.bin
-rw-r–r-- 1 leonidm leonidm 1091616 2010-02-17 12:47 /tftpboot/uImage-cme9210js

Rootfs 1M, Kernel 1M, uboot 180K

Adding Python - this is what seems to be killing it:
leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ ls -la /tftpboot/cme
-rw-r–r-- 1 leonidm leonidm 6054184 2010-04-08 12:03 /tftpboot/rootfs-cme9210js-64.jffs2
-rw-r–r-- 1 leonidm leonidm 4251648 2010-04-08 12:03 /tftpboot/rootfs-cme9210js.squashfs
-rw-r–r-- 1 leonidm leonidm 172960 2010-04-08 12:03 /tftpboot/u-boot-cme9210js.bin
-rw-r–r-- 1 leonidm leonidm 1091616 2010-04-08 12:03 /tftpboot/uImage-cme9210js

Rootfs 6M uncompressed, 4M compressed, Kernel 1M, uboot 180K

leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ ls -la /exports/nfsroot-cme9210js/usr/bin/pyth*
lrwxrwxrwx 1 leonidm leonidm 9 2010-04-08 12:02 /exports/nfsroot-cme9210js/usr/bin/python -> python2.5
-rwxr-xr-x 1 leonidm leonidm 1166640 2010-04-08 12:02 /exports/nfsroot-cme9210js/usr/bin/python2.5
The interpreter itself is 1.2M
But it looks like the lib folder gets almost 10M uncompressed.
leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ du -s /exports/nfsroot-cme9210js/usr/lib/python2.5
10020 /exports/nfsroot-cme9210js/usr/lib/python2.5

adding SSL:
leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ ls -la /tftpboot/cme
-rw-r–r-- 1 leonidm leonidm 7250556 2010-04-08 12:27 /tftpboot/rootfs-cme9210js-64.jffs2
-rw-r–r-- 1 leonidm leonidm 5111808 2010-04-08 12:27 /tftpboot/rootfs-cme9210js.squashfs
-rw-r–r-- 1 leonidm leonidm 172960 2010-04-08 12:27 /tftpboot/u-boot-cme9210js.bin
-rw-r–r-- 1 leonidm leonidm 1091616 2010-04-08 12:27 /tftpboot/uImage-cme9210js

Rootfs 7.2M uncompressed, 5.1M compressed, Kernel 1M, uboot 180K

Finally removed Python, added SSL:
leonidm@leonidm-5:/usr/local/DigiEL-5.2/package_manager/temp$ ls -la /tftpboot/cme
-rw-r–r-- 1 leonidm leonidm 2409220 2010-04-08 13:27 /tftpboot/rootfs-cme9210js-64.jffs2
-rw-r–r-- 1 leonidm leonidm 1802240 2010-04-08 13:27 /tftpboot/rootfs-cme9210js.squashfs
-rw-r–r-- 1 leonidm leonidm 172960 2010-04-08 13:27 /tftpboot/u-boot-cme9210js.bin
-rw-r–r-- 1 leonidm leonidm 1091616 2010-04-08 13:27 /tftpboot/uImage-cme9210js

This should still fit in ME9210. Looks like Python is no go for ME9210 so.
Regards,
Leonid

I may have some success if I remove a bunch of the libraries (and keep on the necessary ones), it might be pushing it anyway, but I thought I’d give it a go.

Problem is that the python setup doesn’t support SSL in the sockets library anyway. I might be able to install stunnel instead, but do you know if the stunnel pre-compiled application require the OpenSSL app?

the solution is here, http://forums.digi.com/support/forum/viewthread_thread,7390

Paul,
please check out this thread:
http://forums.digi.com/support/forum/viewthread_thread,7390
It might have solution to your problem with Python on ME9210

Craig & Leonid,
Thanks for pointing me to that thread. I will most certainly be reviewing it closely.