June 2008 Archive

Internet Finally Working

June 25th, 2008

After a 13 day wait my internet connection is finally up. The engineer simply reconnected my plug in the switch box so it must not have been seated correctly from the start. It’s just a pity it took Dansk Bredbånd so long to send an engineer out to discover this.

We also have IP telephone now all server up through the gateway box provided by Dansk Bredbånd, it’s a Tilgin Vood 342 (pdf link) for anyone that’s interested. I noticed that without the WAN connected it acts as a DHCP server so you can connect to the admin interface in the box by going to http://192.168.2.1, I haven’t been given the username and password but searching on forums it seems that Conf/admin works. I’ll give this a try in the next few days.
It also took an extra support call to get the phone working, but fortunately that seemed to be a simple configuration error on their part as it was fixed very quickly.

As for the connection I’m actually very happy with it. I’ve tested it both in download and upload bandwidth and it easy reaches 25 Mbps in both directions so my steady stream of updates to Fedora 9 go pretty quick to say the least.

I also ordered a static IP address so I can access my server from anywhere, this is identified by the mac address of my router that I gave to Dansk Bredbånd but sometimes I just plug my laptop in without the router so though it might be useful to spoof my routers mac address. Turn out this is very easy in Linux, just do the following as root, thanks to this page.

# /sbin/ifconfig eth0 down hw ether 00:00:00:00:00:01
# /sbin/ifconfig eth0 up

Notepad Plus One

June 24th, 2008

On Linux I usually use vi as my text editor or, for html work, Bluefish, but on windows these are not available.

While writing a program to import text files into a database I was using notepad to view the files to see how to best import them. At this point I became very frustrated that notepad doesn’t even support line and column counters so I can see where I am in a document (useful when parsing fixed width files).

After a short search I’ve downloaded Notepad++, it’s powerful, fast and best of all GPL licensed! I recommend you ditch notepad and try this instead.

13 Days Without Internet

June 24th, 2008

I’ve just spoken to the engineer from Dansk Bredbånd who says that my internet connection is finally fixed after being down for 13 days now.

I’ve called Dansk Bredbånd about 8 times during this period and gone through the same tests over and over trying to prove it’s their problem and not one in my flat. I understand that they don’t want to send engineers out immediately since I suspect many problems are caused by software on the end users side but you would think after all the conversations they would realise that I’m not completely stupid and maybe it’s their fault.

After being told on at least 2 occasions than engineer would come, then calling the next day to find that no engineer was booked my frustration stared to grow. My advice is just to demand an engineer if you are sure it’s not your problem (otherwise they charge 599 DKK per hour for the visit, they also use this line as a warning which I’m sure puts off many people less technical than myself).

The engineer said that he simply unplugged and plugged back in the Ethernet cable to the switch located in the buildings basement. He also said that Dansk Bredbånd had left the door to the switch wide open so anyone with access to the basement could cause havoc, not a very smart thing to do.

I won’t be completely sure until I get home since there’s nothing connected to the router but I’ve got my fingers crossed.

Monitoring Wireless Channel Congestion

June 16th, 2008

While playing around with my wireless connection it occurred to me that there’s no way to see which channels are the busiest in my area. I know the command shown below lists all the scan details including the channel number for each router, but to see the most heavily congested channels I have to search the list manually.

$ /sbin/iwlist eth1 scan

It occurred to me that a simple python script could do the job, so here it is.

#! /usr/bin/python
# set to the number of channels available
MAX_CHANNEL=14
# enter your wireless device name
DEVICE="eth1"
import os
f=os.popen("/sbin/iwlist " + DEVICE + " scan")
str=f.read()
channel=range(1,MAX_CHANNEL+1,1)
for i in channel:
 if i<10:
  ch="0" + `i`
 else:
  ch=`i`
 sChannel="(Channel " + `i` + ")"
 print "Channel " + ch + ":" + `str.count(sChannel)`
f.close()

It simply runs the Linux command using popen, parses the output and counts the channels producing an output like this.

Channel 01:3
Channel 02:2
Channel 03:2
Channel 04:0
Channel 05:0
Channel 06:2
Channel 07:1
Channel 08:0
Channel 09:1
Channel 10:0
Channel 11:0
Channel 12:0
Channel 13:4
Channel 14:0

