Friday, 9 March 2012

OpenWRT MR3220 Command Snippets

Reset the OpenWRT on Router back to the default use the command mtd -r erase rootfs_data

Turn Wifi off uci set wireless.@wifi-device[0].disabled=1; wifi

Thursday, 8 March 2012

Using a clone image on new hardware.

The Centos networking will not work after the new hardware is using a clone image. The problem occurs because the MAC addresses on the new hardware don't match the MAC addresses in the config files of the clone image, these are the MAC addresses of the original hardware the image was taken from.

To get Networking working on Centos when using a cloned image, just modify the entries in /etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth1 and the /etc/udev/rules.d/70-persistent-net.rules files so that the eth0 and eth1 entries match the new hardware MAC addresses.

Restart the networking using service network restart and networking should now be working.

Friday, 17 February 2012

Add SSH public keys to a remote host

Nice quick way to add public keys to the authorized_keys file on a remote host
ssh-copy-id -i ~/.ssh/id_rsa.pub user@hostname

Monday, 13 February 2012

Rocks Cluster Compute nodes Ask for Password

After installing the compute nodes on a new Rocks Cluster it was found that a few nodes kept asking for SSH password. These should have been passwordless SSH and it was working on some of the compute nodes.

Try the following #rocks sync host sharedkey compute 

Try #rocks run host "/opt/rocks/bin/411get --all" 

if that works, 

Try #rocks sync users on the frontend

This cured the password prompt problem on the cluster.

Monday, 6 February 2012

4 Litre Silver Mini Fridge Repair

After just over a year of use (just out of warranty) the fridge stopped keeping things cool.
After taking out the 7 screws from the back panel the power supply PCB was revealed. On close examination it was found that the two 1000uF 25Volt electrolytic Capacitors on the power supply board were swollen (see picture below and note the pressure seals on the capacitors, both are leaking electrolyte), they were replaced and the fridge began to cool again, Result!
Do these repairs at your own risk, electricity is dangerous, you have been warned.

Friday, 20 January 2012

Add Serial Port to TP-Link MR3420

I added a serial port to the MR3420 by first opening up the case. There are four screws under the rubber feet on the base of the case. Once open I located the serial port on the board below the white label VcGdRxTx I have placed on the board on the right. The four connections are as per the label with pin one identified by the box round the square PCB pad.

I then added a small 4 way socket on the side of the case. This socket was glued in with Epoxy resin and it was wired up to the pins on the MR3420 board. I then used a Sparkfun 3.3V FTDI USB to serial adapter to interface between my PC and the MR3420.

I use Ubuntu 11.10 a Linux Distribution on my PC, to connect to the MR3420 via a program run in a Terminal window called minicom. When the USB to serial adapter is plugged in to the USB socket on the PC use dmesg on the command line to display what port the adapter is using, mine was ttyUSB1. You will need this info to set-up minicom. The serial communication paramters are Serial Device /dev/ttyUSB1 , 115200 baud , 8 data bits , 1 Stop Bit , No parity , No Hardware flow control and No Software flow control.

When everything is plugged in and the MR3420 is powered up you should see the progress of the boot sequence and after this the command prompt in the Terminal window on the PC. You should then load new OpenWRT firmware for the correct version of your MR3420 via the Web configuration, this will allow new packages to be installed and customisation of the router.

The picture above is the console view of my MR3420 and is displaying the details of the CPU the router has, this was displayed by typing "cat /proc/cpuinfo" without the quotes. I hope you find this blog entry useful.

Monday, 19 December 2011

SSH Tunnel command

Command to setup the tunnel
ssh -N -p 11000 remoteuser@remotecomputer.net -L 5901/localhost/5900

To view from Local computer
vncviewer 127.0.0.1:1

So the first command sets up the tunnel from the local machine to the remote computer using port 11000. The 5901 port on the local machine is forwarded to the 5900 port on the remote machine. Now when you use your local machine to connect to port 5901 on the localhost this allows you to connect to the vnc server on the remote machine via the port 11000 tunnel.

Defender 300tdi Lucas 10AS Alarm Immobiliser (Spider) Problems

We have a 1997 Landrover Defender 300tdi that has given immobiliser problems intermittently. I had initially fixed the fuel solenoid as we w...