Author Topic: Problems creating new plug and play device  (Read 4649 times)

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Problems creating new plug and play device
« on: November 16, 2008, 09:07:43 pm »
Hi devs,

while trying do dig deeper into the LMCE mysteries I wanted to create plug-and-play templates for some of my devices. One of them is a Pinnacle PCTV 310i DVB-T capture card. It is working great (VDR) for me but it took me some steps to configure it manually (downloading firmware etc.).
I already got a template that detects the card and creates the device (see screenshot below). Even the pop-up asking to configure the card for mythtv is shown :) However, as said before, some manual tweaking was necessary, i.e. I had to download firmware. I used a GPLed script called get_dvb_firmware which is floating around on the internet. Unfortunately I could not find a kubuntu package containing the script. I'm a little stuck now... I need to download the script on pnp detection, execute it and copy the downloaded firmware. Any hints how to achieve that?

Thanks in advance,
Chriss


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Problems creating new plug and play device
« Reply #1 on: November 16, 2008, 11:30:01 pm »
If you look at the device template for the PVR-150, you'll see there are references to a set of scripts that are called when the card needs to be configured, and when the card needs to be set up.

Take a look at those to do what you need.

Also, you should work with us to make a package containing any files needed for that template, so that LinuxMCE can install them. This would include the setup scripts as well as the get_dvb_firmware software etc.

-Thom

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problems creating new plug and play device
« Reply #2 on: November 17, 2008, 08:08:35 am »
Thom,

thanks for the hint. I've looked at the other capture cards' templates before - in fact that's how I put together my template so far.
In the meantime I found the get_dvb_firmware script in the kernel source package, however, I still need a few steps to execute it and move files around. I'll create the necessary scripts and see how I can create my own package (found a wiki entry http://wiki.linuxmce.org/index.php/How_to_add_a_new_software_package_to_LinuxMCE).

Cheers,
/Chriss

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Problems creating new plug and play device
« Reply #3 on: November 17, 2008, 01:18:44 pm »
You can do that, but due to differences in the runtime and build databases, you cannot check it in. We'll need to work together on that.

-Thom

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Problems creating new plug and play device
« Reply #4 on: November 18, 2008, 11:26:40 am »
Hi devs,

while trying do dig deeper into the LMCE mysteries I wanted to create plug-and-play templates for some of my devices. One of them is a Pinnacle PCTV 310i DVB-T capture card. It is working great (VDR) for me but it took me some steps to configure it manually (downloading firmware etc.).
I already got a template that detects the card and creates the device (see screenshot below). Even the pop-up asking to configure the card for mythtv is shown :) However, as said before, some manual tweaking was necessary, i.e. I had to download firmware. I used a GPLed script called get_dvb_firmware which is floating around on the internet. Unfortunately I could not find a kubuntu package containing the script. I'm a little stuck now... I need to download the script on pnp detection, execute it and copy the downloaded firmware. Any hints how to achieve that?

Thanks in advance,
Chriss



Hi Chriss,

The get_dvb_firmware script is part of the dvb-utils package. You can install it with apt-get from the shell;

Code: [Select]
sudo apt-get install dvb-utils <return>
All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problems creating new plug and play device
« Reply #5 on: November 19, 2008, 11:38:48 am »
Andrew,

The get_dvb_firmware script is part of the dvb-utils package.

thanks for the suggestion. Seems to make more sense to have this package installed instead of kernel-sources.
I'm on a business trip at the moment so I probably will have time to work on that template on the weekend again.

Bye,
/Chriss

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problems creating new plug and play device
« Reply #6 on: November 22, 2008, 01:45:24 pm »
The get_dvb_firmware script is part of the dvb-utils package.

Andrew, according to this file list http://packages.ubuntu.com/gutsy/i386/dvb-utils/filelist the package does not contain the script.

However, since I need to add some of my own stuff I'm wondering what's the best way? Should I create the scripts, package them to a .deb and upload them to the bugtracker? Should it be included in the SVN somehow?

BR
/Chriss

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Problems creating new plug and play device
« Reply #7 on: November 23, 2008, 07:49:45 pm »
what exactly are your modifications?

br, Hari
rock your home - http://www.agocontrol.com home automation

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problems creating new plug and play device
« Reply #8 on: November 23, 2008, 09:51:48 pm »
Hi Hari,

as stated before, I would need
- script to download and extract firmware (get_dvb_firmware or own script)
- "script" to install firmware (copy it to /lib/firmware)

This could be merged into a single simple script and I think it would be great if this would not require a new package... is there a way to store the script in the template? Would be great...

BR
/Chriss


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Problems creating new plug and play device
« Reply #9 on: November 23, 2008, 09:55:15 pm »
This could be merged into a single simple script and I think it would be great if this would not require a new package... is there a way to store the script in the template? Would be great...
not that i am aware of.

br, Hari
rock your home - http://www.agocontrol.com home automation

chriss

  • Veteran
  • ***
  • Posts: 140
    • View Profile
Re: Problems creating new plug and play device
« Reply #10 on: November 23, 2008, 10:26:39 pm »
Thanks hari.
Well, back to the question regarding the alternative: what should I do with the script? There's a wiki page "how to add a new software package" but it is referring to doing some stuff on the build server. IMHO it should be possible to distribute the package without having a new LMCE release, e.g., by creating a .deb
However, do I need to provide a package repository or how can I push both package and source to the official LMCE repos?

bye,
Chriss