Sunday 21 December 2008

Mandriva - Rhythmbox

Rhythmbox is the media player to use, however, out of the box, it does not support the BBC Radio stations (due to the RealAudio Codec).

Installing the RealAudio Codec

The RealAudio Codec is not part of the default Mandriva release, and so to install it, you must enable the PLF sources:
# urpmi.addmedia plff ftp://ftp.free.fr/pub/Distributions_Linux/plf/mandriva/2009.0/free/release/binary/i586
# urpmi.addmedia plfnf ftp://ftp.free.fr/pub/Distributions_Linux/plf/mandriva/2009.0/non-free/release/binary/i586
# urpmi real-codecs
# urpmi.removemedia plff && urpmi.removemedia plfnf
Once installed, Rhythmbox will be able to decode the real-audio.

Adding your Stations

In order to add stations, you must know the URLs of the streams. For the BBC, I used the Reciva website, clicked on the play now link for the station, and then look in the source of the pop-up window to find the URL of the stream.
...
<iframe src="http://www.bbc.co.uk/bbc7/realplayer/dsatg2.ram" frameborder="0" height="0" width="0"></iframe>
...
BBC7 is currently: http://www.bbc.co.uk/bbc7/realplayer/dsatg2.ram
Alouette is currently: http://www.alouette.fr/alouette.m3u

More Visualisations

If you want more visualisations, simply install the gstreamer0.10-visual and libvisual-plugins through the package manager.


Saturday 20 December 2008

Mandriva - Sound Juicer

Now the Mandrive One 2009 image does not recognise any MP3 encoder. A popular encoder is lame, so in order to include it, you need to use some other sources for your downloads. Adding the PLF sources does the trick.

Once the gstreamer plugin is included, you need to Activate the MP3 encoder in the Audio CD Extractor (SoundJuicer). Do not delete or deactivate ones you don't need - for some reason if only the MP3 one is activated, SoundJuicer produces oga files!
# urpmi.addmedia plff ftp://ftp.free.fr/pub/Distributions_Linux/plf/mandriva/2009.1/free/release/binary/i586
# urpmi.addmedia plfnf ftp://ftp.free.fr/pub/Distributions_Linux/plf/mandriva/2009.1/non-free/release/binary/i586
# urpmi gstreamer0.10-lame
# urpmi.removemedia plff && urpmi.removemedia plfnf
After shutting down / restarting SoundJuicer, you will be able to rip MP3 files.

Note, if you have deleted the profiles before reading this, simply follow these steps:
  • Open the Configuration Editor, which you will find under Configuration Preferences
  • Navigate down the tree on the left to get to: "/system/gstreamer/0.10/audio/global"
  • Right Click on the 'profile_list' entry
  • Select 'Unset Key'
Pictures

Note that even thoughSoundJuicer has found an album art picture, it does not store this inside the MP3 file, along with its tags. If you want the pictures inserted, you need another application - I download the images from Amazon, and use easytag to embed them.

File Paths and Naming

I don't like the default file-naming, I prefer my files to be named aaa - nn_ttttt with album name, track number and track title. There is no option for this in SoundJuicer, however, if you run the ConfgurationEditor, you can change the file_pattern to:
%at - %tN_%tt
I also prefer my songs to be stored in Genre directories, i.e. genre/artist/aaa - nn_ttttt, but SoundJuicer does not have a variable for the Genre, so Ill have to live with manually moving these files about after the event!

Saturday 13 December 2008

Lexmark 7500 Series Printer - GPL?

I am yet another frustrated Linux user, frustrated at lack of support from peripheral suppliers (such as Lexmark, when it comes to the 7500 Series Printer).

Note that the X7500 appears to be an office printer, and the X7550 appears to be a home printer. Lexmark are inconsistent in their naming, for example, I don't believe that the X7500 firmware update mentioned on their webpage can be applied to the X7550 printer (which Lexmark says is in the X7500 series).

A quick look at the printer, however, suggests that it may not be as incompatible as you may first think ...

When scanning / printing, the port 9100 is used. Using Wireshark, it is clear that the sequence 'HBN3' is passed over this interface.

Reading a Lexmark White Paper on multi-function printers, it can be seen that there is, indeed, an 'HBN3' protocol, a quick check shows that there are other standard ports available and open too:
Default Print (TCP 9100)
HBN3 (TCP 9100)
FTP - File Transfer Protocol (TCP 21)
HTTP - Embedded Web Server (EWS) (TCP 80, 8000)
mDNS (Bonjour) - Auto Configuration and Discovery (UDP 5353)
SNMP V2c/V1 - Simple Network Messaging Protocol (UDP 161)
SNMP V1 Traps (UDP 162)
HBN3 HID - Human Interface Device (UDP 162)
HBN3 Scan (TCP 9100)
IPP (TCP 631) - Timed Out!
Telnet (TCP 10000) - Command Line Facility

