NEW: autoHijack

Posted by: Gary

NEW: autoHijack - 03/02/2002 17:18

Attached is a script that will automatically check for upgrades of Hijack, download the latest, and then flash it to your empeg.

Basically, it's a Mark Lord tracker: a solution for those of us who have trouble keeping up with Mark's prolific coding of the excellent Hijack. (Thanks, Mark, for releasing 5 or 6 upgrades this weekend while I was coding so I could test...)

After setting it up, you can just click on the icon and you're done. If your kernel is current, nothing happens; if there's a newer one, it's installed. Error reporting is extensive, downloads are saved, and there's a facility for rolling your kernel back to the last one that successfully flashed. Flashed kernels are verified against the downloaded zImage file.

You need Python and a working Hijack kernel. Tested on WinXP, but should be portable.

First contribution; let me know how it works for you. Comments/suggestions/rants welcome.

Gary

[Edit: The latest version is attached to one of my messages below; please scroll down...]
Posted by: drakino

Re: NEW: autoHijack - 03/02/2002 17:32

I've been thinking of adding this to my linux script, how did you easially detect newer versions on the web site?

Nevermind, I just looked at the source code,
Posted by: Nosferatu

Re: NEW: autoHijack - 03/02/2002 18:09

ahh, I tried to do the same in Perl but I had no doc on how to use IP socket in Perl to dowload kernels on Mark's Website .

Good Work !!!!
Posted by: ClownBurner

Re: NEW: autoHijack - 03/02/2002 18:33

Wow, that's neat... Saves me the trouble of hacking out a perl version.

Thanks!
Posted by: Yang

Re: NEW: autoHijack - 03/02/2002 20:25

I get this:
Traceback (most recent call last):

File "D:\Empeg\AutoHijack\autoHijack.py", line 345, in ?
new_kernel_file = check_for_latest_file()
File "D:\Empeg\AutoHijack\autoHijack.py", line 240, in check_for_latest_file
if newer_kernel_on_web(zImage_filename) or GL_overwrite_downloaded_kernels:
File "D:\Empeg\AutoHijack\autoHijack.py", line 211, in newer_kernel_on_web
if version(zimage_on_web) > version(disk_zImages[0]):
IndexError: list index out of range

When I run it... looks like it can't handle being run for the first time..

Edit: I had to comment out lines 211,214-216 and reduce the tab of 212-213 to get it to work the first time, if anyone else has this problem.. Once you have one done successfully it'll work ok.
Posted by: Gary

Re: NEW: autoHijack - 03/02/2002 21:22

Roger that. The error occurs if the working directory is empty. Here's a new version with a fix. Also fixed in this version: changing your ip address will no longer upset the database that stores the last successful upload.
Posted by: Terminator

Re: NEW: autoHijack - 03/02/2002 22:44

Thanks for your work on this program. It works!

Sean
Posted by: ClownBurner

Re: NEW: autoHijack - 06/02/2002 09:32

Here's a minor tweak...

Your source mentions that you want to pause the player but can't, because sending a play/pause will UNPAUSE the player if it's already paused... But what about standby?

Replace line 300 with:
ftp.sendcmd('SITE button source.L')

and the Empeg will be placed in sleepy-mode.. On my Empeg, it doesn't seem to wake it if it's already in standby, but it will reliably put it there.