Category Archives: Computers

Home Assistant in a Docker container

I’ve managed to move my current Home Assistant install from a python virtual environment to Docker. This will allow me to upgrade the host operating system or move to a new computer without too much difficulty. The most difficult thing … Continue reading

Posted in Computers | Leave a comment

Power monitor update

Well after setting the original system up it only lasted 4 days before the battery went flat. It appears I shouldn’t leave the radio on all the time on the remote node otherwise it chews through the battery very quickly. … Continue reading

Posted in Arduino, Computers, JeeNode | Leave a comment

Home Power Monitor

I’ve wanted to do a home power monitoring project for some time. I was using a Clipsal Cent-a-meter a while ago to track power usage when I lived in Victoria but I didn’t have much luck with the newer model. … Continue reading

Posted in Arduino, Computers, JeeNode, Personal | 2 Comments

MythTV Dynamic Range Equalisation

I found this on the net recently after trying to work out how to fix problems watching movies with very low dialogue volume levels and loud sound effects: http://blog.trenchcoatsoft.com/2009/11/mythtv_volume_leveling.html After following the instructions I am now able to watch all … Continue reading

Posted in Computers, Movies | Tagged , | Leave a comment

Converting from Drupal to WordPress

Well after looking at this site I modified the existing Drupal database to remove all references to the img_assist module. What a pain in the arse that module is, there is no way to easily migrate away from it so … Continue reading

Posted in Computers | Tagged , | Leave a comment

Awesome project

http://vimeo.com/timoarnall/light-painting-wifi

Continue reading

Posted in Computers | Tagged | Leave a comment

Scribefire and Drupal

Getting ScribeFire and Drupal work together | Bulahema Workshop

There isn’t much to this but still I think it is worth linking to. If you need to get ScribeFire and Drupal working together this is it.

Continue reading

Posted in Computers | Tagged , | Leave a comment

Mantis drivers

This is from www.verbraak.org/wiki/index.php/Linux_Mantis_driver but his site seems to be down a lot so I have mirrored it here because I am trying to get my 1034 card to work with Linux.

 

Linux Mantis driver

From My Interesting Version

Jump to: navigation, search

Currently the Mantis chipset driver for linux is in Alpha state.

This Mantis chipset is used on DVB board for reception of DVB-T, DVB-S, DVB-S2, DVB-C signals.

In this small Howto i explain how I got the mantis driver up and
running in my vanilla linux kernel.
I had to do it in this way because I also own two Hauppauge PVR cards
(PVR-350 and PVR-150) which do not work well with the mantis module.

This example has been tested with linux kernel source 2.6.22
and the ivtv driver from the linuxtv.org hg reposititory and the one
included in the kernel on a Fedora Core 6 setup.

WARNING: IVTV 0.10.3 and Mantis and kernel 2.6.21 and up do not work together.
From kernel 2.6.22 the ivtv module is part of the kernel and you do not need to download it from the ivtvdriver.org website.
To get ivtv and the mantis working in kernel 2.6.21 and up you need to add extra module parameters to the saa7115 module. 
See the instructions at the end for this.

[edit] Following steps you need to take (short ways for kernel 2.6.23.1):

  • Download the patch file for kernel 2.6.23.1.
  • use your current kernel or take a kernel source tree from http://www.kernel.org. Make sure you have the kernel headers/sources files/packages installed and you have the kernel up and running.
  • Apply the patch.
#> cd <path to kernel source>
#> patch -p1 < <path to mantis-2.6.23.1.patch file>/mantis-2.6.23.1.patch
  • Activate the mantis modules in your kernel config. Answer yes to the Mantis parts.
#> make oldconfig
  • Compile.
#> make
#> make modules_install
  • When you use your current kernel sources do load the modules
#> modprobe mantis
#> dmesg | grep -i dvb
found a VP-1034 PCI DVB-S/DSS device on (02:05.0),
DVB: registering new adapter (Mantis dvb adapter).
mantis_frontend_init (0): Probing for MB86A16 (DVB-S/DSS)
mantis_frontend_init (0): found MB86A16 DVB-S/DSS frontend @0x08
DVB: registering frontend 0 (Fujitsu MB86A16 DVB-S)...