No Internet Connection

June 16th, 2008

After being excited about my new internet provider things got off to rather a bad start. My internet was cut off late on Wednesday June 11th and should have been connected at the latest by 7pm on Thursday the 12th. Needless to say this didn’t happen.

On Friday evening, after checking that a neighbour also had no internet, I decided to call Dansk Bredbånd to see if it was the whole building or juts a few people. After being in a queue for 40 minutes I finally got through to technical support.

It turns out that the building was connected but they somehow managed not to connect my flat. To be fair, this could be the fault of my buildings administration so I can’t blame Dansk Bredbånd directly, but being on hold for 40 minutes and now waiting 5 days without an internet connection doesn’t inspire great confidence.

On a positive note the technical help was very friendly and he seemed to know what he was talking about so there’s still hope. The final outcome is that an engineer should come today (Monday) so hopefully I’ll be able to enjoy my 25 Mbps line at last.

This also made me realise how many applications now need an active connection to function. I was helping a friend connect iTunes to his new iPod in Windows. It turns out the iPods disk was Mac formatted (HFS+) so I tried to use iTunes to reformat the drive to Windows format (FAT32). Apparently this requires an internet connection for god-knows-what reason, I see that point 1 in the linked pages says:

Ensure that you have an active Internet connection as new versions of iTunes and iPod Software may need to be downloaded to your computer.

But actually preventing the reformat for this reason seems a bit extreme especially when I know it was already the latest version.

Maxtor OneTouch 4 Mini

June 3rd, 2008

I ordered an external USB hard drive that came today, it’s a Maxtor OneTouch 4 Mini 160GB.

As you may know I already have a 320GB NAS device on my network but I really wanted something that was portable to move files around, plus, for security, I think it’s good to have multiple backups in physically separate locations. I currently have important photos on my girlfriends PC plus on the Disk Station but they are right next to each other so in the event of theft I’ll probably loose both copies.

Using the USB device I can either backup from the Disk Station to the USB drive over the network or plug it directly into the Disk Station and do the backup from there.

Since it’s primarily designed for Windows users (what isn’t?) it comes with some bundled software on the drive, but since I’m doing this from Linux the first thing I did was wipe the disk clean.
Apart from that I’m happy with it, it seems fast, almost silent, is very small and weights only 167g so can easily slip into a pocket.

I also read today the Synology have released some beta software for the Disk Stations that allows for, amongst other items:

Extra Data Protection: The Network Recycle Bin ensures all deleted files are recoverable from the recycle bin folder. This function works for all CIFS connections.
Integrated Telnet/SSH: Telnet and SSH terminal services are now configurable directly from the management UI.

Pretty cool, it’s the NAS that just keeps on giving!

New Nautilus File Operations Dialog

June 1st, 2008

One feature that I really like in Gnome 2.22 is the new file operation dialog used when moving or copying files in Nautilus.

If you select multiple files at once to copy you just get a single progress bar showing the progress as a whole of all the files.
However if you start a copy/move and then start subsequent copy/moves instead of opening their own dialogs they are just added to the already open progress dialog as shown here:

Gnome File Operations Dialog

This gives much more information plus it really stops screen clutter by keeping all the information in one place.

The only slight niggle I have is that as the amount copied is updated twice per second it makes the whole line of text jump left and right as the numbers change width. It would be much nicer if the amount copied had it’s own label so it didn’t affect the rest of the text.

Rsync Over SSH Using Alternate Port and Private Key

June 1st, 2008

A previous post described how to set up a public/private key to log in to my disk station without a password and using an alternate port i.e. not port 22.

One of the consequences of this is that rsync no longer works without a few tweaks since by default it works over port 22 and expects a password.
To fix this just use the command below and rsync will work without interaction (assuming the key passphrase was left empty).

#  rsync -au -e 'ssh -p 99 -i /home/username/.ssh/id_rsa' /path/to/source HOST:/path/to/destination

Just replace -p 99 with your SSH port and /home/username/.ssh/id_rsa with the location of you private key.