working on resume script
#1
I'm working on a resume script. I need some help... My remote will shut down the computer. My remote will turn on the computer, but only if I press the power button on it. The remote stops functioning after S3 resume but only when initiated by the remote, not the power button/suspend in XBMC.

So far I've got this. It's designed to restart LIRC and all related activities.

Code:
sudo curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Stop"
sudo /etc/init.d/lirc stop
sudo rmmod lirc_atiusb
sudo modprobe lirc_atiusb
sudo /etc/init.d/lirc start
sudo curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start"

Unfortunately it sends the power command to XBMC as soon as the LIRC.Start command is issued. this makes it go right back into hibernate.

I need to know where the <Power> command script is at. Apparently the suspend and resume command <power> as commanded by lircmap and keymap are different from clicking the power/suspend commands in XBMC.

Where can I modify the script which is called by xbmc.ShutDown() and why does the remote event get sent after I restart the lirc system? How can I remove the first command sent to XBMC after a lirc reset?
Reply
#2
i see you are using the lirc_atiusb module. Are you using an XBoxDongle? If so how are you able to capture the Power On button? Which remote are you using?

I wasn't able to get it to resume from the remote.

also I don't think it calls any command but rather issues a "dbus" command to the system power management.

http://trac.xbmc.org/browser/trunk/xbmc/...anager.cpp
Reply
#3
I am using a SnapStream Firefly. It works well by activating S3 resume when you press the power button. However, I believe that the power button for resume also activates the "close" command which is held on in memory until addressed by a daemon. As soon as I restart everything, it goes back into standby.

I executed every command in that script, with the exception of the last one (which activates XBMC monitoring) then monitored with IRW in a seccond window and sure enough...
Code:
Last login: Wed Nov  4 03:24:48 2009 from 192.168.1.133
(T: XBMCLive)root@XBMCLive:~# irw
00000014d7020000 00 close Snapstream

It's holding on to the close command.

Once that close command gets thrown into irw, it's out of the system's memory and I can actually use the remote control from XBMC again.

I need to work around this "close" command somehow and make this a XBMC resume script.
Reply
#4
the script works fine, but the thing is a IRW process has to be created so the basic outline of this resume script has to be....

Code:
sudo rmmod lirc_atiusb
sudo modprobe lirc_atiusb
sudo /etc/init.d/lirc restart
IRW
I had to run IRW to dump the CLOSE command out of the remote daemon because it's holding onto it until it gets a port to unload it.

hit ctrl-C to stop the process then
Code:
sudo curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start"

How can I dump the IRW automatically without hitting CTRL+C?
Reply
#5
When I come out of suspend LIRC has the close command cached. Is there a way to dump the LIRC cached command to a null device before I activate the XBMC connection to LIRC?
Reply
#6
outleradam Wrote:the script works fine, but the thing is a IRW process has to be created so the basic outline of this resume script has to be....

Code:
sudo rmmod lirc_atiusb
sudo modprobe lirc_atiusb
sudo /etc/init.d/lirc restart
IRW
I had to run IRW to dump the CLOSE command out of the remote daemon because it's holding onto it until it gets a port to unload it.

hit ctrl-C to stop the process then
Code:
sudo curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start"

How can I dump the IRW automatically without hitting CTRL+C?

a really terrible hack would be

Code:
irw & sleep 10; killall irw

but i see the problem
Reply
#7
Thank you. That will do. A sleep 1 or no sleep at all should work. It just needs to dump the command which is stored in memory before connecting to xbmc
Reply
#8
I figured out the problem and wrote this article http://wiki.xbmc.org/?title=Snapstream_Firefly
Reply
#9
Wrong post
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply

Logout Mark Read Team Forum Stats Members Help
working on resume script0