Archive for 2008
Broadcom problems under linux
Thursday, November 20th, 2008
I’ve been trying to install Fedora 9 on a Dell PowerEdge T100 and have been tearing my hair out trying to get the network card to work.
The card in question is a Broadcom Netextreme BCM5722 Gigabit Ethernet PCI Express adapter. I’ve used similar Broadcom cards in other machines without any problems, but this time around it didn’t want to play nicely.
Since I was doing an NFS install I couldn’t really do anything until this worked, but trying either a DHCP or a static configuration failed.
From a static configuration the error I got was:
result of pumpSetupInterface is pumpSetupInterface failed: create route - 1:Operation not permitted
From a DHCP configuration it was:
DHCPv4 eth0 - TIMED OUT
All the other messages about the card seemed OK. The tg3 driver recognised it and even got as far as setting up the link and declaring it ready:
tg3: eth0: Link is up at 100Mbps, half duplex
tg3: eth0: Flow control is off for TX and off for RX
ADDRCONF (NETDEV_CHANGE) eth0: link becomes ready
After much tinkering I found that if I booted the machine with the ethernet cable disconnected and then only connected it once the card was trying to obtain an address everything suddently started working. If the cable was connected from the start then the interface would never come up. This provided me with enough of a work round to get Fedora 9 installed and updated.
Fortunately it seems the problem with this card and the tg3 driver has been fixed between the initial fedora 9 release kernel and the current update kernel (2.6.27.5-37.fc9.x86_64), such that after updating I was able to reboot without having to disconnect the ethernet cable and everthing still worked.
Tags: linux fedora broadcom
Posted in Computing | Comments Off
Troubleshooting IMAP SSL
Wednesday, November 5th, 2008
I’ve just spent a while trying to troubleshoot my SSL IMAP connection. This is the first time I’ve had to do any diagnostics since switching to an SSL secured mail connection.
When my connection stopped working I got only a very non-specific error from OSX mail, and no error at all from Thunderbird (it just hung). If I was using an unsecured connection I’d usually try to check the connection manually using telnet, but trying this against the SSL port on my IMAP server didn’t get any response.
Having done some digging I found that you can test an SSL secured connection using the tools included with openssh. In the case of IMAP you can connect to the server using:
openssl s_client -connect mail.example.com:993
In my case this failed (hence things not working!), with the error:
CONNECTED(00000003) write:errno=54
Reading through the openssl documentation I found that this error usually results from the connection not being able to auto-negotiate a suitable ssl version to use. If this is the case you can force a specific ssl version using:
openssl s_client -connect mail.example:993 -ssl2
or
openssl s_client -connect mail.example.com:993 -ssl3
If you want more information you can also add -debug to the command to see a full list of the commands being sent and a hex dump translation.
In my case I found that the connection only worked when sslv3 was forced, forcing sslv2 or allowing the connection to autonegotiate caused the connection to fail. Since none of the mail clients I could find allow you to force a specific ssl version my email wouldn’t work.
Fortunately my hosting provider Orchard Hosting were very quick to respond when I reported this and have fixed things.
Tags: imap ssl openssh
Posted in Computing | Comments Off
GeoTagging
Wednesday, October 29th, 2008
As Google have just released Google Earth for the iPod touch I’ve been having a play with that. One of the most interesting features is the links to geo-tagged photos. These are simply photos which are linked to the location at which they were taken.
The service used by Google is Panoramio. This is similar to a lot of other photo sharing sites, except that it’s based around location. When I was searching around in Google I found that there were a few sites for which I had photos which were currently untagged, so I’ve spent the last couple of nights uploading and annotating some of my photos.
If you want to get your photos onto Google Earth then there are a set of rules you need to follow. The photos are only supposed to be of the scenery, not the people you were with at the time. They’re mostly interested in outdoor photos and they don’t want anything too detailed. I actually found that very few of my photos fulfilled these criteria (most have people in them), but I still found several which were worth uploading.
Some cameras now include a GPS unit so that they automatically tag photos with their location as well as the date. I can see this becoming increasingly popular in future as it will make it a lot easier to go back through your old photos in the future and figure out what was going on. In my case though I had to go through each photo and manually annotated the position using Google Maps. For well populated areas this is fairly easy, but trying to accurately map photos taken when walking in the Lake Distict was an interesting challenge.
I’ve now got my small collection all up and running and will try to update it whenever I get the chance. Apparently it takes up to a couple of months for the images to make their way onto Google Earth, but I shall be keeping my eye out for them.
Posted in Uncategorized | Comments Off
iPlate lives up to the hype
Sunday, October 12th, 2008
Our house is somewhat isolated, and until quite recently was too far from our nearest exchange to be able to get ADSL broadband.
Since we did get broadband our connection speed has been somewhat dissapointing varing from 300-600kb/s, and peppered with frequent (though usually short) outages. Similar problems have plagued our neighbours but we’re grateful for what we can get!
I’ve already tried a few different modems to try to improve the reliability or stability of our connection, and although there was a definite variation between different models the connection only varied between slightly dodgy to downright awful.
I was intrigued therefore to hear that BT wholesale had released a new device called an iPlate. This is a small hardware device which attaches to your master socket and is supposed to improve the reliability and speed of your connection. When I heard this I was (as I usually am) sceptical. From my understanding the limitations on our connection were due to the distance our signal had to travel, and it seemed unlikely that there would be a simple and cheap way to improve this – otherwise why wouldn’t they have been doing this before. However – the initial reports I read about people who had tried the iPlate were universally positive. People were reporting anything from a 20% to 50% increase in connection speed, which in our case would be a big improvement.
I therefore decided to take a punt on this being real and bought an iPlate from Tamar Communications (no affiliation), which cost a grand total of £12.33 (including postage and VAT). It duly turned up the next day.
Fitting the iPlate is dead simple. The i stands for ‘interstitial’ because the way you fit it is to unscrew the front plate from your master socket (leaving the wires connected!), you plug the iPlate into the backplate of the socket, and then plug the original front plate into the iPlate. The whole thing took about 2 minutes.
Upon reconnecting my modem it reconnected almost instantly (previously establishing a connection took around 2 mins). Looking at the stats page my connection speed was 2Mb/s (a 6-fold increase on our typical connection speed!), and it’s stayed there ever since. To my mind this is one of the best paybacks I’ve ever had for a piece of tech.
I suspect that we’re the ideal candidates for the iPlate, those with weak or noisy connections are likely to see the best increases – if your connection speed is already good then the difference may be negligible, but for houses like ours it’s been a godsend.
Tags: adsl, broadband, iplate
Posted in Technology | Comments Off
Scientific Instrument Software
Friday, October 10th, 2008
As a bioinformatician I find myself spending too much of my time working around poor software supplied with scientific instruments.
I’m continually amazed that hardware which can cost hundreds of thousands of pounds is very often let down by the control and analysis software supplied with it.
I suspect that the fault for this lies almost equally between the companies producing the equipment and the scientists ordering it. The problem is that scientists only ever think about the data that an instrument can generate, and never worry about the quality of the software which will be used to collect or manipulate it. They assume that collecting the data is the difficult part and that playing around with it on a computer is easy. Increasingly this is proving not to be the case.
The companies know this too. Therefore there is very little incentive for them to do any more than the bare minimum when developing their software. However they do realise that the software can be an extra revenue source, so they often insist on using proprietary file formats so that only their software can be used to access the data – and if you want the software on other machines then you’ll have to pay for the privilege.
The biggest disapointment is that the software ages faster than the machines. I’m not sure that I’ve ever seen a major software update (free or otherwise) to a piece of scientific equipment. Once you’ve stumped up to buy the system initially you need to keep paying for your support contract to keep it running and there’s no incentive to improve the software. If you can’t update the software and it’s not doing what you want then your only recourse is to buy a new machine.
What I have seen are perfectly good systems going to waste because of their software. Array scanners being decomissioned because their software only ran on Windows 98 which meant it couldn’t be connected to the network. Mass Specs capable of quantitation using iCat/iTrac but unable to do so because the software doesn’t support it and won’t export in a standard format to allow the use of other packages.
So what’s the answer to this problem? The only place to tackle this is during negotiations for new equipment. Things scientists should be insisting on are:
- That the software which comes with a machine is supported as part of the support contract and that bugs which are reported will be fixed (or worked round) in a defined timeframe.
- That the file format used by the equipment is documented so that independent readers/writers can be written against the spec. It would be OK to use a proprietary format as long as there is a simple and automatable way to export to a standard format.
- That the software will be guaranteed to be ported to new operating system releases within a defined timeframe as long as a support contract is in effect.
Of course noone will take any notice and will go ahead and spend thousands on machines with artificially limited lifespans, and people like me will spend far too long trying to work around the unnecessary limitations. The only hope I’d see would be for a large institution (NIH, UK research councils) to insist that all equipment uses only documented file formats. What’s the point of having 10 year data retention policies if you can’t find any sofware to read the data when you get it back?
Tags: software
Posted in Bioinformatics | Comments Off
Fighting Apple over SSL mail
Friday, October 10th, 2008
As I’ve been setting up this domain I’ve been trying to get both my MacBook and my iPod touch to talk to my new mail servers. You’d have thought that this should have been pretty straightforward (I did).
Since I have the option of using either unencrypted or SSL protected connections to the mail servers I wanted to use the SSL option. I’ve gone for long enough sending my login details in plain text so this was the time to change.
Although I’ve pretty much got everything working now I’ve spent a couple of hours fighting the various apple mail programs to get this to work.
My major problem seemed to stem from the fact that the imap and smtp servers were using a self-signed certificate to set up the connection. I started with my laptop which threw up a warning about the unrecognised signing authority (fair enough), and let me make a one off exception. However there is no obvious way to tell mail to always trust this certificate so it throws up the dialog every time you start up mail.
After much googling I found that the answer was:
- Open mail and get up the warning dialog
- Choose to examine the certificate
- Once the certificate is visible drag the picture of the certificate at the top left onto the desktop. This should create a .cer file
- Double click on the certificate file on your desktop
- Change the keychain option to X509Anchors (importing it into login is not enough)
- Import the certificate
You should now find that the certificate is flagged as trusted and you won’t get the warning when launching mail.
Flushed with success I turned to the iPod touch.
In principle the imported certificate should sync across to the iPod through iTunes. I tried attaching it to a mail but there’s no option to import from an attachment.
Setting up the connection proved to be a pain again though. The problem was that when you’ve entered the details of your new account the iPod does a connection check to the various servers to ensure that you’ve entered everything correctly. Unfortunately whatever checks it does take ages to complete, long enough in fact that the iPod goes back into sleep mode. If it sleeps then this breaks the connection and you have to start over again.
I only got it to work eventually by sitting tapping the screen for around 5 mins whilst the checks eventually completed. The response from the servers now that the account is set up is very quick so I’ve no idea what it spent its time doing when setting things up. During the checks I got two warnings about the self signed cert (despite syncing with iTunes), but I’ve seen nothing since so hopefully I won’t see those again.
Tags: apple, iPod, mail, ssl
Posted in Computing | Comments Off
Swing Speedup!
Friday, October 10th, 2008
I’d never really been one to subscribe to the popular perception that swing is so horrifically slow that it isn’t suitable for use in any serious application. Most of the problems I’ve seen with swing based programs have resulted from people not knowing how to make processing tasks run in a separate thread and therefore causing the interface to block until they complete.
For some reason I seem to have got into a habit of writing java applications which operate on enormous datasets and which stretch swing to its limits. For the most part it has coped very well, but this last week provided me with a display where the lag in swing was noticable.
Although the display didn’t update very often I did need to repaint to highlight one part of the screen and the lag from clicking to the display changing was around a second – which was too long. All of the time was spent in the swing redraw code (Sun’s part – not mine!).
Bizarrely when I moved the program onto my mac the interface was very snappy – no lag at all, and it was the same on my linux box, so there was something odd about the windows drawing code.
A while ago I remembered reading that Sun had added OpenGL 2D acceleration into swing. Since this seemed a good time to look into this I read some of the Sun documentation about this. To cut a long story short OpenGL is present from java 1.5 onwards, but is disabled by default. To enable it you simply need to add the following as a JRE argument:
-Dsun.java2d.opengl=true
On my application this had a dramatic effect. The redraws which previously took around a second were now virtually instant. I’ve since applied this to a couple of other large applications and all have shown a noticable increase in responsiveness.
It’s not every day you come across a magic bullet, but this came pretty close as far as I was concerned.
Tags: java, opengl, swing
Posted in Computing | Comments Off