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

Problems creating new plug and play device

Started by chriss, November 16, 2008, 09:07:43 PM

Previous topic - Next topic

chriss

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

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

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

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

Quote from: chriss 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



Hi Chriss,

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

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 [url="http://forum.linuxmce.org/index.php?topic=14026.0"]http://forum.linuxmce.org/index.php?topic=14026.0[/url]

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: [url="http://wp.me/P4KgIc-5P"]http://wp.me/P4KgIc-5P[/url]

Facebook: [url="https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465"]https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465[/url]

[url="http://www.dianemo.co.uk"]http://www.dianemo.co.uk[/url]

chriss

Andrew,

Quote from: totallymaxed on November 18, 2008, 11:26:40 AM
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

Quote from: totallymaxed on November 18, 2008, 11:26:40 AM
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

what exactly are your modifications?

br, Hari
rock your home - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation

chriss

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

Quote from: chriss on November 23, 2008, 09:51:48 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 - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation

chriss

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