Monday 19 November 2012

Improving My ADSL2+ Connection Speed

I used a Netgear DG843GT Modem/Router that I purchased on eBay for £12 delivered. It had a faulty swollen power supply capacitor on the Broadcom modem chip area of the printed circuit board, this I replaced, it was a 1000uF at 6.3V electrolytic capacitor. I flashed the modem/router with DGTeam Firmware Mirror. I didn't like the new firmware's logos at the top of the DG843GT Web interface so I just blocked this frame in my browser to remove it from view :).
This firmware allows you to reduce the noise margin via the routers web interface and command line. I first logged the modems varying ADSL2+ snr over a period of about a week from a Raspberry Pi using a shell script (shown below) to Xively. See the Xively tutorial for more information. The Xively data format is detailed here. The reason I wanted to record the data was to get a feel for the actual noise conditions on my telephone line over a period of time and to see what I was going to be up against.

The Xively internet of everything concept takes a bit of understanding , I'm not sure I fully understand it yet. My attempt to describe it here is that a feed is a location on Xively for your device to record its many data channels also known as datastreams. These channels can be various outputs from sensors on the device or data gleaned from the device itself. In this case I'm screen scraping the Modem/Router's browser based status page to get the SNR and Download speed values. I'm doing this using a few shell scripts running that loop every 5 minutes on a Raspberry PI a low power Linux device that runs 24-7.

To do this yourself you need to signup with Xively to create your own account and password. After this you then create a feed for your DG843GT with two channels one called SNR (Signal to Noise Ratio) measured in dB (decibels) and the other is speed the download speed measured in kbps (kilo Bits Per Second).

As part of the account set up process a Product ID , Product Secret , Serial Number and Activation Code is created as is a Feed ID ,
Feed URL in the form :-
https://xively.com/feeds/***Feed_Number***
and an API endpoint URL of the form :-
https://api.xively.com/v2/feeds/***Feed_Number***
An auto-generated device key for your ***Feed Number*** is also created to allow secure uploading of the readings from your remote device.

The script RouterCall.sh uses a command wget to automatically log in to the DG834GT Modem/Router and download the stattbl.htm page. This page is then scraped using various cut commands to get the value into variables within the script which are then packaged up into a data.json file that is uploaded to Xively by running the cosm.sh script. The cosm script has the feed details and associated security key along with the reference to the data.json data file.
The annotations on the screenshot images are as follows #1 is the API endpoint #2 is the device key for the feed number.

Screenshot of the Device Feed

The following image is of the cosm script and shows #1 the API feed endpoint URL and  #2 is the device key for the feed , this shows hopefully how they are linked.


cosm,sh


Note the area of the graph below showing off scale and a flat line is where I was playing around with the Router. From the graph below one can see that before the noise margin reduction it was around 10dB, and you can see the reduction at night time due to interference from MW radio stations etc reducing the noise margin. You can also see where I reduce the noise margin down to the target 6dB, this is where my download speed increased from 5Mbps up to 7.4Mbps, what a result :).

The connection has been rock solid for over a week with no line re-sync and a very low crc much in line with what I experienced with the higher noise margin and a lower speed.



