Linksys WRT150N v1 Serial mod

20. May 2008

Overview

 
  • Locate a serial port on the main board
  • Convert the serial port signals from 3.3 Vcc to 5 Vcc to enable communication with a standard PC
  • Create a small test circuit with the parts required to convert the signals from 3.3Vcc to 5 Vcc

Locate serial port on main board

The WRT150N has a serial port located on the front of the circuit next to the security button. When the router is open and seen from top front the pins are located as follows (left to right)

  1. Ground
  2. Not used
  3. Rx
  4. Tx
  5. Vcc 3.3v

The connecter mounted to the main board are shown below. The other wires on the board should be ignored they are from a previous SD mod.

IMG_7872 - Copy
Serial port pins added to WRT150N v1 circuit.

Converting the serial port on the main board to a PC compatible serial port

To use the serial port with an ordinary PC the voltage has to be raised to 5 Vcc which the RS232 operate on. This can be done by using a MAXIM 3232CPE IC which has support of converting two serial ports from 3.3 Vcc to 5 Vcc.

 l7258l7259

Description from www.elfa.se/dk/

3,0 till 5,5 V RS232-sändare/mottagare Fabr Maxim Transceiver för +3,3 och +5 V-system. Behöver endast 4 st 0,1 μF kondensatorer. Pinkompatibel med MAX 232
MAX3232CPE

Creating a small test circuit with the MAXIM 3232 IC

Here a small print has been fitted with the required components, the MAXIM 3232 IC and the corresponding compensators. The IC is powered by the Gound and 3.3Vcc from the connector described above.

The serial port DB9 and connector from the main board is attached as shown:

  • PIN 11: T1IN to main board Tx
  • PIN 12: R1OUT to main board Rx
  • PIN 14: T1OUT to Rx on serial port connector
  • PIN 13: R1IN to Tx serial port connector

The rest of the PIN connection can be seen in the data sheet for the MAX3232CPE.

IMG_8350 IMG_8349

IMG_8348 IMG_8347 

You can now use the serial port with your PC. If you don't have a serial port on your laptop etc you can use a serial port to USB cable.

The serial port is used by the kernel to send debug information under startup and continues send log messages. The port setting is 115200 8N1.

References

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Wireless router firmware , ,

Linksys WRT150N v1 SD Mod Guide

8. May 2008

Content

  • Introduction
    • The SD card
    • Finding suitable IO points
      • Finding ground
      • Finding power, 3,3 volt
      • Finding general IO output points
      • Finding general IO input
    • The wiring layout
  • Implementing the modification
    • Wiring points
    • Setting up DD-WRT to support the modification
    • Editing files and folders on the card

Introduction

This blog post guides you through adding a SD card interface to a Linksys WRT150N router. This guide is guild upon the SD/MMC Mod guide found on the dd-wrt web site.

Adding a SD card to your router enables more space to store logs/files or install additional programs and since a standard edition of the dd-wrt fills up most of the space available on the router it leaves only a little space for you to play around with. Since you with the SD card are able to increase the storage available to 1-2GB or more you can host a little FTP or WEB server.

As an alternative to doing this mod of the router is sharing a folder on your computer so it can be used by the router. This can be done through the Samba shares which is supported by dd-wrt this is the standard used by windows. (Samba works only over a wired line) The Samba Filesystem

The SD Card

If we take a look at the SD card we want to add to the router we can see that only a small amount of the SD pins is needed to control it.

 

SD Pin SD function(SPI Mode) Direction
1 Chip Select (CS) IN
2 Data In (DI) IN
3 Ground -
4 Vcc (3.3v) -
5 Clock (CLK) IN
6 Ground -
7 Data Out (DO) OUT
8 Reserved -
9 Reserved -

The SD card

WHR_G54S_SD_MOD-SD_Card

From this we can se that we need the following pins

  • Ground
  • Power 3,3 volt
  • 2-3 output pins (We can just ground to Chip select, then we need the Clock and DI)
  • 1 input pin (The data out from the SD card)

 

Finding suitable IO points

The SD card operate at 3,3 volt there fore wee first need to find a ground and Vcc connection point on the circuit board. When the SD card are powered up it needs some way of communicating with the rest of the router; we need to find at least 2 output pins and one input pin.

Finding ground

We need to find a grounded point this is very easy since it is present all over the PCB. Normally all metal housings are fore example connected to ground.

