Thursday, August 28, 2008

Getting X-wrt working on a Linksys WRT54GL

To install X-wrt, it requires OpenWrt to be installed first. I installed OpenWrt white russian, as it seems that X-wrt is still under development for Kamikaze. I followed instructions on their site, downloading the correct firmware and uploading it to my router. Much to my surprise, it didn’t loose any of the settings I had set in my router, including it’s IP address.

Then, to get X-wrt working, was a bit more of a challenge. The recommended way to install it does not work, as it says to go to an auto install page on the X-wrt website, which seems to no longer exist.

So, I tried the command line way, which is supposed to be:

ipkg install http://ftp.berlios.de/pub/xwrt/webif_latest_stable.ipk

However, this will fail, as it depends on some packages not in the available software list.

The solution to this is to add the following to /etc/ipkg.conf

src xwrt ftp://ftp.berlios.de/pub/xwrt/packages

Then run ipkg update. After doing this, the first command to install X-wrt worked ok for me.

X-wrt seems to have more features than the default linksys firmware, and a much easier way to administer it, so I am so far, fairly happy with it.

Tuesday, August 12, 2008

Today my bluetooth adapter turned up today, after ordering it from trademe. With much anticipation, I plugged in into my Mandriva 2008.1 laptop, and after installing the bluetooth tools and kbluetooth, could see other computers and

phones, and connected to my phone by obex and downloaded the photo’s from it. However, what I purchased it for was to use the internet over my phone, via GPRS. I first tried this on my Eee PC, as that’s the first computer I wanted to use it with. I friend at work had got it going a few days ago, so I figured it can’t be too hard.. although it did take him quite some time.

Tonight must have been my lucky night, because I ended up fixing my sisters Eee PC, and while I was looking around, bumped into a script from 3eportal for the Eee PC that automatically configure it for GPRS. It consisted of a deb, which didn’t work. But, it worked enough, that I could make it work. It put an icon on the desktop, and ran a config script. The script had some issues, as it didn’t actually work in places, but I could see what it was trying to do. What it did was startup bluetooth, find my phone, ask me for a passkey for pairing, then configure /etc/bluetooth/hcid.conf and /etc/bluetooth/rfcomm.conf. It then asked for an APN and configured a GPRS dialup script that came with it. It asked me to pair my phone with the laptop, and tried to add the services to be started, in the Eee PC’s /usr/sbin/services.sh script.

The item it added on the menu was a simple toggle icon, that would run pon 3egprs or, if it was running, would run poff 3egprs. It also added the config script to the menu, which is not that brilliant, because if you run the config script again, it makes the same changes twice to some files, which will cause breakage. If I get time, I’ll submit a patch for it.

After getting this all configured, it worked! I was pretty surprised, but it just started working very well. The tricky bit was getting my phone to bond with the laptop, which I found was just me not driving the phone correctly.

Tomorrows task. Make it work with Mandriva.. which should be easy now I know what files to edit. Does anyone know of an automatic script to configure GPRS over bluetooth with Mandriva? Maybe I should port this deb to an RPM.

UPDATE: I've found the Mandriva way, via drakconnect, and it works.. with some effort.. next post will cover what I found. Thanks for the comments.

Monday, August 11, 2008

Mandriva 2009 Beta 2 - KDE 4.1 thoughts and comments

I recently downloaded the Mandriva 2009.0 beta 2 KDE 4.1 live cd.

