Sunday, November 10, 2013

Geniatech DVB-T2 Stick T220 for OpenELEC on Raspberry Pi

Linux kernel 3.14 and later is support Geniatech DVB-T2 Stick T220 Driver.

Current version of OpenELEC support it.

Raspberrypi kernel source code

If you use OpenELEC, current firmware (version 4.0.x and later) is support this device.

See on

Below for old firmware (OpenELEC version 3.xx).

OpenELEC have not Geniatech DVB-T2 Stick T220 Driver.
I want to use DVB-T2 on OpenELEC with tvheadend.
I try to extract Geniatech DVB-T2 Stick T220 driver from CrazyCat
And create patch file for patch in OpenELEC.

Download : Geniatech DVB-T2 Stick T220 driver patch file

First Step.
Get OpenELEC Source.
(More Information see on Building and Installing OpenELEC for Raspberry Pi on Wiki)
git clone git://
After get OpenELEC Source.
Download t220 driver patch file and Extract zip file.
Copy linux-215-t220-new.patch file to<kernel version>/linux-215-t220-new.patch
Build OpenELEC image.
PROJECT=RPi ARCH=arm PVR=yes make release
After build image finished.
Image created on path.
Install image to SDCARD for Test.

Geniatech DVB-T2 Stick T220 for Raspbian

Linux kernel 3.14 and later is support Geniatech DVB-T2 Stick T220 Driver.

Current version of Raspbian support it.

Raspberry PI kernel source code

Below for old kernel.

I try to find driver for Geniatech DVB-T2 Stick T220 on Raspbian.
On product website. It's not have driver for linux.
I found driver on this website.
Source Driver from CrazyCat
I test compile and install modules.
Now It's work for me.

And I try change some code on file dw2102.c for raspberry pi kernel code for t220 driver.
Raspberry PI Kernel source and recompile for test it.
Now It's work for me.
I upload source code and kernel module for this developer and product user on below link.

T220 Driver Kernel Module (New) (Update 2013/11/08)
How to install driver new module (I compile on kernel 3.6.11)
  1. backup original driver (/lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/dvb-usb-dw2102.ko)
  2. backup original driver (/lib/modules/3.6.11+/kernel/drivers/media/dvb/frontends/cxd2820r.ko)
  3. backup original driver (/lib/modules/3.6.11+/kernel/drivers/media/common/tuners/tda18271.ko) 
  4. extract (I will found cxd2820r.ko, tda18271.ko and dvb-usb-dw2102.ko)
  5. sudo rm -f /lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/dvb-usb-dw2102.ko 
  6. sudo rm -f /lib/modules/3.6.11+/kernel/drivers/media/dvb/frontends/cxd2820r.ko 
  7. sudo rm -f /lib/modules/3.6.11+/kernel/drivers/media/common/tuners/tda18271.ko 
  8. sudo install -c -D -m 644 -c dvb-usb-dw2102.ko /lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/ 
  9. sudo install -c -D -m 644 -c cxd2820r.ko /lib/modules/3.6.11+/kernel/drivers/media/dvb/frontends/ 
  10. sudo install -c -D -m 644 -c tda18271.ko /lib/modules/3.6.11+/kernel/drivers/media/common/tuners/ 
  11. sudo /sbin/depmod -a
T220 Driver Kernel Module (Old)
How to install driver module (I compile on kernel 3.6.11)
  1. backup original driver (/lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/dvb-usb-dw2102.ko) 
  2. extract (I will found dw2102.c and dvb-usb-dw2102.ko) 
  3. sudo rm -f /lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/dvb-usb-dw2102.ko 
  4. sudo install -c -D -m 644 -c dvb-usb-dw2102.ko /lib/modules/3.6.11+/kernel/drivers/media/dvb/dvb-usb/ 
  5. sudo /sbin/depmod -a
Now it's complete for install module.
For compile kernel module replace dw2102.c replace on <kernel path>/drivers/media/dvb/dvb-usb/dw2102.c

Automount NTFS Filesystem with usbmount on plug-in USB Storage Devices

First step. Install usbmount package on Raspbian with below command
sudo apt-get -y install usbmount fuse ntfs-3g
After install usbmount package.
Problem about default configure of usbmount.
It cannot automount NTFS Filesystem.
Modify configure of usbmount for mount NTFS Filesystem on /etc/usbmount/usbmount.conf with Editor. 

Find this line
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
Change to
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk"
And Restart OS for force take effect.
sudo shutdown -r now
Finish Step.
Test plug-in USB Storage Devices with NTFS Filesystem.
It can automount on /media/usb0
For change default path of automount usb devices (/media/usb<number>)
Modify /etc/usbmount/usbmount.conf with Editor again.

Find this line
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3 /media/usb4 /media/usb5 /media/usb6 /media/usb7"
It can change to other location, if you want.
Sequence of mountpoint left to right.

device 1 -> /media/usb0
device 2 -> /media/usb1

If it don't umounted usb device and unplug it, mountpoint is not umount.
It cannot use this mountpoint on other device.
Please umount mountpoint before unplug usb device.