Page 1 of 2

Installing python to USB

Posted: Sun Sep 06, 2009 12:28 am
by microman171
Hey Guys,

I have spent the majority of today trying to get python onto a USB stick. The stick itself is formatted to EXT3 and is 32MB.

I have tried a few different flash images, at the moment I have kamikaze 8.09.1 on my ASUS WL-520gU router.

I have a serial port wired up (is actually a level shifted RS232 port... Works great!)

I been to many different sites, and have really just been banging my heads against the brick wall. Could somebody help me around it?

I don't know how to create symlinks between /mnt/usb (where I mounted it) and root. I actaully managed to install python to the stick, but it wont run as is says it can't find libpthread. I know it is there, as I can see it in /mnt/usb/lib

A few tutorials talked about making symlinks some where, but I have no idea.

I also can't get my USB stick to mount on boot. Help would be appreciated.


Hopefully I have given enough information.

MM

Re: Installing python to USB

Posted: Tue Sep 08, 2009 2:24 pm
by mightyohm
Ladyada got this to work for her Tweet-a-Watt project. (http://www.ladyada.net/make/tweetawatt/expand.html)

You might try asking on her forums: http://forums.ladyada.net/viewtopic.php?f=40&t=11613

I keep wishing that she will write up the instructions on her website as I would also like to know how she did it. I haven't tried myself.

Re: Installing python to USB

Posted: Tue Sep 08, 2009 8:46 pm
by microman171
Thanks for the reply =)

I actually did make a post there, and I now (almost) have a tweeting router. All I need to do now is figure out how to SSH/telnet into the router so I don't need the serial port for terminal messages (I want the serial port for I.O.)

MM

Re: Installing python to USB

Posted: Wed Sep 09, 2009 11:44 am
by mightyohm
If you could share the steps it took to get Python working here, that would be awesome - I'm sure others (including me) would like to see!

You should be able to get telnet working by using the LAN configuration in the /etc/config/network settings I am using, and connecting an ethernet cable from your PC directly to one of the LAN ports of the router. My settings set the router to 192.168.1.1, you should be able to telnet or ssh to this address. If your home network is on 192.168.1.1 as well, you may need to change this IP to another subnet (or move your home LAN to another subnet, which is what I did).

Code: Select all

#### LAN configuration
config interface lan
	#option type 	bridge
	option ifname	"eth0.0"
	option proto	static
	option ipaddr	192.168.1.1
	option netmask	255.255.255.0
BTW - If you set a root password, then SSH is automatically enabled (and telnet is disabled). Otherwise, with no password, telnet is enabled by default (and SSH is disabled). Make sense?

Re: Installing python to USB

Posted: Wed Sep 09, 2009 8:52 pm
by microman171
If you are keen, I will link you to the instructable I will make.

I see the network interface is static... And the type isn't sta.

I will try these settings, and tell you how I go =)

Thanks for the replies!

Re: Installing python to USB

Posted: Wed Sep 09, 2009 9:22 pm
by mightyohm
Please do link to the instructable! And if you still have issues with ssh we should be able to solve them.

Re: Installing python to USB

Posted: Wed Sep 09, 2009 11:19 pm
by microman171
Any idea how to SSH over wireless?

I want to connect my computer to the regular wireless router in our house, and have this one in the garage. Then I want to be able to SSH to it from my computer, through the wireless router.

I'm no network whiz, so I can't give you any details on the current config.

I did manage to SSH when I changed the LAN settings to static and disabled bridge.

Re: Installing python to USB

Posted: Thu Sep 10, 2009 12:03 am
by mightyohm
If you can figure out what IP address the router was assigned by your network, it should work, assuming you set up the firewall as I described in part 9 of my Wifi Radio tutorial. Your wireless router might have a status page that shows what devices are connected - you can guess which one is the router and use that IP address for your test. You might also be able to set the router up to use a static IP, provided the IP address is outside of the DHCP range of your home network. Then you wouldn't have to guess at the IP address every time it changes.

Re: Installing python to USB

Posted: Thu Sep 10, 2009 1:05 am
by microman171
Indeed it was a simple matter of getting the right IP address.

I have got it sorted now!

I can still use DHCP. Instead of trying to connect to 192.168.1.1, I had to connect to the IP address provided by my main home router.

Next is to get my python code working! Shouldn't be too hard =)


Once again, thanks for your help!

MM

Re: Installing python to USB

Posted: Thu Sep 10, 2009 7:56 am
by richms
I dont know how well it works, but I have just managed to get this

http://www2.kaufmanfamily.net:8080/blog ... or-openwrt

working so that I could install more packages then would fit in the asuses flash.

Its working, a little slow via a crappy hub (says 2.0 ontop but windows always tells me things would be faster on a 2.0 port) and an old transcend 1 gig usb drive formatted ext3.

I did it so I could install alsa, to get a mixer to turn up the playback and yes, that sorted it out, now I have good levels.

edit: - it doesnt load the modules that are on the USB drive after switching over. Need to see why but will leave that for another time I think.