[hobbit] Hobbit to IPPhone Beta

Charles Jones jonescr at cisco.com
Fri Mar 21 22:28:32 CET 2008


Charles Jones wrote:
> I've posted a beta of Hobbit2IPPhone here: 
> http://www.the-ownage.com/?p=620
>
> This is a stable beta, I'm currently using it daily. There is still 
> lots of work I need to do to make a real portable release, and a 
> "services" version as well.
>
> Enjoy!
>
> -Charles
I just realized that I forgot to mention in the "docs" at the top of the 
program that for this to work properly, you should run it out of cron 
every minute, ie:

$ crontab -l
* * * * * /var/www/perl/hobbit.cgi

You can run it from command-line manually for testing purposes. 
Explanation of why it is run this way...You cannot just "push" XML to an 
IPPhone to create menus and such. However, you can push a bit of XML 
that instructs the phone to fetch a remote CGI, and that remote CGI can 
have the XML for menus and such. In other words, the phone will only act 
on code that IT fetches itself. The only thing you can push to it in one 
action is the command to execute a remote CGI.

So, when hobbit.cgi is run from command-line (or cron), it does the 
initial authentication to the IPPhone, and tells it to execute a remote 
CGI, which happens to be the same hobbit.cgi program, except it passes 
along some parameters that tell it to do the Hobbit stuff.

I know that is kind of confusing...its basically a cgi and command-line 
program all in one.  If run from the command-line, it tells the phone to 
fetch it via http along with parameters that make it act like a web CGI 
instead.

Anyhow running it out of cron every minute is the best way to keep it 
running. I am experimenting with using meta-refresh instead, but so far 
I don't like that, because if you exit the hobbit menu, it stops 
refreshing and you have to kick it off again manually.

Ahh..the fun of beta software :)



More information about the Xymon mailing list