29 Aug 2010

When unstable is just not unstable enough

..It all started by having yet another look at the gir problem..... Keeping them up-to-date, and trying out the latest cool Gnome toys.

30 Oct 2009

Ubuntu release 9.10 a bit early

Looks like ubuntu released karmic today (as I guess they could not rename it 9.11).

I've been testing karmic for months, (which at times have been very painful - but if you join the beta ride, what else would it be), but in the last few weeks it looked like it was really coming together.

The only big regression was the synaptics touchpad resetting the 'tap' setting after suspend resume cycle.

However, there was a kernel update last week whichcompletelybroke suspend (it never really sleeps the machine), and attempts to report it via the apport tool result in a invalid message about the kernel not being a ubuntu one.. (which someone has reported)

I'd really suggest anyone requiring resume/suspend to work, to hold of for a little while until they sort out the remaining issues.

15 Mar 2009

ASUS My Cinema U3100 Mini DMB-TH - MythTV fully working

After months of being left on the side burner, I just got round to fixing Digital TV with the ASUS My Cinema and MythTV.

Having finally got the correct source code from ASUS a few months ago, I've gone through it and made it thread safe (get rid of the global locks). So you can use multiple sticks on a single PC. and got rid of most of the shutdown kernel panics.

The final fixes where related to the really bad locking code, that basically was failing too quickly and constantly changing the GI settings. The kludge I've done is to remove the flipping (as all of the HK channels are on GI_945). and this card only really works in HK & China.

This resolve the last issue of waiting for a lock to a signal taking over a minute to milliseconds. - Finally making the card usable in MythTv (as it doesnt really like really slow locking cards..)

Anyway, code is in my repo - I need to start thinking about syncing with v4l-dvb guys and finding out how to rename the files so they are not just overwriting the existing dib3000mc driver.

For your pleasure

ASUS My Cinema U3100 Mini DMB-TH Linux Driver for v4l-dvb

If you need frequency details have a look at my last post about the ASUS stick.

17 Nov 2008

ASUS My Cinema U3100 Mini DMB-TH - Partly working

These are my notes/ comments on getting it to work (partly), check the blog again every month or so to see if I ever get the thing working fully..

