LinuxMCE Forums

General => Developers => Topic started by: SBCC on February 22, 2013, 02:14:41 am

Title: [Solved] Device Spawning
Post by: SBCC 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
Title: Re: Device Spawning
Post by: Marie.O on February 22, 2013, 04:04:09 am
execute Spawn_Device.sh with bash -x Spawn_Device.sh and see what it does.
Title: Re: Device Spawning
Post by: tschak909 on February 22, 2013, 07:41:36 am
did you copy the compiled executable to /usr/pluto/bin ?

-Thom
Title: Re: Device Spawning
Post by: SBCC 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
Title: Re: Device Spawning
Post by: tschak909 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
Title: Re: Device Spawning
Post by: SBCC 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.
Title: Re: Device Spawning
Post by: tschak909 on February 22, 2013, 10:42:43 pm
What happens when you reboot?

-Thom
Title: Re: Device Spawning
Post by: SBCC on February 22, 2013, 10:55:39 pm
It still does not start on its own.
Title: Re: Device Spawning
Post by: SBCC 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...
Title: Re: [Solved] Device Spawning
Post by: SBCC 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!