[linux-dvb] Siano subsystem (DAB/DMB support) library for linux?

BOUWSMA Barry freebeer.bouwsma at gmail.com
Sun Jan 18 15:12:54 CET 2009

On Sun, 18 Jan 2009, Uri Shkolnik wrote:

> > You know, it might help if I actually looked at the files
> > I'm
> > hacking on, instead of blindly assuming they work like
> > and create the node in the current directory  :-)

Well, I guess that has blown my chances of ever getting
a job again ;-)   Now the world will see this post and
say that something about my claim to having written an
operating system in my spare time just doesn't add up...

But now that the cat is out of the bag, and you've made
the Linux library available to all, I figure it's time
to post my hack to the public.

Attached as a file is a replacement for the MAKEDEV-like
script which can be found in contrib/ in the download
from Siano.  It tackles the following issues:

* eliminates the DOS-type line-endings, which did not
  agree with my flavour of /bin/sh
* attempts to figure out where the Siano library should
  be looking for its devices -- this is useful for the
  case where the desired major number 251 is already in
  use, and one has to specify a module load parameter
  (I think I've described this as best I could in an
  earlier message to linux-dvb)
* allows the user to specify the major and/or minor
  numbers given as module parameters
* unlinks potentially existing nodes in case of the need
  to recreate them with different major or minors

This is a total hack, and can be rewritten to probably
half the number of lines by anyone with a Clue, say,
using a for loop and simplifying my logic (note to future
employers:  look into my eyes, my eyes, not around the
eyes, you did not see this, you are suddenly interested
in the shiny toys on your desk)

So, feel free to improve on this, or to use it in place
of that supplied from the Siano ftp site.

> > > It was not hardware debugging needed, so it seems.  On

> > Or...  was it?  Not only with major 249 on the newer build,
> > but now, again with 249 on my notebook, I also see success.
> > 
> > Could it be that the USB device into which I plugged the
> > TerraTec Piranha caused the problems?  Maybe, because into
> > a different USB hub, I have success on the notebook...

> > Now, the interesting thing is that a USB2 DVB-S connected
> > through this same hub delivered streams that were corrupt
> > every few minutes, while the same device connected to a
> > different hub has been delivering flawless streams.  Now
> > I need to check whether the USB1 Piranha can deliver the
> > clean streams, or if again, cheap hardware will cause me
> > grief...

An update to this, in case it would be of interest...

After several attempts to tune potential if weak signals,
I once again reached the point where attempts to initialise
the device would timeout -- exactly what I had seen originally,
but this time after half a dozen successful attempts to use
it and at least get to the tuning stage.

So now I've moved the device to a different USB hub port,
and once again it's working fine.  How long will this last?

I still haven't tried it in the hub where my other DVB
device works flawlessly, but it may come to that...

> Cool, I'm just CC the ML
> I get questions (sometimes the exact same questions) from various of people. Lets use the ML to sync all...

Well, I hope that by making a fool of myself, I can post
this info so that others can benefit from it, and you
won't be bothered by these same questions.

In summary:

I've had success with DAB signals with the following:

The default_mode= module loading parameter works set to =2.

The firmware I've used is that which I downloaded some time
back as part of the DVB-T in-kernel siano support, and looks
-r-xr-xr-x 1 beer besoffen 40096 May 17  2007 /usr/lib/hotplug/firmware/tdmb_stellar_usb.inp

There are firmware files of different size on the Siano ftp
server, such as
-rw-rw-r-- 1 beer staff 38428 2008-12-31 16:26 tdmb_stellar_usb_12mhz_downld.inp
-rw-rw-r-- 1 beer staff 38720 2008-12-31 16:26 tdmb_stellar_usb_12mhz_eeprom_a2.brn

I have not yet done anything with these to see if these might
be a better choice.

If, like me, your `cat /proc/devices` is full, and major 251
is assigned to something else, when you go to load the siano
smsmdtv.ko kernel module, you will need to specify an alternate
major number (minor can also be specified, should you need)
smschar_major=249  (tweak as you need), for example.

You can give the major number as 0...
In this case, the first available major number will be
automatically assigned.  The script which I attach attempts
to find this, assuming `procfs' is available and mounted,
and does its best to create the proper devices.

Should that fail, you can optionally specify the major (and,
should you wish, the minor) as options to the script, which
should explain itself in the comments if you read it.

Here's hoping this is useful...
(followup as appropriate; /dev/null is where this should have 
barry bouwsma
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create_char_dev.sh
Type: application/x-sh
Size: 2267 bytes
Desc: Hacked version of contrib/create_char_dev.sh
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20090118/136f92a4/attachment.sh 

More information about the linux-dvb mailing list