I kept of list of things I found as I had a look around it.  I only focused on the desktop.

  • Cacert.org certificate not installed on live CD :(
  • Konquror missing
  • Seems to have a beta Nvidia driver. Worked fine.
  • 3D performance was mixed, with it not feeling as smooth as compiz fusion with KDE 3.5 does.
  • Same old compiz oddities, like resizing a window when wobbly windows turned on is slow / does not redraw as it’s being resized.
  • Firefox and Firefox 3 both on live CD, except, on menu, one shows as “Mozilla firefox” and one as “Firefox web browser”. It would be better to have the version number to tell the difference
  • KDE4 compositing working. I selected compiz on startup, but it seems to be ignored.
  • Firefox theme ugly. This really looks bad with KDE4 looking so good. I suggest that Mandriva consider installing the “kde4″ firefox theme by default, this fits the look and feel of KDE better.
  • The La ora theme not on live CD, this is a pity, as the default KDE window theme, is ok, but not that nice. It can be made a lot nicer, by turning off the “Show stripes next to title”. although maybe this is just me complaining. Getting the title bar colours to be anything other than fairly boring seems to be a bit of a trick, but possible with some playing around.
  • System settings not on the menu, only available from “Favorites” on the menu.
  • No power management applet on in KDE
  • Excellent wifi support, Wifi LED started to work, plus without any configuration, wifi just worked when I accessed the network center.
  • Dolphin not my preferred tool.. So I’ll be sticking with Konqurer, however, I notice that dolphin can display icons like I prefer, what used to be called multicolumn in konqurer.
  • Run command interface is nice: Noteworthy shortcuts. Ctrl - F12 to show dashboard, and Ctrl - Esc to show system activity. Also of course, the alt-f2 which is greatly improved krunner.
  • sftp kio slave works well. Excellent
  • man kio slave displayes manuals, but tried to open in firefox.
  • fish kio slave crashed dolphin, but worked on second attempt..
  • “Up” icon missing in dolphin
  • Ogg not associated with amarok.
  • Both the “Programs” and “Applications” kioslave’s do not show applications at second level.
  • Desktop plasmoid “picture frame” does not support kio slaves. :(

Now, enough of the bullets, and a visual tour.

Window shading was disabled on live cd, in favor of the classic windows behavior of maximizing the window. I think shading is nicer.
The new kicker start bar is interesting, but I am concerned that many users won’t figure out how to resize it. It can be resized wider by dragging the green and blue sliders, once the edit button for the toolbar has been opened. It can also be made taller, by dragging, but at the top of the edit tool bar, rather than the expected, top of the toolbar.
Single click opens folders and files by default I really find this hard, and kept opening stuff by accident. So, personally think the default should be double click. For a start, didn’t even realize that was the cause of the weirdness.
The System Settings for KDE are only available by looking under favorites, This is pretty strange, as I would expect them to be under tools.
The is a nice range of colours available for KDE 4.1, including some quite nice darker colour schemes. I found these quite nice, although do think that attention needs to be kept when picking colours and looks for applications like firefox to look alright as well.
For those that rather like Konquror, like myself.. it can be installed, even with the live CD, which is really quite cool, being able to install stuff into ram. Konquror is no longer the same beast that it was. It appears to use the same display components as dolphin for file layout. So, some of the trusty views I use are not available any more. So, installing Konquror, is konquror, but not really the same. It also still can render HTML, which is nice. I would actually use Konquror as my main browser, if it supported firefox plugins. Without the plugins, it’s not really the browser firefox is.
In Dolphin, the new file manager, to get the text beside the icons, i.e. multicolumn view, the grid layout can be changed to “Left to Right”. this suddenly makes it look like multilcolumn view in kde 3.5. Not critical, but nice.
Another thing I noticed, being that I run at 1920×1200, is that the icon preview size is too small, even on it’s largest setting. This is a little bit of a pity, as I am sure that it could be made to go even larger.
Here, dolphin is showing “Places” on the left, which include my partitions, plus a tab of “Folders”. Now, what I noticed with this is that these are panels that can be turned off and on. However, if the user clicks the X, to turn them off, they are almost gone for good, unless you hunt for them in the menu. I think these should have an icon on the tool bar to get them back. Of the right is the “Information” panel, which has a nice new feature, where you can write notes about files. This is all cool, until you copy the file over the network to another computer, and the note does not seem to come too.

“Up” icon missing in dolphin.  I added this back in, as it’s one of the most useful things.

KDE4.1 includes a bunch of the desktop effects that Compiz is famous for. These seem a little bit unfinished at the moment. Many of them lack much options at all, and some of them don’t seem to work at all. Others work, but don’t make it clear how to get them to work unless you hunt around for the special key. However, it is nice integration into KDE. Also of note, probably mostly for Mandriva to sort out, is that Compiz fusion is also available, however, does not seem to do anything at all when you use ccsm to change it’s settings, the KDE4.1 options seem to be the ones that the window manager is looking at.
Folderview, which is a neat feature of KDE4.1, which can display a folder on the desktop in a nice looking window is great. except, I would like to see better support for displaying previews of files, and when the possible option of opening a directory within folder view, rather than opening dolphin. Wouldn’t it be neat if you open the documents folder, if it stays open for say 30 seconds, and then, if the is no activity, goes back to the folder above.

Also on show in this screenshot is the ability to put application start links on the desktop at any size, which will be good for some people,

The default firefox theme looks awful with KDE4.1 smooth graphics and nice greys. A quick search on the theme’s site for firefox found this them, which is designed for kde4. I think Mandriva should look at including this, or something like this as the default theme to make Mandriva 2009 look stunning.

Another comment about firefox2 and fiefox3. If they are both of the menu, name them with a version number. Ideally, just have Firefox 3.

Monday, August 04, 2008

Word press plugin: blogger.com publisher released

I wrote over the last couple of days, a word press plugin to publish items to blogger.com. I’ve release this now, version 0.1, available at http://www.linuxsolutions.co.nz/gdatablogger/

It’s still 0.1 because

  • No validation of inputs in admin menu
  • No error handling
  • No nice GUI to pick tags and categories

But, it now actually does everything I want it to do, so I’ve scratched my itch, and will only build these features if I get feedback from the community that they want them., or I find myself with spare time.

Hauppauge WinTV-HVR900 on Mandriva Linux 2008.1

On the second attempt to get my HVR900 working with Mandriva 2008.1, I’ve had success, and can now watch Freeview HD*, terrestrial on my laptop.

I have had success after some help from Steven Ellis, who knows a lot about these things, and has done a lot of the hard work of getting Freeview HD, for Linux in NZ working. The steps for Mandriva 2008.1 is actually a lot easier than the instructions for Ubuntu, as it didn’t require anything very fancy to be done with the kernel, I was able to compile the HVR900 drivers (em28xx-new) against the Mandriva laptop kernel, after downloading kernel-source-2.6.24.5-2mnb-1-1mnb1 rpm and creating a symlink in /lib/modules/2.6.24.5-laptop-2mnb to the source.

The only tricky bit was extracting the correct firmware, which required me to install a different kernel source, purely to get a perl script out of it, as it was not in the default Mandriva kernel source, although will be in future versions by the looks of things.

Steps taken

  1. Install latest tmb source: urpmi kernel-tmb-source-latest-2.6.24.7-4mdv2008.1. This includes /usr/src/2.6.24.7-tmb-4mdv/Documentation/video4linux/extract_xc3028.pl which is needed.
  2. Extract the firmware, following instructions from: http://www.linuxtv.org/wiki/index.php/Xceive_XC3028/XC2028
    1. wget http://www.steventoth.net/linux/xc5000/HVR-12×0-14×0-17×0_1_25_25271_WHQL.zip
    2. unzip -j HVR-12×0-14×0-17×0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
    3. perl /usr/src/2.6.24.7-tmb-4mdv/Documentation/video4linux/extract_xc3028.pl
    4. cp xc3028-v27.fw /lib/firmware
  3. Download kernel source: urpmi kernel-source-latest-2.6.24.5-2mnb1
  4. Create a link: /lib/modules/2.6.24.5-laptop-2mnb/source -> /usr/src/linux-2.6.24.5-2mnb/
  5. Download driver source: hg clone http://mcentral.de/hg/~mrec/em28xx-new (urpmi mercurial first)
  6. Compile with ./build.sh in em28xx-new. Add yourself to the video group.
  7. Download and compile mplayer svn: (http://www.mythtv.co.nz/mythtv/digital-tv/dtt-debugging/ step 1). I recommend installing it in /usr/local/bin, so you can continue to use your normal mplayer.
  8. download NZ channels file, http://www.mythtv.co.nz/mythtv/digital-tv/dtt-debugging/dtt/channels.conf
  9. Edit channels file.  TV ONE in this file is no longer right.  It needs the audio to be changed from 401 to 300.  (second to last field).
  10. find good reception = watch TV.
  11. add some nice icons to launch mplayer.

The mplayer command I use to play tv is:

/usr/local/bin/mplayer -lavdopts fast:threads=2 -vf pp=fd -mc 2 -framedrop  -fs dvb://"TV ONE"

Screenshots.. (showing off!)

TV one, paused for screenshot

TV one, with compiz desktop rotation

Startup Icons

Notes

1080i still does not work well, sometimes not opening at all before mplayer crashes, sometimes opening and playing for a few seconds before crashing or looking bad. I am hoping that if I stick with mplayer svn, soon this issue will be fixed.

Recording with mplayer is quite easy.. I use the following command.

/usr/local/bin/mplayer -dumpstream -dumpfile tv1.ts dvb://"TV ONE"

Threading

I’ve noticed that even when I tell mplayer to use threads, I seem to only get load on 1 CPU at a time, it keeps jumping between cpu’s, but never do I get both CPU’s at 100%, only about 50%. I think maybe mplayer is not running on multiple threads, even with the -lavdopts fast:threads=2 option. I’ve tried -lavdopts fast:threads=4 and it seems a little better, but still does not really use both cpu’s 100%

Resources

http://www.mythtv.co.nz/mythtv/digital-tv/dtt-debugging/ - excellent information on getting this going

http://www.mythtv.co.nz/mythtv/digital-tv/ - good NZ specific information

http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-900 - HVR-900 information

Thanks to Steven Ellis for his excellent documentation.

Hardware details

I have been testing this on a dual core dell inspiron 9400 laptop with a GeForce Go 7900 GS, 256MB video card, nvidia driver version 169.12. The operating system is Mandriva 2008.1 64 bit, with Compiz fusion and KDE running.

The HVR900 I have shows up as:

Bus 001 Device 003: ID 2040:6502 Hauppauge
Device Descriptor:
bLength                18
bDescriptorType         1
bcdUSB               2.00
bDeviceClass            0 (Defined at Interface level)
bDeviceSubClass         0
bDeviceProtocol         0
bMaxPacketSize0        64
idVendor           0x2040 Hauppauge
idProduct          0x6502
bcdDevice            1.10
iManufacturer           0
iProduct                1 WinTV HVR-900

– CUT –

Dmesg:

usb 1-6: new high speed USB device using ehci_hcd and address 3
usb 1-6: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
em28xx v4l2 driver version 0.0.1 loaded
em28xx new video device (2040:6502): interface 0, class 255
em28xx: device is attached to a USB 2.0 bus
em28xx #0: Alternate settings: 8
em28xx #0: Alternate setting 0, max size= 0
em28xx #0: Alternate setting 1, max size= 0
em28xx #0: Alternate setting 2, max size= 1448
em28xx #0: Alternate setting 3, max size= 2048
em28xx #0: Alternate setting 4, max size= 2304
em28xx #0: Alternate setting 5, max size= 2580
em28xx #0: Alternate setting 6, max size= 2892
em28xx #0: Alternate setting 7, max size= 3072
attach_inform: tvp5150 detected.
tvp5150 4-005c: tvp5150am1 detected.
successfully attached tuner
em28xx #0: V4L2 VBI device registered as /dev/vbi0
em28xx #0: V4L2 device registered as /dev/video0
input: em2880/em2870 remote control as /class/input/input9
em28xx-input.c: remote control handler attached
em28xx #0: Found Hauppauge WinTV HVR (B2C0)
usbcore: registered new interface driver em28xx
em28xx-audio.c: probing for em28x1 non standard usbaudio
em28xx-audio.c: Copyright (C) 2006 Markus Rechberger
Em28xx: Initialized (Em28xx Audio Extension) extension
tvp5150 4-005c: tvp5150am1 detected.

* 576i and 720p work, 1080i still has issues.

Sunday, August 03, 2008

Testing admin for wp plugin

Just building the admin section for my word press plugin. It loads and stores values in the word press options tables.

Only thing left to do is to make it GPL, and make the tag/category selection nicer.

Saturday, August 02, 2008

Wordpress replication plugin

I have been creating a plugin for word press, that can publish certain posts to eblogger, using the gdata api. It now supports setting the published date, title, and content, formatted in HTML.

I’ve been quite pleased with it, and will be releasing it under GPL, fairly soon. I just need to build the page for changing it’s settings, which is quite simple, as it only needs the users username, password and blog id, plus a list of the categories and tags to publish.

A future feature, could loop over old posts and post them also, if they meet the criteria, but I don’t really feel it’s worth spending much time on yet.

Oh, and some of the times on older posts will be wrong, Had to setup a timezone offset, so that it got it right.

Friday, August 01, 2008

Creating a wordpress plugin

I am just starting to create a new word press plugin that publishes posts to eblogger using the gdata api.

It’s quite easy so far, and I have to say, word press is pretty nice to develop with..

And I’ve just implemented updates, as well as posting new posts.