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

Main Menu

[Solved] Device Spawning

Started by SBCC, February 22, 2013, 02:14:41 AM

Previous topic - Next topic

SBCC

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

Marie.O

execute Spawn_Device.sh with bash -x Spawn_Device.sh and see what it does.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

tschak909

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

-Thom

SBCC

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

tschak909

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

SBCC

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.

tschak909

What happens when you reboot?

-Thom

SBCC

It still does not start on its own.

SBCC

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...

SBCC

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!