Author Topic: [Solved] Device Spawning  (Read 1270 times)

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
[Solved] Device Spawning
« 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 »

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2997
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Device Spawning
« 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: Device Spawning
« Reply #2 on: February 22, 2013, 07:41:36 am »
did you copy the compiled executable to /usr/pluto/bin ?

-Thom

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
Re: Device Spawning
« 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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: Device Spawning
« 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

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
Re: Device Spawning
« 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: Device Spawning
« Reply #6 on: February 22, 2013, 10:42:43 pm »
What happens when you reboot?

-Thom

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
Re: Device Spawning
« Reply #7 on: February 22, 2013, 10:55:39 pm »
It still does not start on its own.

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
Re: Device Spawning
« 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...

SBCC

  • Veteran
  • ***
  • Posts: 128
    • View Profile
Re: [Solved] Device Spawning
« 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!