Finding power, 3,3 volt

Since the power supply on the router is 12 DC we can not use it directly we need another power source from the circuit board where we can measure 3,3 volt DC.

Finding general IO output points

Output means some way we can control the SD card. Here the LEDs are the most obvious choice. You can find out which LEDs are software controlled by loggin into the router by telnet or SSH and using the gpio command to test the IO ping from 0 to 9 looking for a LED shifting from on to off-on-off and so on.

  • gpio enable <IO pin number> # to enable a IO pin, which switches the LED off
  • gpio disable <IO pin number> # to disable a IO pin, which switches the LED on
  • gpio poll <IO pin number> # to read the status of a switch

Here are a little script to make the pin switch between 0 and 1:

  • while true; do gpio disable 1; sleep 3; gpio enable 1; sleep 3; done

 

Finding general IO input

To find an input pin use:

  • gpio poll <IO pin number>

Then you will se a 00 or 01 when it goes on and off.

The wiring layout

Now the important part. I made the IO tests as described above and found the following:

GPIO PIN Usage on WRT150N v1
GPIO 0 -
GPIO 1 OUT: Power LED
GPIO 2 -
GPIO 3 OUT: Security LED Orange
GPIO 4 IN: Security Switch
GPIO 5 OUT: Security LED Green
GPIO 6 IO: Reset - don't set this pin high your router will reset it self.
GPIO 7 -
GPIO 8 -
GPIO 9 -

Here are how I decided to wire the SD card:

SD Pin SD function(SPI Mode) Router IO Router PIN description Wire color
1 Chip Select (CS) Ground   Black
2 Data In (DI) GPIO 5 Security LED Green Yellow
3 Ground Ground   Black
4 Vcc (3.3v) Vcc 3,3 v   Red
5 Clock (CLK) GPIO 3 Security LED Orange Green
6 Ground Ground   Black
7 Data Out (DO) GPIO 4 Security Switch White
8 - - - -
9 - - - -
         

 

Implementing the modification

Wiring points

WRT150N_basic_SD_MOD_wiring_half

Remember to solder to on the negative side of the LED the other side is not lowered enough to change to logical zero.

I tool the power and ground from JP2 (listed from right to left):

  • Ground
  • -
  • -
  • -
  • Vcc 3,3 v

Now you have to solder the SD card to your print. I took a socket from an old USB 7 in 1 card reader.

IMG_7916 IMG_7895 IMG_7894

Here are some pictures of the soldering of my router

IMG_7888

IMG_7889 IMG_7872

07052008(004) 07052008(005) IMG_7873 IMG_7875

Now we have to get this new par (the SD card socket) fit nicely inside the plastic box.

IMG_7897 IMG_7899
IMG_7900 IMG_7902
IMG_7904 IMG_7907
IMG_7908 IMG_7910
IMG_7912

Setting up DD-WRT to support the modification

Now login to the dd-wrt web GUI and set the GPIO pins

dd-wrt_web_gui_mmc_gpio

If you want to use the SD card for storing JFFS/IPKG then you have to mount it.

  • Turn on jffs in the web admin
  • Execute this command: mkdir /mmc/jffs
  • Put this line in the startup script: --bind /mmc/jffs /jffs

The SD card will be formatted as EXT2 on startup so be patient it has to format it at first start. But you can see the interaction with the card on the LEDs.

 

Editing files and folders on the card

You can use WinSCP to access the cart from your computer. Remember to use SCP.

Installing packages on the router:

Guide

Preparing /jffs for /opt

  • ~ # mkdir /jffs/opt
  • ~ # mount -o bind /jffs/opt /opt

Installing ipkg-opt and uclibc-opt

Search PATH

  • ~# export PATH=/opt/bin:/opt/sbin:$PATH
  • unset LD_LIBRARY_PATH

Search

  • ~ # /opt/bin/ipkg-opt list '*ftp*'

Source material

DD-WRT site

sd mmc mod.pdf (1.43 mb)