Shell Script RouterCall.sh
# This script uses another script cosm.sh to send data to the Cosm Website
# Note you have to create an account yourself and use this id for your script
#!/bin/sh
while [ true ]
do
# Create my data files
touch noise.txt speed.txt data.txt
# Get content of Stats Page from Router
wget --http-user=admin --http-passwd='********' http://192.168.1.1/stattbl.htm
# Get data into files
cat stattbl.htm | grep kbps | cut -d\> -f3 | cut -dk -f1 | head -1 > speed.txt
cat stattbl.htm | grep db | cut -d\> -f3 | cut -d\< -f1 | cut -dk -f1 | tail -2 | head -1 > noise.txt
# Load Variable list with contents of speed.txt
noise=`cat noise.txt`
speed=`cat speed.txt`
# Send data to Cosm by creating a json file containing the data
echo -e {\"version\":\"1.0.0\",\"datastreams\": [\{\"id\":\"ADSL\",\"current_value\":\"$noise\"\},\{\"id\":\"speed\",\"current_value\":\"$speed\"\}]\} > data.json
# Run other Shell script
cosm.sh
# Remove the created files to renew them next time
rm noise.txt data.txt speed.txt data.json stattbl.htm
# Wait for 5 minutes before looping again
sleep 300
done

Shell Script cosm.sh
# Script to send Data to your Cosm feed page
#!/bin/sh
curl --request PUT --data-binary @data.json --header "X-ApiKey: ***********You use your Key Here************" --verbose http://api.cosm.com/v2/feeds/***Your Feed Number Here*******

Update: I have managed a consistent 8.227Mbps by reducing the noise margin to around 3dB, it is also a rock solid connection and is much better than my old Zyxel P-660HW T1 V2 at around 4Mbps, it also used to restart for no reason even when it was brand new.

Further Update: I have now managed a consistent 9.139Mbps by further reducing the noise margin to around 2.4dB, it is still a solid connection. It was up at 9.9Mbps but this was not stable so it was reduced. These changes were made in the summer when static and atmospheric noise is at its highest on the frequencies used by ADSL2 so fingers crossed that it stays this way :).

Even Further Update
My broadband started playing up around the 1st of April 2014 and it took BT Openreach about 2 weeks to fix it, I am still trying to get a refund. I was effectively without broadband during this time due to excessive noise on my telephone line, it was very crackly like static on a radio. I did however use a 3G USB Dongle for my broadband over this time. My SNR logging came to the rescue as I could see exactly when it happened and what was occurring on the line. See my image of the the SNR below.

My system is now back but it is now only running around 3Mbps which is pretty rubbish. My line still has to go through a learning process so the equipment at the telephone exchange can eventually see the line is no longer noisy and so should allow higher speeds hopefully. 


 Even Further Further Update

After over a full month of mediocre/sometimes non existent broadband I have finally got the speed I think I should. I contacted them on two separate occasions saying I had been capped since the fault at 3Mbps even after BT saying the cap had been removed. I told them I had the evidence for the cap not being removed when even after a router reset the speed was always 3Mbps +- a few kbps. This morning I was contacted by BT to say the cap had not indeed been removed but that it was now and could I restart the router. This I did, the speed immediately went to 10Mbps download and 1Mbps upload, thanks goodness, fingers crossed that it stays this way. Images of the broadband speed and SNR are shown below.





New Router Installed
My old Netgear DG834GT started to disconnect at random, so I purchased a Billion 7800DXL modem router to replace it. This was installed and no tweaking of the SNR was necessary, I am getting a reliable 9.2Mbps download and 1.0Mbps upload so a good result. The added benefit of this is that this router has dual band wifi and 1Gbit ethernet ports so file transfers to and from my NAS which is also 1Gbit on the home network is pretty rapid.

References Used: With grateful thanks


Making a datalogger for a Kamstrup electricity / gas meter with Raspberry Pi!


Duncan Jauncey's Blog



Wednesday 10 October 2012

APC UPS Serial Port Setup

Setup Serial Port
I use Ubuntu 12.04 LTS 64bit and install apcupsd using the command:-
sudo apt-get install apcupsd 

I edited the file /etc/default/apcupsd and changed the entry  
ISCONFIGURED=NO to ISCONFIGURED=YES

I found out the USB dongle serial port used by issuing the command dmesg | grep ttyUSB in my case it was /dev/ttyUSB2. This was added to the config file  /etc/apcupsd/apcupsd.conf file

DEVICE /dev/ttyUSB2 
UPSTYPE apcsmart

I then issued the command sudo apctest this allowed me to run a battery calibration test.

Tuesday 31 July 2012

PXE Boot a Dban image from an Ubuntu Server




 Dhcp Offers from Ubuntu Server to Compute Nodes
****Note**** exercise extreme care with these notes I have made as you can boot and wipe any computer capable of net booting without any keyboard input on the private network if the machine in question is set to net-boot. 
I ACCEPT NO RESPONSIBILITY FOR ANY ERRORS OR OMISSIONS , YOU HAVE BEEN WARNED!


The object of this blog entry was to remind me how to securely erase a cluster of headless compute nodes connected to a head node using a Dban image pxe booted from the head node.

