Thursday, March 17, 2011

Building driver for AverMedia A827 on Linux kernel 2.6.38

Vendor: AVerMedia
Product: AVerTV Hybrid Volar HX
Model: A827

This is a Analog+DVB-T USB TV receiver with official support for Linux up until 2009-11-26. The latest driver can be downloaded from the product page above.

The "Normal" automatic process of installing the driver fails for 2.6.38 kernel. Using the "Expert" process to extract the driver source code to a selected location allows one to compile the driver manually and track down the problems. First, the function calls for mutex initialization are gone and should be replaced with those of semaphore initialization. Second, the Teletext support is also gone and should be eliminated from the driver source code. These fixes are summarized in this patch.

However, compiling the driver with "make" results in the WARNINGs that the symbols "param_array_get" and "param_array_set" are undefined. This is due a prebuilt object file, "aver/osdep_dvb.o_shipped", that was built with an older version of kernel. Building this file requires some internal header files from kernel source tree that are not normally available in, e.g., linux-headers or kernel-headers packages. Provided that the kernel source tree for building the running kernel is installed/available in the system, the shipped object file can be removed. After this, the "make" command can complete without incidence. Installing the drivers ("averusbh826d.ko"  "h826d.ko") to the module directory, e.g., "/lib/modules/2.6.38/kernel/drivers/media/dvb/dvb-usb" and updating the module dependency with "depmod -a", the adapter seems to work normally afterwards.

Saturday, February 26, 2011

Straightforward

We make a choice. We stick to it. We can modify it. We can change it. But, we should never forget about it.

Monday, January 17, 2011

Addiction is the lost of ability to move on

Life is a tour of the world. You come without any preconception and build up a mind of yourself. You travel through time and space, through different stages of growth and experience. And when the time comes for you to leave, you leave with nothing but your mind. Just like for any tour, moving on is just as important as moving in. If you can not, the tour will still end wherever you are.

Sunday, October 24, 2010

Discipline

Mental discipline is much harder to adhere than physical discipline. However, it's the essential drive to a higher altitude in the cruise of life.

Monday, October 11, 2010

Setup isatap router on debian

The ifupdown package on Debian does not support isatap as a mode for v4tunnel. Therefore, one can not simply create a single entry in /etc/network/interfaces to make it work. Anyhow, following are the steps I took to set it up.
  1. Install iproute and radvd
  2. Add "net.ipv6.conf.all.forwarding=1" to /etc/sysctl.conf
  3. Add /etc/radvd.conf containing:
    interface is0
    {
        AdvSendAdvert on;
        UnicastOnly on;
        AdvHomeAgentFlag off;
        prefix 2002:aaaa:bbbb:1::/64
        {
            AdvOnLink on;
            AdvAutonomous on;
            AdvRouterAddr off;
        };
    };
    (replace "2002:aaaa:bbbb:1" with the prefix of your ipv6 subnet)
  4. Since I have my default address connected to a 6to4 tunnel on my eth0 already, I need to add an additional ip4 address to eth0. In /etc/network/interfaces I add the following post-up, and pre-down scripts to eth0:
    post-up ip tunnel add is0 mode isatap local 192.168.1.12 ttl 64
    post-up ip link set is0 up
    post-up ip addr add 2002:aaaa:bbbb:1::5efe:192.168.1.12/64 dev is0
    post-up ip addr add 192.168.1.12/32 dev eth0
    pre-down ip addr del 192.168.1.12/32 dev eth0
    pre-down ip link set is0 down
    pre-down ip tunnel del is0
    (again replace "2002:aaaa:bbbb:1")
  5. Restart the computer or do the following:
    $ sysctl -p
    $ ifdown eth0
    $ ifup eth0
    $ invoke-rc.d radvd start
On the client side, I just installed isatapd, added
ISATAP_ROUTERS="192.168.1.12"
to /etc/default/isatapd, and restarted with "invoke-rc.d isatapd restart". Then, everything works!

Monday, July 19, 2010

Trap

Rudimentary are things that can get us stuck. If we can not have them scaled with ease, how are we going to navigate more intricate endeavor. Methodical is the approach...

Wednesday, June 2, 2010

Non-interactive ssh password auth

There are situations where only password authentication is allowed on a remote SSH server. And, it may be desirable to have non-interactive password entry even under interactive terminal sessions, e.g., running git, rsync, etc. through ssh. However, OpenSSH makes this difficult by requiring interactive keyboard entry whenever there is an associated tty to the process. While it is possible to bypass this with an expect script, the easiest solution is sshpass.