Now, port 10000 looks extremely interesting. When you connect, you get the LXK: prompt, and the prompt has built-in help.
Connected to 192.168.2.22 (192.168.2.22).
Escape character is '^]'.
LXK: enable
LXK: ls
LXK: netstat -a

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9100 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN
tcp 0 0 192.168.2.22:10000 192.168.2.11:59064 ESTABLISHED
udp 0 0 0.0.0.0:9100 0.0.0.0:*
udp 0 0 0.0.0.0:161 0.0.0.0:*
udp 0 0 0.0.0.0:5353 0.0.0.0:*

LXK: ps

PID Uid VmSize Stat Command
1 root 512 S init
2 root SWN [ksoftirqd/0]
3 root SW [events/0]
4 root SW [khelper]
5 root SW [kthread]
8 root SW [kblockd/0]
11 root SW [khubd]
34 root SW [pdflush]
........
Now this looks like an embedded Linux release - I wonder where the GPL sources can be downloaded?

Update: Well, on the 30th April 2009, Lexmark uploaded their GPL code to ftp://ftp.lexmark.com/swlab/. It would be great if this happened before, and I'd have found a note in the user manual telling me where the sources could be found! But it's good to see that Lexmark have done the right thing in the end!

"Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented" - GPLv2.

I've recently bought the HP J4680 for £90, which works over a wireless network for printing, scanning and faxing, all with Linux.

References
  1. Lexmark 7500 Series User Manual
  2. IP Ports Utilized by 2007 and 2008 Inkjet Products ID: ENUS26689
  3. Lexmark Security White Paper
  4. Open Printing Database
  5. HP J4680 Printer



Saturday 30 August 2008

LTEPG Radiotimes XML Generator

One of the problems with the Dreambox Satellite Receiver in the UK is that it cannot receive the Programme Guide from Sky, as Sky has decided to use what is laughably called the OpenTV standard (which in fact is anything but open).

The solution is to download the programme guide from the Radio Times website, but with this, there are a few issues:
  • Radio Times do not use exactly the same names for the channels as Sky do
  • The dreambox manages its channels with transponder IDs rather than names
The LT dreambox image hsa an EPG downloader built in, and you can provide it with an xml configuration file to tell it which channels to download the guide for. The problem here is that the file is confusing to create, and if you download one off the internet, it will contain many channels you don't actually use / watch, and thereby increasing the download time (it does take ages), and unnecessarily increasing the load on the Radio Times server.

This project involves writing Python scripts to interrogate the channels that have been programmed into the Dreambox, identify the equivalent Radio Times programme guide file, and automatically generate a minimal radiotimes.xml file.

First Step

The First step is to identify the favorite channels - these can be found in /etc/enigma2/userbouquet.*, in the following format:
#NAME Favourites (TV)
#SERVICE 1:64:0:0:0:0:0:0:0:0:
#DESCRIPTION Favourites
#SERVICE 1:0:1:1af7:802:2:11a0000:0:0:0:

The fields above are:
0×11a0000 - namespace (I think that this is the transponder)
0×1af7 - sid - Service Identification
0×0802 - tsid - Transmission Signal ID
0×0002 - onid -