ipkg-opt.pdf (177.48 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Wireless router firmware

Debrick Linksys WRT150N

24. February 2008

Linksys WRT150N does not response to anything, no LAN response at all.

  • Step 1
    • Setup your PC with a static IP address 192.168.1.77 submask 255.255.255.1 and default gateway 192.168.1.1
    • Connect a LAN wire to one of the LAN port and start a ping -t 192.168.1.1 and look for the response. Try all the reset options: http://www.dd-wrt.com/wiki/index.php/Reset_And_Reboot
  • Step 2
    • Now we know that de device does not work. You do not receive any IP packaged's on your wire.
    • Disassemble the box. There is 4 tox screws on the button under the redeemable plastic cover.
    • IMG_7317 IMG_7326
      IMG_7327 IMG_7325
      IMG_7329 IMG_7318
      IMG_7319 IMG_7323
  • Step 3
    • Try short wiring two of the pins on the flash chip. Ping 16 & 17. http://voidmain.is-a-geek.net/redhat/wrt54g_revival.html
    • Short circuit ping 16 & 17 - Chip VER: 1.00.5 CS:F898 - the one with the two red dots on. Power the device up when short circuiting and se if the ping gets a response.
      IMG_7322
  • Step 4 Recovery by JTAG cable http://www.dd-wrt.com/wiki/index.php/Recover_from_a_Bad_Flash
    • Step 3 did not work. We the has to create a JTAG. To program the circuit directly from the computer. :-(
    • Construction a JTAG: There is a simple and easy way to construct such a device. You need:
      • A parallels connector
      • 4 x 100 Ohm resistors
      • Some wire not to long (15 cm)
      • A Connector socket for the circuit board & connector for the wire ass well.
    • Assemble the parts as shown below
      JTAG 
      IMG_7330 IMG_7331
      IMG_7332
    • Now the wire is ready now the circuit board has to be prepped as well. There is two connectors for the JTAG on the board. JP1 & JP3. Here it is the JP1 you have to use.
       IMG_7324
    • Download the tjtagv2.zip (769,27 kb). Connect the cable to the pc then the WRT150N JP1 and power up the WRT150N.
    • Set up the tjagv2 as described in the zip. Then start a command prompt and fire the commands:
      • tjagv2 /probeonly /noemw
        • Now you should get something like:

    =================================================
    WRT54G/GS EJTAG Debrick Utility v4.8-Tornado-MOD
    =================================================
    Probing bus ... Done
    Instruction Length set to 8
    CPU Chip ID: 00010101001101010100000101111111 (1535417F)
    *** Found a Broadcom BCM5354 KFBG Rev 1 CPU chip ***

    - EJTAG IMPCODE ....... : 00000000100000010000100100000100 (00810904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes

    Issuing Processor / Peripheral Reset ... Done
    Enabling Memory Writes ... Skipped
    Halting Processor ... <Processor Entered Debug Mode!> ... Done
    Clearing Watchdog ... Done

    Probing Flash at (Flash Window: 0x1fc00000) ... Done

    Flash Vendor ID: 00000000000000000000000010001001 (00000089)
    Flash Device ID: 00000000000000001000100011000011 (000088C3)
    *** Found a Intel 28F160C3 1Mx16 BotB (2MB) Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00200000
    - Selected Area Start ........ : 00000000
    - Selected Area Length ....... : 00000000

    *** REQUESTED OPERATION IS COMPLETE ***

    •  
      • tjagv2 -rease:nvram
        • it will show all the addresses it erases. Now the device should start responding to the pings, which was the case for me. :-) If you have accidentally delete the whole flash you need to put back a bootloader cfe.bin. I made a backup of mine here: CFE.BIN (256,00 kb) for WRT150N.

References:

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Wireless router firmware

Install DD-WRT on Linksys WRT150N - be careful

24. February 2008

I have a Linksys WRT150N and want to try installing dd-wrt on the router to solve a problem with one of my computers which keeps disconnection from the router when a large file transferee is started.

Install instructions for WRT150N on the dd-wrt site.

I want to upgrade. I stated by uploading the dd-wrt firmware through the web interface, but it didn't work. After reset the router didn't response at all.

The mini build bricked my router. Read this blog post to see how to unbrick the router. http://blog.lausdahl.com/post/Debrick-Linksys-WRT150N.aspx

After the router has been unbricked I was really happy I thought it was a useless box but it came back.

Installing the standard version of dd-wrt.v23_sp2_standard.zip caused the dd-wrt firmware to recognize my router as a WRT300N. Then the wireless didn't work. To solve this problem I looked at the RC version WRT150N_v1 then the router upgrade was complete. It works perfect :-)

 

 

wrt150n

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Wireless router firmware