TBS Input Devices Driver



A number of capture devices from TBS Technologies have a common setup process.

  • 1Open-source drivers
    • 1.1Building the Open Source Driver
    • 1.2Post-installation
  • 2Closed-source drivers
    • 2.2Troubleshooting

Open-source drivers

PCI device: Typical PCI cards used in PCs include: network cards, sound cards, modems, extra ports such as USB or serial, TV tuner cards and disk controllers. Historically video cards were typically PCI devices, but growing bandwidth requirements soon outgrew the capabilities of PCI. The TBS CROSSFIRE is a long range R/C link based on the newest RF technology, capable of self-healing two-way communications and range beyond comprehension. With a sensitivity of -130dB, full RF-side diveristy, tiny receivers for FPV quads, the TBS CROSSFIRE contains the most modern technology to provide a superior long range control link.

These instructions are inspired from Luis Alves' wiki and TBS' wiki on Github. Go to the later for latest official word on build procedure. You may want to consult the TBS' forum too, for additional advices in case of trouble.

The open-source driver does not currently support the remote control, but SD and HD reception is working and appears to be stable and quicker to change channels than the old TBS closed source version.As of 2014-11-27, this driver was tested with success with DVB-T transmitters in Europe. And DVB-T2 transmitters in United-Kingdom and France (only experimental DVB-T2 transmitters at Eiffel tower in Paris in France for UHD TV (AAC+HVEC)).

It does not currently support the TBS6205.


Building the Open Source Driver

Installing the build dependencies

You should make sure that you have the following tools installed on your compiling system:

  • lsdiff, included in the patchutils Debian package
  • ProcessTable, available with the libproc-processtable-perl Debian package

Otherwise, your build will fail at some stage.


From there, you have the choice between following the instructions for building Luis Alves' driver from here, or following the instructions for building TBS' forked driver from there. Both sets of instructions are very similar.


Buidling Luis Alves' driver

The open source driver of Luis Alves is available here.


Note: I failed to build Luis' driver but managed to build TBS', against a 4.15.0 kernel with Ubuntu 18.04 LTS. I would then recommend to start with TBS' forked driver first. Not sure if Luis is actively updating the open-source driver. --Golffies (talk) 17:49, 21 August 2019 (UTC)


Buidling TBS' forked driver

Tbs Input Devices Driver Device

The fork from TBS is available here.

Post-installation

Loading the modules

You should now unload/reload the modules manually or otherwise reboot the system.

  • Reload the module with CX23885 based cards:
  • Reload the module with SAA716x based cards:
  • The lazy way, just reboot:


Checking that modules loaded properly

The following examples are given for both CX23885 and SAA716x based cards.

  • For CX23885 based cards:
  • For SAA716x based cards:

Note : 'Capabilities' information are only show if you use the root account, else you will have 'Capabilities: <access denied>'.


You need to see the 2 following lines that show that the driver for the TBS TV card is loaded :

  • For CX23885 based cards:
  • For SAA716x based cards:


Checking that dvb adaptor nodes have been created

If the cx88_dvb or SAA716x drivers are loaded, the dvb adaptor nodes should now exist


In case you have the dvb-apps package installed, you can double check with the lsdvb tool.

  • Output example with a CX23885 based card:
  • Output example with a SAA716x based card:


Confirming the presence of the required modules in the kernel

We can see the driver modules needed by TBS TV card:

for SAA716x based cards: saa716x_budget, tda18212, cxd2820r...
for CX23885 based cards: cx88_dvb, av201x, tas2101..
  • Output example with a CX23885 based card:
  • Output example with a SAA716x based card:


Troubleshooting

If you find module load errors like 'module has wrong symbol version' means that there still are old modules from your previous media tree installation (usually duplicated modules in two different places). The brute-force approach is to simply do:

Other workarounds may be offered on the aforementioned authors' wiki pages on Github, and on TBS' forum, depending on specific problems reported by users.


Upgrading sources and re-installing

or

then

You should now unload/reload the modules manually or simply reboot.


Specific instructions to saa716x based cards owners