The correlation between service IDs and Sky channel names is found in /etc/enigma2/lamedb, and is in the following format:
…..
services
1af7:011a0000:0802:0002:1:0
BBC 1 East (W)
p:BSkyB,c:000901,c:010902,c:020909,c:030901
1af7:00c0aa5f:0802:0002:1:0
BBC 1 East (W)
p:BSkyB
Next, we need a correlation between the Sky Names and the Radio Times Equivalent Names. This is the only file which must be manually maintained, and is used by the script. The file (xref.dat) is in the following format:
Sky Channel Name,Provider|RadioTimesName|Offset
BBC Prime,Globecast|BBC Prime|0:00
BBC London,BskyB|BBC1 London & South East|0:00
BBC 1 East (E),BskyB|BBC1 East|0:00
BBC 1 East (W),BSkyB|BBC1 East|0:00
BBC 1 London,BskyB|BBC1 London & South East|0:00
Virgin 1+1,BskyB|Virgin 1|1:00
Virgin 1,BskyB|Virgin 1|0:00
Watch +1,BskyB|Watch +1|0:00
Watch,BskyB|Watch|0:00
This file enables the Sky Names to be cross-referenced with the Radio Times Names (for example, in the above example, there are two Eastern Region BBC stations (E) and (W), but Radio Times only provides the one feed.

The last field in the file (offset) is not currently used in any script. The intention is that this is used when there is a channel + 1 hour, but there is no + 1 hour feed on Radio Times (Virgin is an example). The theory here is that the download script can dynamically adjust the start times for that particular channel during the download.

A Timezone Aside

The Dreambox and LT Image use GMT as the standard time, and everything works from there. This is essential, particularly when the same satellite decoder receives signals brodcast for different countries in different timezones.

Radiotimes, however, is always based in the UK in the same timezone. radio times adjusts for daylight saving, so all you need to do is look at the clock.

The LT EPG system has a timezone offset in the configuration file, which (today) must be manually edited twice a year.

Back to the Plot ...

Now that we know the transponder details, and the name of the Radio Times channel, we can look at the Radio times index file (http://xmltv.radiotimes.com/xmltv/channels.dat), which is in the following format:
90|BBC World (CET)
92|BBC1
93|BBC1 East
94|BBC1 London & South East
95|BBC1 Midlands
96|BBC1 North
97|BBC1 North East
With this information, we now know which file to download for the channel, and we construct the XML entries for the radiotimes.xml configuration file, which is created in the following format (note that the offset tag is not currently used by anything):
<channel>
<name>BBC 1 East</name>
<type>radiotimes</type>
<service>1af7:802:2</service>
<offset>0:00</offset>
<url>http://xmltv.radiotimes.com/xmltv/93.dat</url>
</channel>
Once the radiotimes.com.xml file has been generated, the download can take place. i have all the scripts installed on the Compact Flash Card (/media/cf)
python ./LTEpgGrab.pyc /media/cf/LTEpg/radiotimes.com.xml /media/cf/LTEpg epg_external.dat

The Scripts themselves have been uploaded to the LT Forum

Tuesday 1 July 2008

Windows Vista Speech Recognition Doesn't Like Northerners

My Vista speech recognition attempt came out with the following:

Invasion plans for European nations to the Moon and Mars are being considered by the French government.
Say what if you have failed to change of coach to space or by calling the Japan cup final and India.
Parish of King alliance with the UK to drive the agenda forward during the French Britain season of the EU.
The official said the eunuch was in danger of becoming redundant in double spaced tables and it needed an agency that for the clear political agenda.

It should have read ….

Ambitious plans for European missions to the Moon and Mars are being considered by the French government.
The French say that if Europe fails to change its approach to space, it will fall behind Japan, China and India.
Paris is seeking an alliance with the UK to drive the agenda forward during the French presidency of the EU.
The official said that Europe was in danger of becoming redundant in global space terms and it needed an agency that followed a clear political agenda.

On second thoughts, perhaps it is more accurate :-)

Sunday 23 March 2008

Hoover WE140 Washer / Drier


I have a Hoover WE140 Washer / Drier, and for the past few months, it has not been drying. I’ve eventually gotten round to taking off the lid and having a look.

The most obvious conclusion to jump to is that the drier doesn’t work because the Element has broken. Apparently, this is not often the case!

The washer / drier has three heating elements inside - the first is to heat the water during the washing cycles (this is located down under the drum). The other two are for the drying cycles (for 2 different heat levels, I presume).

Under the lid, you can see the top of the two heating elements (called upper and lower). There are also three thermostats on the top, two with a little peg on them (2 and 3), and one without (1).

Thermostat 2 is connected to Live, and the other end is connected to one of the heating elements.

Thermostat 3 is connected to Neutral, and the other end is connected to the other heating element.

These two thermostats are normally closed, and I presume become open circuit when a maximum temperature is reached.

The other thermostat (1) is supposed to be normally closed, and only goes open when over-temperature is reached.

The first thing I did was to turn off the power, and measure the resistances of the heating elements and the three thermostats.

The heating elements had a low resistance and were not open circuit, so I presumed that these were fine.

Thermostats 2 and 3 were closed, and thermostat 1 was open.

From this, I deduced that thermostat 1 had failed - but why?

I had a problem quite a while ago, where the water inlet valves were not closing off. Until I realised this, I had been running the drier for longer and longer to get the clothes dry.

I have noticed that Hoover have released some new thermostats, to take into consideration lengthy repeated drying cycles, which were causing many dryers to trip.

In replacing the inlet valve, I believe I have fixed the cause, however I have ordered a complete suite of three thermostats to fix the symptom (broken thermostat 1), and reduce the possibility of this happening again in the future!

Friday 21 March 2008

Dreambox 7025 Timer Edit Bug

With the DM7025, you can add a timer through the TV by selecting the ‘info’ button when watching a programme. Once this is stored, if you go to the web server, and try to edit it, you get the error message: “Please only use the characters …. in the name and description field”. You get this message even if the name & description field appear to have valid characters.

This appears to be due to the add timer mechanism through the TV puts invalid characters into the recording entry - these characters look like spaces in the web edit page, but are not actually spaces.

I suspect that these characters are unicode control characters.

The answer, therefore, is to replace anything that ‘look like a space’ with a space.

Wednesday 6 February 2008

Citroen Xsara Central Locking

After a flat car battery, my Citroen Xsara (2003) remote locking fob (PLIP) stopped working.

After searching on the internet, I found that if you hold the Lock button down for more than 10 seconds whilst the key is in the ignition, it will marry back up to the car and everything will be fine. Well, it didn’t work!

I went into Dutton Forsharw’s in Preston, and was told that sometimes after a flat battery, the car ‘forgets that it has central locking’ - that didn’t make sense to me as it was the fob that was messing me about. The guy took the fob away and came back telling me that it could not be married up to any car, and I’d need a new fob at £140.

I’ve been using the key in the lock for the past week, and today, the car central locking stopped working completely. This is a real problem as it is now impossible to lock the boot!

I found a sequence on the Citroen Owner’s Club Website, thanks to Andy which tells you to:

  1. Put the driver’s window down, lift the bonnet and ensure all equipment is switched off.
  2. Ensure all doors are closed and remove key from the ignition.
  3. Wait for 3 minutes, disconnect the vehicle battery and wait 15 seconds.
  4. Reconnect the vehicle battery, wait a further 10 seconds (do not open doors.)
  5. Switch on the side lights through the driver’s window.
  6. Switch on the ignition and check system’s functionality.
  7. Hold lock button on key down for 10 seconds.
  8. Remove key open & close door test central locking system
  9. Start the engine and complete the system’s check.

I went through this sequence, and lo-and-behold, the central locking works again. The fob, however, even with a new battery still doesn’t work.

All I can think is that the car computer holds many parameters in RAM, and if the battery voltage gets low, this RAM gets corrupted. When you re-charge the battery, the computer doesn’t reset, and it is possibly this faultily operating computer that talked to my key fob in swaheli and trashed it.

Unplugging and re-connecting the battery enabled the computer to start working correctly.

I’d suggest that whenever a battery in a Citroen gets very low, the computer should be re-set by disconnecting and re-connecting it before doing anything else.

If I’d followed the charger instructions properly, I’d have disconnected the battery to charge it anyway!

Fixing the Remote

I took the car into Dutton Forshaws in Preston, and they told me that the remote was broken, and I’d have to buy a new one. This seemed strange - how could letting a car battery go flat break the remote?

I was only passing through Preston, so took my car into my local Citroen Dealership in Letchworth and asked them. They told me that there was absolutely nothing wrong with the remote, and took the car to the service garage to take a quick look. The guy came back about 10 minutes later with a puzzled look on his face, and suggested that it needed to be brought in for a full service, so I booked it in.

On driving out of the garage, I noticed that the indicators didn’t work - neither did the wipers, nor the headlights … I took it straight back, and the puzzled guy took the car back. 5 minutes later, he cam to me and told me that the lights, and wipers were now working fine … and by the way, so was the remote!!

He had done a full reset of the computer - this is something quite fundamental, and does not appear to happen normally when the battery is removed. I have no idea what this reset is called, but suspect that they are reluctant to do it as the car also looses some other important parameters (perhaps learned engine tuning parameters?).

Anyway, the car is now working fine!

My lessons learned -

  1. Follow the instructions properly on how to reset your car after a flat battery.
  2. If the daft car repair man tells you something is broken - something that was not involved in the original problem, go get a second opinion.
  3. Make sure absolutely everything is reset in the computer, and you may get your keys to work.
  4. Use the Letchworth Citroen Repair Centre - they are extremely helpful and considerate.

Sunday 3 February 2008

Bad Battery Day

I used one of those timer heater thingies to defrost the windscreen of the car from the inside before you get out in the morning. It is essentially a clock with a big battery and heater, and you set it to come on 30 minutes before you get out in the morning. You then charge it in the cigarette lighter whilst you travel so that it is ready for the next day.

Well, I set the clock incorrectly, and left the defroster plugged into the cigarrette lighter. Needless to say, when I got to the car in the morning, the window had frozen again, and the unit decided to go back onto a charge cycle, and I had a flat battery.

I was supposed to be taking Colin into work with me, but as he was ill, he lent me his car to get to/from work. As I was in his car, I didn’t have my mobile phone charger with me, so by the time I got to work, the phone battery was flat.

Now, my car does everything for you, including automatically switching off the lights when you get out. Colin’s, however, is not. I really could have done with my mobile phone charged so that I could call the RAC for a jump start.

I hate Mondays!