After leaving the Digital TV sticks lying around for a few months, I finally got back to looking at the issues with drivers. ASUS have been absolutely useless, and have ceased responding to all support requests. The Source code supplied on the site, and emailed to me directly appears to be the completely the wrong source code (based on comparisons using strings on the binary driver, I'll have more confirmation of this when I review the dmesg outputs as described below..)

Having given up on the source code, I decided just to see if I could get them to work in any way. We had a go with the Windows drivers on a PC at work, but did not really have much success (as I found out later, probably due to signal issues with the little antenna). But it did give me the idea of using virtual machines and running the EEEPC development kit. So here's the process so far just to test the cards. - details in the extended bit..

16 Jul 2008

Source code for ASUS My Cinema U3100 Mini DMB-TH

After a little wait (~ 3 weeks), having asked ASUS to provide me with the source code for the drivers to the DMB-TH Digital TV receiver, I finally got two tarballs of the source code. One step closer to an open source friendly solution to watch Digital TV in China and Hong Kong.

It took a little persuasion to convince the technical support team at ASUS that I was entitled to the source as it was based on GPL code, but once they understood, and had asked their supervisor/ R&D department about it. It was just a matter of waiting for the R&D dept to get time to do it.

I was very impressed with ASUS in general - their tech response times for product support where pretty amazing (usually answering within a few hours). If you have the option of buying ASUS, I can highly recommend their email tech support. Friendly, positive, and responsive.

The driver modifications are all to drivers/media/dvb/*, and consist mostly of 2 new files dealing with the demodulator, and a rather unfortunate hack at db3000mc.c - Basically replacing the core of that file with the routines for the Legend chip. Rather than creating a new file (which looks like it would have been a far better idea).

Anyway, I'm going to try building these changes against a recent kernel, then see if I can sort out the db3000mc mess. If anyone want's to help out, drop me an email and I can send you the files.

24 Jan 2008

Bluetooth GPRS via an A1200 and

After quite a bit googling and guesswork, I finally got my portable to connect via my Motorola A1200 to (unlimited GRPS). So here's the settings for reference (as most of the google results are not quite accurate).

for starters: /etc/bluetooth/rfcomm.conf
(you need to find out your bluetooth id - plenty of results if you google "bt grps howto's" )
rfcomm0 {
bind yes;
device ***device id here **;
channel 5;
comment "Alans phone";

you need to configure pairing - I think this is the one that worked
options {
autoinit yes;
security user;
pairing multi;
passkey "**MAKE UP A PASSKEY ***";

And now for the magical stuff.. (the was the magic bit that solved all the connection problems)
connect "/usr/sbin/chat -v -f /etc/chatscripts/people-connect"
user "ptc"
password "ptc"
/dev/rfcomm0 115200
kdebug 7

#remove if you want pon to run in the background
modem -detach

the chat script
'' ATZ
OK 'AT&f+cgdcont=1,"IP","","",0,0'
OK 'ATDT*99***1#'

This is disconnect (not really used it, but might help...)
SAY 'Starting GPRS disconnect script\n'
"" \K
"" +++ATH0

And hopefully when you do
#pon peoples
you get an internet connection from anywhere in Hong Kong..

29 Apr 2006

Mythtv xmltv importer for HK

Over the last few weeks, apart from a huge workload, I've been busy moving house - now living in the clouds 52 floors up..

Anyway, one of the important projects to get done for myself, was setting up mythtv on this server (my main web server doubles up as my PVR/video jukebox.)

Just some of the highlights of setting up mythtv
  • Radeon 9600SE All in wonder Card - TV in did not end up working (well, the card's quite good as a graphics card anyway, and it came with a usb remote control) so it was not a total loss..
  • Bought Haupage PVR500MCE - appears to work ok, although you have to be carefull with the TV arial cable to get good reception. (very nice card with 2 tuners built in.)
  • No way to get TV listings for Hong Kong Free to air channels - see later......
  • Display did not render chinese (which is what the channels guides come with) - ended up modifying the theme.xml / ui.xml in one of the theme's to use a chinese font -> that solves the schedule browser
  • have to use chinese font for osd display. (to display the active watched program)
  • Rewind / go back, and constant recording what you watch is really nice..
I had to write a small application to grab the listings for Hong Kong TV and output XMLTV format ->
see the svn files here
it's pretty simple to use, only requires the mbstring to be working. (usage instructions inside the php file.)

Unfortunatly, I still have quite a uphill battle to finish for the box, let alone thinking about all the other fun stuff I started recently, and have left in limbo due to moving house. Still todo on the box:
  • Sort out Remote key mappings for the ATI remote -> it's pretty messed up for almost all the features (TV/Video watching/EPG etc)
  • Autoripping of VCD/DVD's when inserted..
  • How to map autoripped VCD/DVD's into imdb for the video library
  • Add bigger disk ;)

08 Feb 2006

captcha death and mod_proxy mistakes.

The unfortunate thing about mod_proxy, is that it's a pain in the ass to set up correctly. Another one of the machines I work on had been using this to allow some remote access to a private box. Unfortunatly even though I had IP restricted access, I had obviously missed a setting somewhere. Looking at my logs the other day, I realized that apache was doing quite a trade in URLs...

Last time I misconfigured mod_proxy, my ISP had phoned me up to let me know there was spam eminating from my server, so I had re-configured mod_proxy and fixed the open proxy on that server. My guess is that the abusers of mod_proxy had concluded that such a direct attack (POST xx.xx.xx.xx:25 ... MAIL FROM ....) was rather self defeating, as ISP's tend just to block a server if it is shooting out lots of spam (or suddenly has high traffic outbound on port 25)

So I was supprised to see what was being requested from my open proxy. Captcha images!!!!!

Guessing from the referrer information, I think some guy in Bejing had come up with this idea:

- Set up an online game site, and make the users fill in a captcha to play the game.
- Except, the captcha actually comes from a free webmail provider, and the entered data enables them to set up new webmail accounts, and send out webmail.

I presume that doing that directly from their server caused them to get blocked pretty quickly from the webmail provider, so they just looked around for open proxies to solve the problem..

Quite smart in some respects, and I like the bit about on-line gaming to do this - lot's of kids like these on-line games, and dont think twice when they solve a captcha.. - Let's just hope that blog spammers dont get in on the act..

22 Sep 2005

mod_proxy as a spammer

I had a nice phone call today from my ISP, they let me know that my outgoing port 25 had been auto-blocked due to excessive traffic.

Agh, an instant chkrootkit indicated nothing scary, so I started digging into the reasons behind this. I have to say my local ISP Netfront, has world class service. Gary, who I was dealing with, was very co-operative, opened up port 25 so we could track down the problem. To be honest, I was amazed at the service where they actually called me to let me know they where blocking my service. I'm sure there are many a broadband fixed IP user who would envy this kind of service.

After chkrootkit failed to find anything and Gary had opened the port, I ran
#netstat -n | grep 25
tcp 0 0 myip:33236 someip:25 TIME_WAIT
This indicated a few outgoing connections on port 25, so I asked one of my collegues who thankfully knows linux better than me;) for ideas to track down what process was doing this.
#fuser 33236/tcp
33236/tcp: 25045
This indicated the process id that was causing the connection, and now down to good old ps
#ps auxw | grep 25045
www-data 25045 ...... /usr/sbin/apache2 -k start -DSSL

Agh - Apache was causing port 25 connections. - My first thought was some horrific mistake I made with my PHP code, but a quick look through the apache log files indicated that my suspicions where not quite correct. the apache log file had rather a large number of these.. - from various ip addresses. - - ... "POST HTTP/1.1" 200 ..
At this point I started to suspect the reverse proxies on my server (especially as I had set it up again recently on another server and had to deal with the default config there)

My debian based install had a file in apache2/mods-available called proxy.conf, which I had not copied to apache2/mods-enabled. I had only copied the proxy.load file.

In this file, was the critical section.
        <Proxy *>
Order deny,allow
Deny from all
#Allow from
This blocks all access to the proxy, So after adding this file, to enable my old reverse proxies, I had to add sections like this to open a few specific proxies
        <Proxy http://devel/>
Order allow,deny
Allow from all
The only problem I had was that my php5 server was running on port 81, and this config failed to allow access via the reverse proxy.
#this doesnt work?!!!
Order allow,deny
Allow from all
Anyway, at least I'm not a spammer anymore..

10 May 2005

to 64bit or not.., and new office

As things have been getting busier here, I've started partnering up with a friend to provide better service to my consulting clients. It already has quite a few benefits
  • A nice desk in an office, use of all the usual office facilities.
  • Other programmers to bounce ideas off of, (rather than just irc...)
  • Possibility to offer bigger projects, or charge more ;)
  • I can farm out alot of the re-installing, virus cleaning, PITA Windows jobs..
You can see more about my partners at their web site:, while mainly a MS/ASP/.NET shop, part of my involvement is to raise their skills and knowledge of Linux and PHP. Along with helping out on the linux based on-site maintenance. (and maybe remove the flash movie from their splash page.)

As part of this move, I really need to build a proper desktop workstation. The easy bit of which is deciding to go for 2 19" monitors, as having started using dual monitors, I would never return to single ones for developing. But the bigger problem comes with deciding the machine architecture.

Starting with the extensive range of motherboards, with weird and wonderfull built in hardware. I need to work out how compatible the one I chose will be. Then there is the other big choice, to 64bit or not... These are some random thoughts the matter
  • Is there a huge difference of speed in the AMD64 (I know it's a bit faster, but is it huge enought to compensate for the other issues)?
  • Is running AMD64 as a 32bit system going to be less painfull (no chroot enviroment for open office etc.)?, or does this just defy the point... (although the thought of firefox64 not running flash is quite attractive - visting to see why..)
  • I was concerned about having to upgrade to 2.6 kernels, but it looks like someone fixed davfs2 for 2.6 (which I critically depend on.)
  • Is it worth trying out gentoo or are the debian-amd64 packages fast enough?, or is it going to be as annoying as freebsd?, long install times, no synaptic? (I guess it wont have gnome cvs build nightmares like freebsd.. - autoconf tools for gnome doesnt work correctly on it.) - does it solve the open office issues..
  • how well sync'd is debian's amd64 port, the sparc64 install I've done seems a little outdated at times, compared with the intel boxes..
The motherboard choice is even more confusing, this gives you an idea of costs and availability of hardware in Hong Kong and I managed to find a debian motherboard compatibility list, although It looks like one of those 'trying to hit a moving target' tasks, as the list of available motherboards changes every month..

I suspect either an Abit or a Gigabyte might be the way to go, as they are pretty common here, but I'm totally confused about the motherboard graphics card integration, - It looks like the onboard graphics card is going to be useless for dual head dvi monitors. So I probably need a nVidia professional, but even that decission looks complex..

Such a pain the backside picking all this stuff, I kind of wish someone would do all the deciding for me, and deliver it at my door. But unfortunatly since I'm one of the better linux experts in Hong Kong, that doesnt leave the door open to finding anyone who could do this properly.... And if started offering this service (it's unfortunatly pretty easy for the competition to copy ...)

- mind you, if you do want a custom linux box designed and delivered in Hong Kong.. give me a call, and I'll quote a consulting fee to design it.. The hardwares probably less than HK$5K, so comparing that to a baddly spec'd dell box, theres still a saving of at least HK$7K in fees' for designing the bugger..
   (Page 1 of 3, totalling 28 entries)    next page »