Showing posts with label Hardware. Show all posts
Showing posts with label Hardware. Show all posts

Sunday, October 14, 2012

Retrieve credential values stored in WiFi device

Introduction

When setup a WiFi network using network appliances, an account credential is always required to logon to network services provided by ISP (Internet Service Provider).  For example, using modem router to access ISP’s broadband internet service. 

The ISP account credentials is usually enter once during configuration at first time and it should persist in the device’s RAM is ready to work for next power on.  Compare ISP account credential with the other account credentials like your email account or desktop OS account that use every day, the user tend to forget or lost the ISP account credential easily.  This happens when we upgrade to new WiFI device or hard reset the device due to some technical issues.

This article introduces some software tools to attempt recover the account credential values store in WiFi device.

Retrieve configuration file from WiFi device

Most WiFI devices allow user to backup the configuration in a file.  Read the user guides of the WiFi device to find out if it has the configuration backup option.

For example, most D-Link WiFi device supports configuration backup via HTTP URL.  Enter URL like:

http://192.168.1.1/config.bin

in browser to download the configuration file.  Most configuration are compressed and encrypted.  Some tools is needed to decode the information stored in the configuration file.

Router Pass View

RouterPassView is a software tool to decode the configuration file retrieved from WiFI router.  Please note that not all WiFi device is supported, refer to the web site for a list of supported device.

It is easy to use RouterPassView.  Download and launch the software, open the configuration file in the software and the configuration information should show in text format:

image

Sunday, November 13, 2011

Make host based USB printer work with OpenWrt’s P910nd print server

A host-based printer like HP-LaserJet 1020 needs to download a firmware every time when boot up or else it won’t print.  These printers works fine when connect to Windows that has drivers install.  For Linux, foo2zjs may help upload the firmware to printer by USB hotplug daemon.

It is very hard to make host-based printers work with networked print server appliance as the printer won’t work without firmware.  Most print server appliance don’t have firmware ready or it won’t upload the firmware to printer.

Some print server like D-Link DPR 1061 claims to work with host based printer but it is a different story.  A software (PS-Link or PS-Wizard) is required to deploy on workstations in network to act as USB redirector to send firmware to printer.  This isn’t a favor solution as it increase deployment effort on workstation.

This topic use TP-Link 1043ND wireless router as hardware device to act as printer server alternative to those branded printer server in market.  The TP-Link 1043ND is patched with Gargoyle WRT (backed by OpenWrt).  A small printer daemon p910nd is installed in the device to serve as printer server for network.

Here are some brief steps to install and configure:

  1. Find a low cost router that has few RJ45 network sockets (usually 4 LAN port + 1 WAN port) and USB port
  2. Patch the device with OpenWrt or Gargoyle Wrt
  3. Install p910nd daemon
  4. Download Printer Firmware
  5. Configure USB hotplug daemon to send firmware to printer
  6. Add a printer device in Windows / Linux workstation that print to Standard TCP/IP port (e.g.: Port 9100)

Print Server Device: TP-Link 1043ND

In this article, A gigabit wireless router: TP-Link 1043ND is used as example.  The router has 4 LAN + 1 WAN ports and a USB port mainly for flash drive.  We will make the USB port work with USB host based printer.

Printer: HP Laser Jet 1020

HP laser jet 1020 is a USB host based printer that is not friendly to many network print server in the market.

Patch with Gargoyle WRT

Download suitable flash firmware for TP-Link 1043ND from Gargoyle.  Follow instruction to patch the device.  After finish patching, do some simple configuration:

  1. Set the root access password
  2. Set IP address for the device (e.g.: 192.168.1.1)
  3. Enable SSH access to the device (e.g.: port 22)
  4. Try using SSH console like Putty to access the device

Install software on device

  1. SSH into device. e.g.: ssh 192.168.1.1
  2. Enter “root” as username and supply with password
  3. Update OpenWRT software packages:
    root@Gargoyle:~# opkg update
  4. Install Kernel modules for USB Printer support:
    root@Gargoyle:~# opkg install kmod-usb-printer
  5. Install printer server:
    root@Gargoyle:~# opkg install p910nd

Configure Printer Server: P910nd

  1. Enable p910nd daemon that sustain for device fresh booting:

    root@Gargoyle:~# /etc/init.d/p910nd enable
  2. Start p910nd daemon for current session
    root@Gargoyle:~# /etc/init.d/p910nd start