I installed Ubuntu 12.04 Server on the head node. The Head Node's eth0 was connected via Ethernet switches to the compute nodes on a private network in the range 192.168.1.0 and eth1 was connected to the public network and it was set to receive an IP address via dhcp.

Installation Requirements for the Head Node:-
Install an internet super server, tftp server, dhcp server and syslinux a boot loader.
 The command to do this is :-
sudo apt-get -y install inetutils-inetd tftpd-hpa dhcp3-server syslinux

 You have to extract some files from a Darik's Boot 'n' Nuke image:-
sudo mkdir /media/iso
sudo mount -o loop /the/path/to/dBanfile.iso /media/iso

In the directory /var/lib/tftpboot place the following files dban.bzi from the /media/iso directory and the file pxelinux.0 from the /usr/lib/syslinux/ directory. Also place the remaining files from the iso image in /var/lib/tftpboot/pxelinux.cfg

 Set the entries in the file named default in the directory /var/lib/tftpboot/pxelinux.cfg

PROMPT 0
DEFAULT quick

With prompt set to 0 there is no pause and the default setting is quick it can be autonuke dban dod dod3pass dodshort gutman ops2 paranoid prng or zero.
This means when it is run it goes straight to quick wipe so exercise extreme care when doing this as you can boot and wipe anything on the private network if the machine in question is set to netboot. I set it to 0 as all the compute nodes were headless and keyboardless so I could not have a pause for keyboard input.

The settings in the file /etc/dhcp/dhcpd.conf  I required for the dhcp server are as follows :-
ddns-update-style none;
option domain-name "home.local";
option domain-name-servers 192.168.1.1;
default-lease-time 86400;
max-lease-time 604880;
option time-offset -18000;
authoritative;
log-facility local7;
allow booting;
allow bootp;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
filename "pxelinux.0";
option root-path "/var/lib/tftpboot";
next-server 192.168.1.1;
}



In the tftp config file /etc/default/tftpd-hpa I required the following :-


RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS=""


The other dhcp config file /etc/default/isc-dhcp-server
should contain :-
INTERFACES="eth0"

 The ethernet settings file /etc/network/interfaces
should contain :-
 auto lo
iface lo inet loopback

# This is the private network
# Its static ip address
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
auto eth0
# The public network interface

# It uses dhcp
auto eth1
iface eth1 inet dhcp


Note you will have to ensure that the compute nodes' bios is set to pxe boot on eth0 if that is the interface you are using. Once the Ubuntu Head Node is booted use tail -f /var/log/syslog to track the progress of the compute nodes dhcp ip addresses being served as they are booted.

This really saved me time when I had to securely erase a large number of machines before they were decommissioned and sent for recycling :).

Friday 27 July 2012

Repair a Faulty D-Link DGS-1024D Gigabit Switch


Always take extreme care when servicing electrical equipment eg HOT Solder,  Soldering Irons, MAINS Voltage and High DC Voltage can all be dangerous or worse. I am NOT responsible for any errors or omissions or for your errors or inability to understand and operate safely in this environment YMMV.
 

This Switch had flickering Link and Act LED's and no LED self test when first switched on. I took the case apart by removing 4 screws from the top of the case and 3 screws from the bottom front of the case. I found one bulging 1000uF 6.3V capacitor C67. I removed C67 and C68 and tested them with the ESR meter see photos below, both had problems one was open circuit and the other was low in value and high ESR. I replaced them with High Temperature Low ESR Capacitors. After replacement the switch went through a proper self-test with the LED's switching sequentially etc when powered up.
Low Value Capacitor
Open Circuit Capacitor
Replaced Capacitors

It was working fine after this, however the fans also needed replacement as well because one was seized and the other very noisy. I gave it an extended test for a time and it showed no signs of failure so not bad for a quick look inside the case and some soldering.
The bulging capacitor is a common fault in electronic equipment so it pays to examine all electrolytic capacitors on faulty equipment.

Monday 18 June 2012

Edimax 3G-6210n Linux

I opened the case of the device and noted a number of unused pads that pointed to being a serial port connector. I used a USB to serial Sparkfun FTDI Basic 3v3 board and connected its rx tx and gnd pins to the pins on the 3G-6210n board. Note pin 1 on the 3G-6210n board is signified by a white silk screen square on the empty 4 pin connector rectangle, see my photos.

