Topic: Easy way to test?

Currently, the way its set up in order to test something on a Chumby, you have to navigate to the upload page, select the file, put it in a channel by it self, and then change the chumby's channel to that, then hit the refresh button on the chumby and wait. (If its your second time, you can skip the channel part)
Or, you could put it on a thumb drive, but it does take a bit of time for the chumby to turn on.

Is there just a simple way I'm missing? I usually debug most problems from the computer, but when you need the Chumby's environmental variables, ie accelerometer readings or stuff from configure widgets, you have to go through the process a lot. (Especially when you need to realize you are calling the light function instead of the variable)

Re: Easy way to test?

I typically run my chumby with a thumbdrive in it, with sshd running.  I use scp to transfer Flash movies from my computer to the thumbdrive on chumby and then run them from the player.

Some folks use NFS instead - you can mount a volume from your computer on the chumby.

3 (edited by zachninme 2007-03-01 08:34:48)

Re: Easy way to test?

EDIT: I found it :-)

Re: Easy way to test?

I can't get scp working on my chumby. It always says "scp: applet not found" after I put it on the disk, AND copy it into /usr/bin and run "chmod +x scp"

Re: Easy way to test?

You might be missing a library - also some versions of scp require you also have ssh.

Re: Easy way to test?

I also have ssh on the thumb drive, but I'll try adding the symlink.

Re: Easy way to test?

It worked!

I am trying to make a shell script to do it all for me, and I can't get this to work.


#!/bin/sh
sudo scp /home/zach/Desktop/chumby/$1 192.168.1.104:
ssh -l root 192.168.1.104
rm /tmp/flashplayer_started
killall chumbyflashplayer.x
/usr/bin/chumbyflashplayer.x -i $1


It connects, and transfers the file, and ssh , but it just stops there.

Re: Easy way to test?

ssh is an interactive program, so it's not really appropriate to use in a script the way you've used it.

Were you expecting those last three lines to be input to the ssh session?

ssh can take a "command" parameter which is run on the remote device - that's probably what you want.

Re: Easy way to test?

I know it is interactive, but since I am only running 2 lines of code on the Chumby, and it's me running them, not something inside a larger program, I don't mind doing so if it saves me 47.23 seconds.

I ironed it out, if anyone wants it:


#!/bin/sh
sudo scp /WIDGET_DIR/$1 CHUMBY_IP:
ssh -l root CHUMBY_IP << EOT
killall chumbyflashplayer.x
/usr/bin/chumbyflashplayer.x -i $1
EOT


/WIDGET_DIR/ is a directory with all your widgets. CHUMBY_IP is the IP of the chumby.
To run, save it as "flash" in an easy directory. Then type "./flash WIDGET.swf" where WIDGET is the name of your widget. I have only tested it under windows. No clue if it would work under Cygyin for windows, or whatever it is on a Mac. tongue

Re: Easy way to test?

I don't know how to format a USB drive via my windows machine--is this possible? 

In any event, it seems fastest for me to test by just uploading a new widget.  Am I missing out on some debug tools or something?

Re: Easy way to test?

My Computer
Left-click on the drive
Format...
And set it to FAT (or FAT32), just don't use NTFS.
And click "Format"

It erases the disk, so don't have anything on there that you need ;-)