Skip to content

mk4guidecleanflashserial

Hak5Foxtrot edited this page Apr 15, 2013 · 27 revisions

Mark IV Clean Flash over Serial (UART)

   

Attention!

DO NOT USE ON BATTERY POWER!

Always use the AC Adaptor.

Why you would want to clean flash

  -Because you somehow bricked your pineapple
  -You have a new Hornet-UB (Hornet-UB only has the bootloader, no OpenWRT)

Where to connect the UART

To open the Pineapple/Jasager/AP121U, you will need to remove the 2 rubber stoppers on the bottom of the device to reveal 2 screws. Remove the 2 screws and you should be able to wiggle it apart.

UART Adaptors

There are many USB/Serial to UART adapters out there. The author of the video below (Mr-Protocol) used the Alfa Console Board. Any 3.3v capable UART adapter should work. Check the adapter specifications before buying. You can also buy a UART Adaptor from the Hakshop.

If you are not using the <a href=http://www.alfa.com.tw/in/front/bin/ptdetail.phtml?Part=consoleboard&Category=0>Alfa Console Board, You only need to hook up the TX, RX, GND pins to your UART adapter. <font color=redDO NOT hook up the VDD pin to your adapter.

Hardware Used

  Alfa Console Board Or any USB-UART 3.3v Adapter
  Serial Cable from PC to Alfa Console Board (If you are using a serial port on PC and the Alfa Console Board)
  Ethernet Cable
  AC Power Adapter
  WiFi Pineapple (AP121U)(Hornet-UB PCB)

For non-Alfa Console Board hookup

UART RX Pin —– Hornet TX Pin

UART TX Pin —– Hornet RX Pin

UART GND Pin —– Hornet GND Pin

(Take note of the cross between RX-TX)

DO NOT plug in the voltage pin.

Depending on how the UART manufacturer labeled TX and RX, you may need to swap them if you don't see data in your terminal session.

Software Tools (Windows)

  -tftpd32
  -WinSCP
  -PuTTY or your favorite serial terminal.
  -Hornet-UB Factory Firmware (Files)
  -Latest Mark IV Firmware

Software Tools (Linux/*buntu)

  -tftpgui - Simple tftp server. Make sure you have the correct Python dependencies installed for the one you download. Read the readme file to   understand how to use it. Extract tftpgui, then extract factoryFiles.tar to the tftpgui/tftproot/ directory. sudo python tftpgui –nogui
  -scp
  -Minicom or your favorite serial terminal. Read the man page for setting baud and other options. sudo minicom -w -s
  ,-Hornet-UB Factory Firmware (Files)
  -Latest Mark IV Firmware

Instructions

Setup

  -Download Hornet-UB Factory Firmware (Files))
  -Extract the factory files and set up a tftp server (tftpgui, tftpd32, etc.) that points to the files.
  -Setup your computer to allow scp. For Windows: WinSCP
  -Connect to your pineapple through serial. Serial Settings: 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control
  -Connect via the pineapples PoE/LAN port (the one closest to the power plug) with your computer's IP set to 192.168.2.11

Apply Power and Configure

When the bootmenu shows up, Press '1'

  Execute these commands :

setenv bootargs "board=ALFA console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd"
saveenv
tftp 0x80600000 kernel.bin
erase 0x9f650000 +0x190000
cp.b 0x80600000 0x9f650000 d695a
tftp 0x80600000 rootfs.bin
erase 0x9f050000 +0x600000
cp.b 0x80600000 0x9f050000 23d004
bootm 0x9f650000
reboot

If you see kernel panics, start over.
Wait for the pineapple to boot then hit enter, you will drop into the OpenWRT Shell.

Change the root password

This will allow you to change the root password to be able to scp the upgrade.bin firmware.
***passwd***

Install the Pineapple Firmware

Start dropbear
/etc/init.d/dropbear start

Installing Firmware

  -scp over the firmware to /tmp/
***sysupgrade -n -v /tmp/upgrade.bin***

At this point, the Jasager firmware is being installed. When it's finished and you have a command prompt: reboot

Post-Installation

Enjoy your new pineapple!, Learn all about it by reading the _manual_ and view the _quickstartguide_ to use your pineapple.

Clean Flash Videos

Windows Clean Flash Video by Mr-Protocol :
http://www.youtube.com/watch?v=i58XOF4Rfc4

  -

Clone this wiki locally