FTDI board goes to 3G-6210n Pins
GND goes to pin 3
TX goes to pin 2
RX goes to pin 4
I used my Ubuntu 12.04 machine and connected the Sparkfun FTDI board to one of the USB ports. I checked using the command dmesg and found the device was defined as /dev/ttyUSB0. I started minicom a terminal program using the command minicom -D /dev/ttyUSB0.
I set the Com port to 38400 baud 8N1 = 8 bits, no parity and 1 stop bit. No hardware or software flow control is selected on minicom.
I then powered on the 3G-6210n and boot messages appeared on the terminal window of minicom. It definitely is running Linux see messages below while it booted. Initial things I noticed 32MB RAM, 4MB Flash, 200MHz Processor

U-Boot 1.1.4 (Oct  9 2009 - 17:38:59)

U-Boot code: 00000000 -> 00019528  BSS: -> 0001E478
CPU Clock: 200 MHz
1.8V Vdd Output: 1.793
2.5V Vdd Output: 2.531
RAM Configuration:
Bank #0: 00000000 32 MB
Flash Manufacturer: MXIC
Flash Device: MXLV320CB(4MB)
Flash:  4 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Starting application at 0x10040000 ...
Uncompressing Linux................................................................................... done, booting the kern.
Linux version 2.6.16-star (root@vance.localdomain) (gcc version 3.4.6) #1412 Fri Jun 11 17:05:56 CST 2010
CPU: FA526id(wb) [66015261] revision 1 (ARMv4)
Machine: STAR STR9100
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU0: D cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU clock at 200MHz
AHB clock at 100MHz
APB clock at 50MHz
Built 1 zonelists
Kernel command line: root=/dev/mtdblock3
PID hash table entries: 256 (order: 8, 4096 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 32MB = 32MB total
Memory: 29788KB available (2252K code, 251K data, 100K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
PCI clock at 33M
PCI: bus0: Fast back to back transfers disabled
PCI Bridge found
PCI map irq: 00:00.00 slot 0, pin 1, irq: 0
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
Bluetooth: Core ver 2.8
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
squashfs: version 3.4 (2008/08/26) Phillip Lougher
Initializing Cryptographic API
io scheduler noop registered
io scheduler deadline registered (default)
***********Init LED Driver*****************
Init GPIO Interrupt
***********Init LED Driver Finishing*****************
LED & GPIO & LAN Status Driver LED_VERSION
GPIO interrupt handler install ok.
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x78000000 (irq = 10) is a 16550A
VLAN0_VLAN_TAG: 0
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
rdm_major = 254
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
STR9100 NOR Flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 5 MTD partitions on "STR9100 NOR Flash":
0x00000000-0x00040000 : "ARMBOOT"
0x00040000-0x001a0000 : "Linux Kernel1"
0x001a0000-0x003e0000 : "ROOT FS1"
0x003e0000-0x00400000 : "Configs"
0x00040000-0x003e0000 : "Upgrade"
block2mtd: version $Revision: 1.30 $
usbmon: debugfs is not available
str9100-ehci str9100-ehci: str9100-ehci
str9100-ehci str9100-ehci: new USB bus registered, assigned bus number 1
str9100-ehci str9100-ehci: irq 24, io mem 0xcc000000
str9100-ehci str9100-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: Product: str9100-ehci
usb usb1: Manufacturer: Linux 2.6.16-star ehci_hcd
usb usb1: SerialNumber: str9100-ehci
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (STR9100)
str9100-ohci str9100-ohci: str9100-ohci
str9100-ohci str9100-ohci: new USB bus registered, assigned bus number 2
str9100-ohci str9100-ohci: irq 23, io mem 0xc4000000
usb usb2: Product: str9100-ohci
usb usb2: Manufacturer: Linux 2.6.16-star ohci_hcd
usb usb2: SerialNumber: str9100-ohci
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: new high speed USB device using str9100-ehci and address 2
Bluetooth: HCI USB driver ver 2.9
usb 1-1: Product: 802.11 n WLAN
usb 1-1: Manufacturer: Ralink
usb 1-1: SerialNumber: 1.0
usb 1-1: configuration #1 chosen from 1 choice
usbcore: registered new driver hci_usb
u32 classifier
    Perfomance counters on
Netfilter messages via NETLINK v0.30.
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
ip_conntrack version 2.4 (256 buckets, 2048 max) - 240 bytes per conntrack
ctnetlink v0.90: registering with nfnetlink.
ip_tables: (C) 2000-2006 Netfilter Core Team
ipt_recent v0.3.1: Stephen Frost .  http://snowman.net/projects/ipt_recent/
ClusterIP Version 0.8 loaded successfully
arp_tables: (C) 2002 David S. Miller
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: BNEP (Ethernet Emulation) ver 1.2
Bluetooth: BNEP filters: protocol multicast
VFS: Mounted root (squashfs filesystem) readonly.

Wednesday 6 June 2012

MR3220 OpenWRT Extroot installation

The TP-Link has OpenWRT installed using either tftp or via the serial port using Kermit. Install the packages for using USB as storage on OpenWRT.

opkg update
opkg install kmod-usb-core kmod-usb-uhci kmod-usb-storage kmod-usb2 kmod-fs-ext4
reboot -f
mkdir /usb
mount /dev/sda1 /usb
mkdir /tmp/root
mount -o bind / /tmp/root
cp /tmp/root/* /usb -a
umount /tmp/root
umount /usb

Now edit the /etc/config/fstab file and add the following.
config mount
option target /usb
option device /dev/sda1
option fstype ext2
option options rw,sync
option enabled 1
option enabled_fsck 1
option is_rootfs 1

Rocks cluster Compute nodes ask for password

I mucked about for ages trying to fix this and came upon this ... Rocks Cluster on Google Groups
The very last bit of advice
Check or restart autofs in frontend
worked.
The actual command used is rocks run host 'service autofs restart'

Monday 7 May 2012

Unbrick Samsung I9000 using Micro USB JIG

I unbricked my Samsung i9000 Galaxy S using a Micro USB Plug and 2 x 100K resistors. It was showing the classic bricked phone to computer with exclamation mark triangle in the middle :(.


From what I've read everyone uses a 301K resistor between the ground and the next closest pin to the ground, but it worked for me with 200K total resistance.
I used the connector from one of those cheap kits that allow you to charge most mobiles and stripped down the Micro USB's shroud (see photo).
I plugged it in making sure the phone was switched off. I then performed the get into download mode (Volume down button Home Button and Power button pressed together) this should then show the yellow download mode. This will allow one to recover the phone.

Tuesday 3 April 2012

OpenWRT and the TP Link WR841N

The WR841N has no USB port on the case but USB is available on the PCB if you can solder and don't mind a bit of work to get it going. I had a problem getting the USB connection I made to the WR841N PCB working. I tried various flavours of patched firmware with no success, however on the OpenWRT Forum someone mentioned just use the TP Link MR3420 firmware. This I did and it worked straight away, smiles all round. I then got extroot to a 2GB memory stick working, this allowed me to add more packages. I added a USB hub to allow the connection of a USB webcam.

Tuesday 20 March 2012

Getting the Arnova 9 G2 into Recovery Mode

To enter Arnova 9 G2 recovery mode, press the esc button then using a paperclip press the recessed reset button (its located on the top edge of the Arnova). It will now enter the recovery mode. A rooted verion of the Arnova9G2 firmware is available here. Plug in the micro USB to your computer I have Windows 7 installed. After a time it should show in the Windows 7 Device Manager with a RK29? Device, ignore the ? Now right click on the RK29? entry and select update driver. Then choose the browse option and navigate to the folder where you unzipped the file you downloaded previously, usually the Downloads folder, "arnova G2_full_root_rom_V1.0_arctools\drivers\32bit\win7" that contains the driver for your flavour of Windows 7, mine was the 32 bit driver. Once Windows has indicated that the driver install was successful you can now run the firmware update tool RK29update.exe located in the root of the arnova G2_full_root_rom_V1.0_arctools folder.
Update
I found that after the update I couldn't enter recovery mode it appears to be as described on Recovery Mode

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.

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...