Differences

This shows you the differences between two versions of the page.

toh:trendnet:tew-712br [2012/12/25 21:42]
supaplexin
toh:trendnet:tew-712br [2013/01/24 22:31] (current)
magoo
Line 114: Line 114:
UART pinout: UART pinout:
{{:toh:trendnet:tew712s.jpg|}} {{:toh:trendnet:tew712s.jpg|}}
 +
 +===== Debricking Guide =====
 +
 +
 +==== Materials Required ====
 +    USB To RS232 TTL PL2303HX Converter Module 3.3V, or similar serial/tty converter
 +    Solder and soldering iron
 +    Large paper clip or header pins from an old circuit board
 +    LAN cable
 +    Computer with USB interface (the procedure given here assumes Ubuntu/Debian OS)
 +
 +==== Preparation ====
 +Router- Solder header pins to the TX, RX and GND sockets shown above.  I used the straight sections of a large paper clip as pins.
 +Computer- Install the required software:
 +    $ sudo apt-get install tftp tftpd xinetd cutecom gedit
 +
 +==== Procedure ====
 +
 +Router- Connect the converter module wires from the TX on the router to the RX on the converter, RX to TX and GND to GND (the power will come from the router, so we do not connect that). Connect the adapter to an open USB port.
 +
 +Computer- To find the adpater, run the command:
 +    $ dmesg | grep tty
 +
 +You should see something like the following, showing which USB it is associated with:
 +  [    0.000000] console [tty0] enabled
 +  [    0.362312] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
 +  [    0.383277] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
 +  [ 5024.119425] usb 2-10: pl2303 converter now attached to ttyUSB0
 +
 +Connect a LAN cable between a LAN port on the router and an Ethernet port on the computer.  Set the interface on the computer for static with an IP address  192.168.10.100 with a mask of 255.255.255.0 and a gateway of 192.168.10.1. 
 +
 +Now is a good time to prepare the tftp server to server the firmare file. 
 +Issue the command:
 +    $ sudo gedit /etc/xinetd.d/tftp
 +Paste the following in the editor window and save the file:
 +       
 +        service tftp
 +        {
 +        protocol        = udp
 +        port            = 69
 +        socket_type    = dgram
 +        wait            = yes
 +        user            = nobody
 +        server          = /usr/sbin/in.tftpd
 +        server_args    = /tftpboot
 +        disable        = no
 +        }
 +
 +Now we need to create the directory that will serve the firmware and make it writable.  In the example below, replace "ubuntu" with the user that is logged in:
 +
 +    $ sudo mkdir /tftpboot
 +    $ sudo chown ubuntu /tftpboot
 +
 +Create a .trx file of the factory firmware by downloading the firmware from the Trendnet site and placing it into your OpenWrt build directory.  Then run the build root script: "dd bs=84 skip=1 if=t.bin of=t.trx"  replacing "t" with the name of the factory firmware file.  I have uploaded an example .trx [[http://www.4shared.com/folder/-ziCeDyh/TEW-712BR.html|here]]
 +
 +Copy the .trx file to the /tftpboot directory.
 +       
 +Restart xinetd:
 +
 +    $ sudo /etc/init.d/xinetd restart
 +
 +Start cutecom. I start it from the command line with sudo to make sure I have access to the USB service.
 +Confirm the following settings: device = /dev/ttyUSB0 (or whichever USB your device is on), baud = 115200, data bits = 8, stop bits = 1, parity = none, handshake = hardware.  Open for reading, and writing and apply settings when opening should all be checked.
 +
 +Press the "open device" button and turn on the router.  There is a 2 second delay before it boots the firmware.  If you type ctrl+c, it will interrupt the boot cycle and bring you to the "ar7240>" command prompt.  Now we can run ping to see if the router sees our server.
 +
 +  ar7240> ping 192.168.10.100
 +
 +  dup 1 speed 1000
 +  Using eth1 device
 +  checksum bad
 +  host 192.168.10.100 is alive
 +
 +Next we transfer the firmware from the server to the router's RAM:
 +
 +  ar7240> tftpboot 0x80000000 TEW712BR_FW100B12.trx
 +
 +  Using eth1 device
 +  TFTP from server 192.168.10.100; our IP address is 192.168.10.1
 +  Filename 'TEW712BR_FW100B12.trx'.
 +  Load address: 0x80000000
 +  Loading: *\0x08checksum bad
 +  #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 #################################################################
 +  \0x09 ########################################################
 +  done
 +  Bytes transferred = 3276804 (320004 hex)
 +  ar7240>
 +
 +Now we erase the targeted area of ROM
 +
 +  ar7240> erase 0x9f070000 +0x390000
 +
 +Copy to ROM:
 +
 +  ar7240> cp.b 0x80000000 0x9f070000 0x390000
 +
 +Reboot the router:
 +
 +  ar7240> bootm 0x9f070000
 +
 +In a minute or two, you should be able to access the router via the factory web ui at http://192.168.10.1
 +
 +
 +
 +
 +

Back to top

toh/trendnet/tew-712br.1356468123.txt.bz2 · Last modified: 2012/12/25 21:42 by supaplexin