Monday, December 2, 2013

WiFi Pineapple Mark IV - Clean Flash UART

Mark IV Clean Flash over Serial (UART)


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 Alfa Console Board, You only need to hook up the TX, RX, GND pins to your UART adapter. DO 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)

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



  • 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

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

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 and start the SSH server

Change the root password

Start the SSH server

/etc/init.d/dropbear start

Installing Firmware

scp over the firmware to /tmp/
scp upgrade.bin root@
and perform the upgrade.
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:


Enjoy your new pineapple!, Learn all about it by reading the manual and visit the forums to use your pineapple.

Clean Flash Videos

Windows Clean Flash Video by Mr-Protocol :
(YouTube link:

No comments: