LinuxMCE Forums
May 19, 2013, 05:31:44 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: [Solved] Device Spawning  (Read 666 times)
SBCC
Veteran
***
Posts: 118


View Profile
« on: February 22, 2013, 02:14:41 am »

Hello,

I created a device template I wrote in c++. This is my 1st venture with c++ so I'm just starting out there (and I don't think I'll ever get my head fully around pointers). That said the program works fine. I can start the device from a terminal using "Spawn_Device.sh" and the device runs as expected. My problem is I cannot get the device to spawn on its own. I even wrote a pnp script to see if that worked (and that was... interesting). The device template loaded correctly but did not start, even after several reloads and reboots. So while I usually enjoy delving deeper into lmce to see why it works and why not, this ones getting me. Any insite as to why this would be?

Thanks
Jim
« Last Edit: February 24, 2013, 05:37:12 pm by SBCC » Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2620


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #1 on: February 22, 2013, 04:04:09 am »

execute Spawn_Device.sh with bash -x Spawn_Device.sh and see what it does.
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #2 on: February 22, 2013, 07:41:36 am »

did you copy the compiled executable to /usr/pluto/bin ?

-Thom
Logged
SBCC
Veteran
***
Posts: 118


View Profile
« Reply #3 on: February 22, 2013, 01:09:23 pm »

posde: bash -x works but once I close the terminal it stops then will not start on its own after reload. If I detach using & at the end I can close the terminal but I will not start on its own after reboot.

Thom I did copy it to /usr/pluto/bin. That's where I'm running it from.

Thanks
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #4 on: February 22, 2013, 04:39:58 pm »

And you have a device instance in your device table... Ok, that leaves the controlled via field, in the device template. The Controlled Via Category field needs to be set to Controlled by Computers, at the very least, so that the system knows where to put it. Look at some of the other device templates.

-Thom
Logged
SBCC
Veteran
***
Posts: 118


View Profile
« Reply #5 on: February 22, 2013, 10:16:35 pm »

Thanks Thom, I had it as controlled via Computers in the template and switched it to Core and still will not start on its own. Device shows controlled by Core.
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #6 on: February 22, 2013, 10:42:43 pm »

What happens when you reboot?

-Thom
Logged
SBCC
Veteran
***
Posts: 118


View Profile
« Reply #7 on: February 22, 2013, 10:55:39 pm »

It still does not start on its own.
Logged
SBCC
Veteran
***
Posts: 118


View Profile
« Reply #8 on: February 23, 2013, 04:05:19 pm »

Alright I'm going to do an install of the latest snap and see if it works there. I have poked around a lot with this one. So maybe...
Logged
SBCC
Veteran
***
Posts: 118


View Profile
« Reply #9 on: February 24, 2013, 05:38:31 pm »

Solved this. It seems my executable had a slightly different name then the device template. Not sure how it happened but that was it. Works perfect now. Thanks for the help!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!