[edit] Following steps you need to take (long way for kernels 2.6.21 and up):

  • use your current kernel or take a kernel source tree from http://www.kernel.org. Make sure you have the kernel headers/sources files/packages installed and you have the kernel up and running.
  • Get the mantis dvb source tree from http://jusst.de/hg/mantis/archive/tip.tar.bz2
  • Copy the directory <path to mantis
    tree>/linux/drivers/media/dvb/mantis to <path to kernel
    source>/drivers/media/dvb/
  • Add the following three lines to the file <path to kernel
    source>/drivers/media/dvb/Kconfig. Add them before the last entry in
    this file.
comment "Supported Mantis Adapters"
depends on DVB_CORE && PCI && I2C
source "drivers/media/dvb/mantis/Kconfig"
  • Add the following option "mantis/" to the file path to kernel source>/drivers/media/dvb/Makefile. It should look like this
#
# Makefile for the kernel multimedia device drivers.
# 
obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ cinergyT2/ dvb-usb/ pluto2/ mantis/
  • Copy the files <path to mantis
    tree>/linux/drivers/media/dvb/frontends/mb86a16* to <path to
    kernel source>/drivers/media/dvb/frontends
  • Copy the files <path to mantis
    tree>/linux/drivers/media/dvb/frontends/cu1216* to <path to
    kernel source>/drivers/media/dvb/frontends
  • Add the following lines to the file <path to kernel source>/drivers/media/dvb/frontends/Kconfig just after the config DVB_TDA10086
config DVB_MB86A16
tristate "Fujitsu MB86A16 based"
depends on DVB_CORE && I2C
default m
help
A DVB-S/DSS tuner module. Say Y when you want to support this frontend.
config DVB_CU1216
tristate "Philips CU1216 tuner based"
depends on DVB_CORE && I2C
default m
help
A DVB-C tuner module. Say Y when you want to support this frontend.
  • Add the following two lines to the file <path to kernel source>/drivers/media/dvb/frontends/Makefile
obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
obj-$(CONFIG_DVB_CU1216) += cu1216.o
  • Change in the file <path to kernel
    source>/drivers/media/dvb/frontends/cu1216.c line 37 to look like
    this (ignore the line numbers)
     34 #include <linux/slab.h>
35  
36 #include "dvb_frontend.h"
37 #include "../mantis/mantis_core.h"
38 #include "cu1216.h"
39 #include "cu1216_regs.h"
  • You can now compile your kernel in the normal way and install
    the modules. If you wish to make sure the Mantis modules have been
    selected do a make menuconfig
#> cd <path to kernelsource>
#> make menuconfig
#> make
#> make modules_install
  • When you use your current kernel sources do load the modules
#> modprobe mantis
#> dmesg | grep -i dvb
found a VP-1034 PCI DVB-S/DSS device on (02:05.0),
DVB: registering new adapter (Mantis dvb adapter).
mantis_frontend_init (0): Probing for MB86A16 (DVB-S/DSS)
mantis_frontend_init (0): found MB86A16 DVB-S/DSS frontend @0x08
DVB: registering frontend 0 (Fujitsu MB86A16 DVB-S)...
  • Check the output of the dmesg command to see if the mantis modules loaded. Sometimes a reboot of the system is needed.
  • IMPORTANT: For kernels 2.6.21 and below the order in which you do the installations is also important. Every time you perform a make modules_install for the kernel you need to do the make install for the ivtv driver as well.


To get the Hauppauge cards working do the following:

#> tar -zxvpf ivtv-0.10.5.tar.gz
#> cd ivtv-0.10.5
#> make; make install
#> cd /lib/firmware
#> wget http://dl.ivtvdriver.org/ivtv/firmware/firmware.tar.gz
#> tar -zxvpf firmware.tar.gz
  • Load the ivtv modules:
#> modprobe ivtv
#> dmesg | grep -i ivtv
ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.10.3 (development snapshot compiled on zo 20 mei 2007 08:57:55 CEST) loading
ivtv:  Linux version: 2.6.21.1 SMP mod_unload PENTIUM4 4KSTACKS 
ivtv:  In case of problems please include the debug info between
ivtv:  the START INIT IVTV and END INIT IVTV lines, along with
ivtv:  any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected Hauppauge card (cx23415 based)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02060039
ivtv0: Decoder revision: 0x02020023
ivtv0: Autodetected Hauppauge WinTV PVR-350
tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
saa7127 1-0044: saa7127 found @ 0x88 (ivtv i2c driver #0)
msp3400 1-0040: MSP4418G-A2 found @ 0x80 (ivtv i2c driver #0)
ivtv0: Registered device video0 for encoder MPEG (4 MB)
ivtv0: Registered device video32 for encoder YUV (2 MB)
ivtv0: Registered device vbi0 for encoder VBI (1 MB)
ivtv0: Registered device video24 for encoder PCM audio (1 MB)
ivtv0: Registered device radio0 for encoder radio
ivtv0: Registered device video16 for decoder MPEG (1 MB)
ivtv0: Registered device vbi8 for decoder VBI (1 MB)
ivtv0: Registered device vbi16 for decoder VOUT
ivtv0: Registered device video48 for decoder YUV (1 MB)
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
ivtv:  ======================  NEXT CARD  ======================
ivtv1: Autodetected Hauppauge card (cx23416 based)
ivtv1: loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
ivtv1: Encoder revision: 0x02060039
tuner 2-0043: chip found @ 0x86 (ivtv i2c driver #1)
tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #1)
ivtv1: Autodetected Hauppauge WinTV PVR-150
ivtv1: reopen i2c bus for IR-blaster support
tuner 2-0043: chip found @ 0x86 (ivtv i2c driver #1)
tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #1)
cx25840 2-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #1)
ivtv1: Registered device video1 for encoder MPEG (4 MB)
ivtv1: Registered device video33 for encoder YUV (2 MB)
ivtv1: Registered device vbi1 for encoder VBI (1 MB)
ivtv1: Registered device video25 for encoder PCM audio (1 MB)
ivtv1: Initialized Hauppauge WinTV PVR-150, card #1
ivtv:  ====================  END INIT IVTV  ====================
  • Check the output of the dmesg command. Sometimes a reboot is needed.

When you are using kernel 2.6.21 and higher ivtv and mantis will
nog work together. Depening on which module loads first the mantis
module will freeze.

To resolve this problem you will have to add extra module parameters to the saa7115 module.
Do the following to determine the values for the module parameters:

  • Get i2c bus number used by the Mantis driver.
#> modprobe i2c-dev
#> i2cdetect -l
i2c-3   i2c             ivtv i2c driver #1                      I2C adapter
i2c-2   i2c             ivtv i2c driver #0                      I2C adapter
i2c-1   smbus           Mantis I2C                              SMBus adapter
i2c-0   smbus           SMBus I801 adapter at 0400              SMBus adapter
  • The i2c bus used by the Mantis driver is bus 1 (see i2c-1 part) in this example.
  • Add the following line to your /etc/modprobe.conf
options saa7115 ignore=1,0x25,1,0x24,1,0x21,1,0x20
  • Replace all the 1’s (one’s) with your i2c bus number leave the hexadecimal numbers intact.
  • Now reboot your machine and both the mantis and the ivtv modules should load without a problem and work without a problem.

Continue reading

Posted in Computers | Tagged , , | Leave a comment

Upgrading Drupal from 5.7 to 6.1

Well it took a while but I managed to get all three sites updated to Drupal 6.1. Riscy.biz and gonetogove.com actually have less features now than they did before because not all modules are up to 6.1 yet. I am also running patched versions of TinyMCE and Image Assist modules just to get by.

The biggest problem was that the update doesn’t work properly. DO NOT UPGRADE TO 6.1 WITHOUT A DATABASE BACKUP. I hosed Riscy.biz and Gonetogove.com because of this and had to restore an old database backup. Make sure you have a full backup first.

The problem is the migration of the image, file and node tables into the new format. The normal upgrade doesn’t care about the image module and removes an essential field.

I posted the details here:

This issue is caused by the upgrade procedure deleting the nid field
files table before the image module update has a chance to get to it. I
spent most of this weekend working this out. What you need to do (make
sure you have a database backup) is to get ready for the upgrade to 6.1
then when you run update.php, click on the select versions button and
set all of the modules to 'No updates available' except for image
module. You will get lots of errors but now you can run update.php
again but this time you need to go and select the earliest version 6 update for all modules except image.

If you need more details just leave a comment and I’ll get back to you.

Continue reading

Posted in Computers | Tagged | Leave a comment

Company of Heroes – Carentan

This is by far my favourite mission in Company of Heroes. Mainly because the computer is actually a challenge and the Axis use artillery and tanks. Initially you don’t have any tanks and this makes the battle pretty exciting.

You start the mission with 2 units of paratroopers and four units of engineers. Two engineer units are inside your bases (the church at the bottom and the main HQ in the square). Get them out and put them to work.

 

You can use the engineers to put some sandbags down in front of the bridges.

Because it takes time to make the defences you need to do a few things at the same time

Use the paratroopers to go over the river and capture the two points. Be careful with the right hand point there is a sniper covering the point. I use the jeep and a paratrooper unit.

Use the troops to throw a grenade over the wall and hit the German squad.

 

The use the jeep to attack the sniper in the building while you sprint your troops and throw a grenade in the window (the example shown below isn’t very successful because I lost a couple of guys to the sniper.

 

The other sniper is on the other side in the building shown below:

Capture the two points and fortify them as usual. Now build another unit of troops. They will be used to man two Anti-tank guns. They are located:

and here:

Move them across the river to the two points you just captured. I try and make a defence similar to the one below:
 

The sandbags provide you with some cover. There is a MG there to pick up. You can build a MG nest as well to cover you if the enemy soliders get too close.

Make sure you cover the flanks. The other point defence should look similar to this:

MG in the house, wire and sandbags to help cover. The anti-tank gun works well in this spot. I cover the flank of this spot with a MG nest and wire to stop the enemy from moving around behind:

I put a few paratroopers around each flag, upgraded with anti-tank weapons (either found or upgrades). Now you should be mining the bridges:

This will take out a few tanks after your troops over the river are wiped out (yes sorry but they will be killed) . Create some traps for infantry and tanks like below:

 

MG for the infantry and anti-tank gun. When you have run out of time the Germans will spawn on the edge of the map. To get a good look at them I have two snipers each told to hold their fire and invisible. Put them in a spot where they won’t be too close to the action but gives your troops advance warning of their location. This works very well with the anti-tank guns. You can also use the off map artillery to wipe out tanks and infantry:

 

The battle will be pretty hectic, they will have heaps of tanks, mortars, and engineers with flame throwers. They don’t have any more snipers (thank goodness). You need to keep these two points for as long as possible. At each point I had a sniper, three para squads and engineers with flame throwers and a MG nest and a MG unit.

 

The Germans spawn on the edge of the map. You can be pretty nasty on the right hand side and have units camping their spawn 🙂

Eventually they will overwhem you. The get a mass of troops and stuff moving forward and not stopping. This happens after they bomb the crap out of everything and blow up the HQ. The voice over tells you to fall back to the church. This is the signal to build up some defences there for the last stand. Keep troops up forward to get more kills so you can get closer to the 250 mark

You need to have at least two or three anti-tank guns. A MG in the church is handy, three or four paratroop squads with anti tank guns.

Flank around behind tanks using buildings to get the rear armour shots:

Place a MG nest here to cover the sides.

 

You have to hold out for a while before Able company comes to help. As soon as this happens move a tank that spawns to each of these locations. Go straight there and don’t worry these tanks take almost no damage for some reason:

Another tank here:

Another tank here:

Do this because the Germans are going to retreat and this takes some potential targets away. You need to cover all the escape routes. Once the tanks are in place move your infantry forward to flush out the enemy. DO NOT KILL ALL THE TANKS. As soon as all the tanks are killed the mission ends. You need to keep at least one alive so you can flush out the infantry for kills. Take back all the points so you have enough points for grenades and upgrades etc. Your population will probably be over the cap of 70 so no new troops for you. Use a invisible sniper to spot the Germans.

Push the Germans out like in the pic below into the range of your tanks. Easy kills!

If you didn’t take out this sniper earlier, do it now. Another kill!

 

Use a sniper to take out infantry because tanks will just want to blow up the German tanks and possibly end the mission too early.

 

 

Continue reading

Posted in Computers | Tagged | Leave a comment