power on

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
the_alien Offline
Team-XBMC Android Remote Developer
Posts: 422
Joined: May 2008
Reputation: 0
Post: #11
grajen3 Wrote:question for devs - the thing with connection refused is kinda ugly - if ppl would be interested in this maybe we could define some signature that xbmclauncher would send when remote is connecting to it, so the remote instead of refused connection would display "xbmc is launching, please wait"?

What if you just listen to port 8081 and forward everything that is coming to 8081 to 8080? That way you won't have to close the port.

XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #12
the_alien Wrote:What if you just listen to port 8081 and forward everything that is coming to 8081 to 8080? That way you won't have to close the port.
when i will have some spare time i'll give it a try, but this will add another another link in chain of communication and i would try to avoid it

but i see that remote project has it's code placed and code.google.com's svn, maybe i'll investigate it (good that i know java and basics of android's app structure) and suggest patch there,

anyway thanks for reply!
find quote
the_alien Offline
Team-XBMC Android Remote Developer
Posts: 422
Joined: May 2008
Reputation: 0
Post: #13
Or even better. Listen to a port of your choice and check if the WOL package arrives.
So your launcher would be configured to listen to port 12345 and the remote is configured to send the WOL to 12345.
This way you won't have to patch the remote.

XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #14
the_alien Wrote:Or even better. Listen to a port of your choice and check if the WOL package arrives.
So your launcher would be configured to listen to port 12345 and the remote is configured to send the WOL to 12345.
This way you won't have to patch the remote.
briliant! i'll do it this evening after i get back from work and let u guys know!

--edit
ok, when no1 was looking (Tongue) i rewrote application to use wake on lan packet to launch XBMC - here are updated files

Files:
there is change in cfg file - instead of port there is wake_on_lan_port which by default in remote xbmc is set to 9 (and i set such default in application), application seems to work - it detects when user press Power On in remote - didn't check with XBMC yet (in work we don't have luxury to use it Sad ), but it should work - ill edit my earlier post about detailed configuration later!

cheers!
(This post was last modified: 2010-08-27 14:22 by pieh.)
find quote
gfoldv Offline
Senior Member
Posts: 115
Joined: Oct 2009
Reputation: 5
Location: in the dutch mountains
Post: #15
In my opinion if you could avoid using .NET would be the best. At least for those who are trying to keep the OS as minimal as possible.
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #16
gfoldv Wrote:In my opinion if you could avoid using .NET would be the best. At least for those who are trying to keep the OS as minimal as possible.
i did it in .net cause this is my main work tool and to write it i didn't have to learn new stuff - when i will have more spare time, i will rewrite it to "clean" c++ but i dont promise it will be soon

anyway - just to point out - i don't believe ppl use windows on xbmc dedicated machine (xbmc live is made for this purpose), and if some1 use xbmc on windows he propably use pc also for other things (web browsing, games, etc) and it would be tough not to have .net installed then (windows7 even got .NET 3.5 as main component, vista got .NET 3.0)

--edit
if c++ is Your work tool - then u could write it - simply:
  • wait for udp packet on specified port
  • when message comes launch xbmc and go back to the begining
(This post was last modified: 2010-08-27 16:19 by pieh.)
find quote
junk Offline
Senior Member
Posts: 147
Joined: Dec 2008
Reputation: 0
Post: #17
I agree, .NET is fine. If you run a Windows OS without .NET today, you should upgrade OS anyway =)

Great app! Some comments:
* If XBMC is installed in C:\Program Files\XBMC\ and you place the XBMC Launcher at the same path, you will have to run the program as Administrator the first time (else it won't have permission to write the config file). Maybe you could catch that exception and print a friendly error message?
* If I have another window open, XBMC starts "behind" this window, even if XBMC is set to start in fullscreen. Not sure if this is a problem with your app or with XBMC, but if I click the icon on the start menu, it always shows on top.
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #18
junk Wrote:I agree, .NET is fine. If you run a Windows OS without .NET today, you should upgrade OS anyway =)

Great app! Some comments:
* If XBMC is installed in C:\Program Files\XBMC\ and you place the XBMC Launcher at the same path, you will have to run the program as Administrator the first time (else it won't have permission to write the config file). Maybe you could catch that exception and print a friendly error message?
* If I have another window open, XBMC starts "behind" this window, even if XBMC is set to start in fullscreen. Not sure if this is a problem with your app or with XBMC, but if I click the icon on the start menu, it always shows on top.
good points!

Added:
  • SetForegroundWindow after launch of XBMC <- it has to be tested, i did changes on my launch break without access to real XBMC, but it worked with other application (i used notepad.exe as replacement for xbmc.exe Big Grin)
  • detects if config file can't be created and notify user about it
  • allow user to pick path to XBMC.exe if there is no cfg file or path in cfg file doesn't point to existing file (it use standard windows OpenFileDialog)
  • basic Loging of application actions to Log file (XBMCLauncher_log.txt) in case something wouldn't work, hopefully there will be more info about it
Files:
(This post was last modified: 2010-08-30 14:16 by pieh.)
find quote
junk Offline
Senior Member
Posts: 147
Joined: Dec 2008
Reputation: 0
Post: #19
Nice, I'll test the new version when I get home.
find quote
junk Offline
Senior Member
Posts: 147
Joined: Dec 2008
Reputation: 0
Post: #20
I tried the new version, but XBMC still "starts in background".

Any ideas Confused
find quote
Post Reply