Printer Firmware

  1. Download a suitable printer firmware (e.g.: http://oleg.wl500g.info/hplj/)
    root@Gargoyle:~# wget -o /usr/lib/sihp1020.dl http://oleg.wl500g.info/hpl
    j/sihp1020.dl
    root@Gargoyle
    :~# ls -al1 /usr/lib/si* -rw-r--r-- 1 126151 Nov 12 16:31 /usr/lib/sihp1020.dl
  2. Create a USB hotplug script file (/etc/hotplug.d/20-hpjl1020) for printer HP1020:
    root@Gargoyle:~# cat /etc/hotplug.d/usb/20-hplj1020
    #!/bin/sh
    
    FIRMWARE="/usr/lib/sihp1020.dl"
    DEVICE=/dev/lp0
    LOGFILE=/var/log/hp
    
    if [ "$PRODUCT" = "3f0/2b17/100" -a "$ACTION" = "add" ]
    then
            for i in $(seq 30); do
                    if [ -c $DEVICE ]; then
                            echo "$(date) : Sending firmware to printer." > $LOGFILE
                            cat $FIRMWARE > $DEVICE
                            echo "$(date) : done." >> $LOGFILE
                            exit
                    fi
                    sleep 1
            done
    fi
  3. You may adjust parameters in the script file to suit you environment.
  4. Product ID: “3f0/2b17/100” is the printer ID for my HP Laser Jet 1020.  Change it to suitable ID for the printer you attempt to connect.  You may attempt to grep the printer ID by patching the script file to output printer id to a log file.

Test Printer Firmware

  1. Plug printer USB cable to device and check log file:
    root@Gargoyle:~# cat /var/log/hp
  2. The log file consist some information that is useful for troubleshooting
  3. Power off both printer and device
  4. Power on both printer and device
  5. Check log file again to make sure firmware may send to printer properly

Print from Windows

  1. Logon to Windows workstation and add a local printer:
    1
  2. Create a new Standard TCP/IP port for the printer:
    2
  3. Enter IP Address for the printer: e.g.: 192.168.1.1
    3
  4. Specify additional information for the connection:
    4
  5. Choose “Raw” protocol and set port number. e.g.: 9100
    5
  6. Pick a suitable printer driver:
    6
  7. You may try to print a test page to the printer.

Reference

  1. p910nd Printer Server. URL: http://wiki.openwrt.org/doc/howto/p910nd.server

Friday, November 11, 2011

Linux: Install Conexant USB modem

This article showing how to install Conexant USB modem on Linux machine.  The Conexant USB module has a RJ11 socket at one end for phone line connection and USB connector on another end to plug into USB port:

Identify modem model

  1. Plug Conexant USB modem into machine.
  2. Identity modem model:
    # lsusb 
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
    Bus 004 Device 002: ID 0572:1324 Conexant Systems (Rockwell), Inc. 
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Download modem driver

  1. Visit http://www.linuxant.com to download the modem driver.
  2. The modem ID in this example is 0572:1324, so DGC softmodem is the suitable driver.
  3. For illustration purpose, this example use dgcmodem-1.13-1.i386.rpm.zip

Build modem driver

  1. Prepare to build modem driver. You may skip some of the following rpm package depends on your system:
    # yum install dgcmodem-1.13-1.i386.rpm 
    # yum install kernel-devel-2.6.33
  2. Configure modem driver:
    # /usr/sbin/dgcconfig
  3. Check modem installation:
    # ls /dev/ttyACM* -al 
    crw-rw---- 1 root dialout 166, 0 Jan  8 15:04 /dev/ttyACM0 
    # ls /dev/modem  -al 
    lrwxrwxrwx 1 root root 7 Jan  8 15:04 /dev/modem -> ttyACM0

Reference

  1. Linuxant. http://www.linuxant.com

Friday, July 23, 2010

A machine equipped with 4 Gig RAM is so lagging running Linux PAE kernel and Windows 7 x64

I have a machine equipped with Intel motherboard DG965RY that has 4G RAM.  The machines work as usual running Windows Vista for years.

I installed Windows 7 x64 on the machine recently and the OS works extremely slow.  The CPU is Intel(R) Core(TM)2 CPU 6600 @ 2.40Ghz.  It should support 64 bits instruction sets as seens in BIOS page showing EM64T.  I first thought it could be CPU or motherboard that doesn’t support x64 OS well.  I then re-install the machine with Windows 7 x86 and it works like a charm.

2 Days later, I try to install AsteriskNOW backed by CentOS 5.5 (kernel 2.6.18-194.3.1.e15PAE) i386 on the same machine.  Again, the machine running the kernel 2.6.18-194.3.1.el5PAE is so lagging.  However, it works as usual if running kernel 2.6.18-194.3.1.el5.

I google for the different between PAE kernel and non PAE kernel.  PAE stand for Physical Address Extension.  A clue sparks on my mind suddenly after knowing from the PAE term that it might be something to do with the memory.  I remember that 32 bits machine have limitation on memory address in Windows Vista x86.  It may only detect 3.5G from 4G RAM installed.

I unplug a 2G RAM from motherboard slot and left 2G RAM to the machine and attempt to run PAE kernel.  It works like a charm.  A good news follow is Windows 7 x64 works extremely smooth with this 3 years old machine too.

I quickly browse the Intel BIOS update page and found there is update regarding addressing issues of 4G RAM.  I download and update the BIOS to the latest version, plug the 2G RAM back to motherboard and boot the machine with 4G RAM.  Both Linux PAE kernel and Windows 7 x64 works smoothly as expected.

Saturday, August 29, 2009

Input Director: Control machines with one set Keyboard and Mouse

In previous article (Title: Synergy: Control machines with one set Keyboard and Mouse), I have introduced a similar solution.  I found Input Director has much better performance and functionalities compare to Synergy.  Input Director also is under active development while Synergy seems cease operation since year 2006.

Installation

In summary, Input Director on the slave system needs to be configured to:

  • Authorise the nominated master system to control (send input) to it
  • Be enabled as a slave

Input Director on the master system needs to be configured to:

  • Add the slave and set an (optional) hotkey for it
  • Configure the position of the slave monitor.
  • Be enabled as the master

Once done, you can immediately see Input Director is working.  For more information, refer to Input Director installation guide.

Nice Features

  1. Ripples surround the cursor for a few seconds after transitioning to help the eye follow the cursor from one computer to another.

    features_ripples
  2. Can also set a key (or keys) that must be held down to permit transitions between systems.
  3. Shared Clipboard - copy and paste between computers (including files!).  I never try this yet.

Reference:

  1. Input Director. url: http://www.inputdirector.com/

Friday, June 12, 2009

Synergy: Control machines with one set Keyboard and Mouse

Note: Please refer to Input Director for better solution.

If you have more than one machine (PC or notebook) on your desktop, you may use new set of keyboard and mouse for each machine on your desktop.  The Synergy application is here to help you reduce the devices on your desk by using just one set of keyboard and mouse to control all machines.  Synergy works on Windows XP, Windows Vista, Windows 7 or even Linux and Mac.

Example

This example show how to install and configure Synergy for 3 machines name as:

  1. Streamyx (OS: Windows XP)
  2. Optimus (OS: Windows Vista)
  3. Windows7 (OS: Windows 7)

Each machine attached with a LCD monitor individually.  The sequence of machines from Left to Right on desk are Streamyx, Optimus and Windows7.
First, install synergy on these 3 machines.  My keyboard and mouse attached to machine Optimus.  Thus, Optimus will be server.

Server Configuration: Optimus

Start synergy and click "Share this computer's keyboard and mouse (server)".

1

Click “Advance” button to set server’s parameters:

3

Press “Configure” button to configure:

  1. Add three machines’ screen name to “Screens” list box.
  2. A link is a pair of distinct adjacent screen.  Each adjacent pair must configure as 2 links.  For example, “Streamyx is left of Optimus” and “Optimus is right of Streamyx”

2

Click “Test” or “Start” button start synergy service.

Client Configuration: Streamyx and Windows7

Synergy configuration on client machines are simple:

  1. Click “Use another computer’s shared keyboard and mouse (client)”
  2. Enter the server host name (optimus)
  3. Click “Test” or “Start” button to establish connection

4

You may now enjoy using one set of mouse and keyboard to control three machines.

References:

  1. http://synergy2.sourceforge.net/

Saturday, February 07, 2009

Flash your motherboard BIOS to the updated version

MotherBoard BIOS get updated from time to time from vendor for the fixed.  Some unusual and performance issues happening to your OS may be BIOS's bug.  It is always encourage to update your BIOS to the latest available version.

Performing BIOS update need extra care.  Here are some rules to follow:

  1. During the flashing period, your PC must always stay on with power.  Any power failure in between may make your PC totally un-bootable
  2. Always check current BIOS version with the latest version to make sure you download and updated with correct one.

In old day, the BIOS update file size always fit to a 1.44MB floppy disk.  We just create a floppy image from the BIOS flash disk image and boot from the floppy disk will complete the update task easily.  However, PC do not equipped with 1.44MB floppy drive nowadays.

BIOS flash file size is getting bigger now can't fit into a 1.44MB floppy disk.  Vendor may recommend user create a bootable USB flash drive and copy the files into it and boot your PC from bootable USB flash drive.  Other vendors may have a utility to install a software into your Windows Operating System to perform update.

For me, I like the bare bone method that just run a simple flash .EXE utility on DOS.  However booting from DOS is not easy now.  One easy option is:

  1. Create a PXE environment in your network
  2. Setup a DOS image that support network in PXE boot option.
  3. Copy flash utilities and BIOS file in network share folder
  4. Boot your PC from PXE environment and select the DOS image
  5. Run the flash utility

This purely network BIOS updating solution should works usually.