If your card uses the saa716x_budget kernel module, you need to set up the configuration options persistantly for it. Start with checkinh if the configuration has already been added using:

You will see something like this if it is:

If it is not there, create a file containing the config:

See also TBS_driver_installation#IRQ_Issues for module config of the closed source drivers.


Supporting the open-source driver

Any help that you can give to Luis or crazycat69 (another contributor to the project) through testing, patches or getting the driver merged into the upstream code will (hopefully) be appreciated.

Luis also has a donate link on github.


Closed-source drivers

Proprietary drivers are available from the TBS dtv website or TBS iptv website.

However, TBS advises to choose the open-source driver for each of the hardware supported by them.


Installing drivers

As of 11 September 2017, the latest version is 170330

Version 170330 compiles cleanly on gentoo linux kernels 'gentoo-sources-4.9.<x>'. gentoo-sources-4.11 and newer give missing symbols.


0. Download the drivers


1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip.


The directory tbs-linux-drivers will now contain README_* for various TBS-cards, check for your options (combinations of DVB-T/T2/S/C wil require various adjustments). The procedure below is a summary of those READMEs, as well as some hints/caveats. The directory will also contain linux-tbs-drivers.tar.bz2 which has v4l modules meant to be compiled out-of-tree from the kernel you are actually running. Source for your currently running kernel should be installed before attempting build. Search the files for the string 'uname -r' if you are not happy with that.


2. Extract linux-tbs-drivers.tar.bz2 archive


3. Change to driver package directory

We also need to correct some strange file & directory permissions.


4. Select platform architecture

This will rename arch-specific blobs to '*.o' so that the module-build will find them.

Input

for x86 kernel 3.x (x86 32 bit installations of kernel 3.x)

or for x86 kernel 2.6.x (x86 32 bit installations of kernel 2.6.x)

or for any x86_64 kernel (x86 64 bit installations of Linux)

You should then receive a message along these lines:


5. Build the driver.

Recompiles v4l for a wide range of cards, currently about 500; will take many minutes.

We're ready to build; add -j3 parameter for make command line for a faster build on a dual core machine, -j5 on a quad core machine, etc.

If you get -bash: make: command not found, then sudo apt-get install build-essential


6. Install driver. Existing drivers for other v4l related hardware, such as lirc could also get updated.


7. Load newly installed driver


8. Check it loaded correctly

You should get a message about tainting the kernel. This is fine.

Running dmesg | tail should end with something along these lines:

dvb adaptor nodes should now exist


Troubleshooting

Compilation problems

Did you select the correct platform in step 4 above?

During compilation:

Make sure you have the right C header files installed for your Linux kernel version.


Problems after kernel update

Some weeks later your /dev/dvb directory has disappeared? Perhaps your kernel was updated, and your machine rebooted. The driver needs to be recompiled.

Tbs Input Devices Driver Download

If you just run make, it will try to compile against the old kernel headers, so first run

Then go back to step 4.


Deleting media drivers directory to resolve conflicts

Some users have found that deleting the whole kernel media drivers folder (i.e. /lib/modules/`uname -r`/kernel/drivers/media ) and then compiling can resolve conflicts.

This process will fix issues resulting in 'disagrees about version of symbol dvb_frontend_detach' messages in the dmesg output.

Normally it should be enough to make sure that you recompile the tbs drivers after every kernel build.

Instructions for this can be found in the TBS forum. They are as follows:

  1. First remove the existing media modules:
    sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/media/
  2. Then reinstall the modules, following steps 3 and 6 above.


Compatibility with other cards

As noted above you should remove the kernel's existing media drivers before installing the TBS driver package, I omitted this step when installing the drivers and whilst the card worked fine (Mythtv 0.27/Debian 7) my other DVB-S2 tuner card would fail to initialize on start up. There were no obvious messages in the dmesg output indicating symbol issues, the card simply wouldn't work. Once I removed the media directory before installing the TBS drivers the card worked correctly. (The driver in the v4l tree used by the TBS drivers was actually a different name than the one in the Linux kernel I had installed).

Fighting with another tuner card in load order at boot time - See http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747. Additionally it's worth noting that the TBS drivers don't appear to support the 'adapter_nr' argument.

Fix UDEV problems :
Device nodes and character devices
Notes for configuring udev rules for em28xx USB capture card
Linux: howto avoid video devices getting mixed up after reboot, using udev rules
About udev rules
Statically Assign /dev Nodes to Hardware Devices in Linux
/dev/video0 problem


IRQ Issues

After an extended period the combined TBS driver may crash with messages (check using dmesg) such as:

This will render the device inoperable until rebooting (including IR receiver), meaning it won't be able to record anything.

This can be resolved by configuring the driver to use MSI instead of IRQ:

If you have a newer TBS card such as a TBS6905, or a mix of older and newer ones, then you need TWO lines in /etc/modprobe.d/tbs.conf:

See this TBS forum thread and this blog post for more details.


IR-receiver malfunctions

Some TBS devices have an infrared receiver, that may send spurious keypresses. They are hooked into the kernel as normal input (keyboards).

To disable the remote control edit /etc/modprobe.d/dvbt.conf to read:

And reload `dvb-usb`, or reboot.


Remap IR-remote keys

Another problem might be that the keypress received from the remote do not match your software. You can rewrite what keys the keypresses map to with `input-events`, `input-kbd`, `lsinput`.


Changelog

Old releases for drivers if you have problem with your kernel:

  • v151229
  • v141019 (2014-10-19)
  • v140707 (2014-07-07)
  • v140425 (2014-04-25)
  • v140323 (2014-03-23)
  • v140113 (2014-01-13)
  • v130927 (2013-09-27)
  • v130802 (2013-08-02)
  • v130506 (2013-05-06)
  • v121119 (2012-11-19)
  • v120617 (2012-06-17)
  • v120503 (2012-05-03)
  • v120412 (2012-04-12)
  • v120216 (2012-02-16)
Retrieved from 'https://www.linuxtv.org/wiki/index.php?title=TBS_driver_installation&oldid=36407'
-->

Every driver whose device objects belong to a particular device type (see Specifying Device Types) is required to support this request in a DispatchDeviceControl routine, if a set of system-defined I/O control codes (IOCTLs) exists for the type. For more info about IOCTLs, see Introduction to I/O Control Codes.

Higher-level drivers usually pass these requests on to an underlying device driver. Each device driver in a driver stack is assumed to support this request, along with a set of device type-specific, public or private IOCTLs. For more information about IOCTLs for specific device types, see device type-specific documentation in the Microsoft Windows Driver Kit (WDK).

When Sent

Any time following the successful completion of a create request.

Input Parameters

The I/O control code is contained at Parameters.DeviceIoControl.IoControlCode in the driver's I/O stack location of the IRP.

Other input parameters depend on the I/O control code's value. For more information, see Buffer Descriptions for I/O Control Codes.

Tbs Input Devices Driver Updater

Output Parameters

Output parameters depend on the I/O control code's value. For more information, see Buffer Descriptions for I/O Control Codes.

Operation

Tbs Input Devices Driver Vga

A driver receives this I/O control code because user-mode thread has called the Microsoft Win32 DeviceIoControl function, or a higher-level kernel-mode driver has set up the request. Possibly, a user-mode driver has called DeviceIoControl, passing in a driver-defined (also called private) I/O control code, to request device- or driver-specific support from a closely coupled, kernel-mode device driver.

On receipt of a device I/O control request, a higher-level driver usually passes the IRP on to the next-lower driver. However, there are some exceptions to this practice. For example, a class driver that has stored configuration information obtained from the underlying port driver might complete certain IOCTL_XXX requests without passing the IRP down to the corresponding port driver.

On receipt of a device I/O control request, a device driver examines the I/O control code to determine how to satisfy the request. For most public I/O control codes, device drivers transfer a small amount of data to or from the buffer at Irp->AssociatedIrp.SystemBuffer.

For general information about I/O control codes for IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL requests, see Using I/O Control Codes. See also Device Type-Specific I/O Requests.

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also