Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
Reply
New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

Just to summarize my two posts above, this would be a pretty involved and not very trivial debugging process. It is not really point and click. Lot's of things could be acting strange.
So if in doubt and lack of time/wish to pursue this, go official support way.

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

One more guess and I'm out Icon Neutral (just giving some troubleshooting starting points here, really not much): check that you are using an image build for your specific device and version (do Ubnt AP models have versions? don't have one handy to check). If at any point the board used for that model changed, that means different kernel in the image and it might throw that CRC error. For the boards I play with it usually throws an unknow machine type and then stalls, not a CRC error, but this could also be a lead.

New Member
Posts: 5
Registered: ‎10-02-2013
Solutions: 1

Re: HOWTO: Unbrick your UniFi AP

Thank you. Tried all the suggested. Even took a good u-boot from another AP and placed it on the broken AP. No change. I contact support, and they replied that 3.1.10 was not a stable build and that I should stay with 2.4.6.

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

Hmm, strange, I had no problems with 3.x on any of my APs. Seems they may have a good reason to still keep things in beta, then. Idea

New Member
Posts: 18
Registered: ‎10-16-2013
Kudos: 4

Re: HOWTO: Unbrick your UniFi AP

[ Edited ]

@vali_cheche

You have been the most helpful on this issue so far. I am going to try some of the things you outlined when I get a chance to look at the AP's again. The weird thing is though when I run 2.4.6, I get no wireless channel on my 3.1.10 controller. The AP's just show up needing firmware upgrade, but no wireless is active or showing up my android wifi scanner app.

Do you know of any way to erase the memory and force image writing over ttl? I can't say I have tried this and no one seems to have a dumbed down guide to do such.

BTW. thanks for all your help.

P.S. got another one doing the same thing today so it totals 3 now.

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

[ Edited ]

Glad I can help a bit. Myself I am a beginner in the electronics and embedded world, coming from an IT admin background. Smiley Happy

Afaik, there is no way to do a full reflash via TTL only, as TTL serial is bootloader dependant. There are SoC devices that are able to boot a bootloader via TTL, but not many, and that's about it (I have this feature on a Marvell based NAS). But that is also controlled by the hardware boot sequence.

The only way I see to achieve a clean factory flash would be via the JTAG. A Bus Blaster with OpenOCD should come in handy here.

Unfortunatelly I only have 3 standard APs (not LR), and are all in production. So I cannot play with them risking to brick them. However, this aside, I do have an itch to take one down and see if I can figure out the JTAG on it...maybe make some clean flash dumps just in case I or anybody else needs them. But for this I really need to settle my life a bit. I'm quite on an infernal schedule lately. Devil
However, the JTAG thing might be a long shot, as some board designs are really locked down even on this interface. I don't expect this from Ubiquity, but you never know.

If you experience such issues with the 2.4.6, which is rock stable, I would really say hardware failed you. Something is really not working as it should anymore.

As soon as I get more info on these boards I'll drop it here.

Cheers.

Member
Posts: 164
Registered: ‎04-27-2013
Kudos: 10
Solutions: 2

Re: HOWTO: Unbrick your UniFi AP

Okay, after two or three hours trying to get it to work...

I got an UAP, bricked. TTL console is working.

 

U-Boot unifi-v1.3.3.124-ge1a2c421 (Sep 27 2013 - 13:13:30)

Board: Ubiquiti Networks AR7241 board (e502-16.0101.002e)
DRAM: 64 MB
Flash: 8 MB
*** Warning - bad CRC, using default environment

*** saving default environment ...
Un-Protected 1 sectors
Erasing Flash.... done
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protected 1 sectors
Net: eth0, eth1
Hit any key to stop autoboot: 0
## Booting image at 9f050000 ...
Bad Header Checksum
ar7240>

 

I tried many tricks, TFTP never works. Not from a client, not from a server (tftpboot), no nothing.

I can upload files over YMODEM, but then what ?

 

@mehuneau
Member
Posts: 164
Registered: ‎04-27-2013
Kudos: 10
Solutions: 2

Re: HOWTO: Unbrick your UniFi AP

loady
## Ready for binary (ymodem) download to 0x81000000 at 115200 bps...
CCCCCCC

Then, the YModem hangs at 97% or so, eventually closes, and I'm stuck at CCCCC

 

 Also, I'm uploading 2.4.6 firmware.bin, correct file.

 

@mehuneau
New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

hi can you help me with the pinout diagram for DB9 female to connect unifi -LR to hyperterminal as i dont have a USB-TTL cable Man Sad

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

The pinout is one Google search away, really now. BUT:
DON'T DO IT!. The TTL level adapter is not there just for kicks.

The USB to TTL cable actually performs more then one function:
- provides a clasic COM Serial interface attached via USB

- brings the voltage levels to 3.3 V max at the AP UART and back at 5-12V at the COM port.

 

So, if you have a serial COM on your PC, this operates at 12-16V. Plug that into the UART pins, which operate at 3.3V, and you get yourself a nice fried AP. For good. You NEED a TTL level shifter. And as it is way more cost efficient and handier, do yourself a service and get a USB to TTL cable. They are everywhere online and offline.

cheers.

New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

Hi Got the USB To TTL cable and tried to push 2.4.6 Bin file /BZ2/firmware but after updating its not booting please see the file attached .. any help ??????

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

[ Edited ]

You are good, u-boot is still there and you can push the image again, no big harm done. Smiley Happy

 What Unifi device are we talking about here? Are you sure you used the correct image for it?

(unfortunatelly I have no Unifi hardware to test with anymore, I handed over all the sites where I had them installed, so will do this by memory. Anyone pls jump in if I go unspecific in my advice. Smiley Frustrated)

EDIT: I don't remember to have seen this when reflashing any of my devices, maybe you have some bad images, bad cable or something:

Waiting for connection: checksum bad                                    
checksum bad            
| 
New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

@Marc-Etienne: Maybe I'm a bit to late, but I think you scrambled your u-boot environment. You should fix that before testing anything else. The bellow sequence appears everytime u-boot does not find a valid enironment.

*** Warning - bad CRC, using default environment

*** saving default environment ...
Un-Protected 1 sectors
Erasing Flash.... done
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protected 1 sectors

 

New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

i am having Unifi UAP -LR  and i have controller version 2.4.6 and taking firmware version from /unifi/dl/firmware/Bz2/firmware.bin is this correct or do i need some other file ???? 

New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

where do i find the correct image file to upload for UAP LR . my controller version is 2.4.6

New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

[ Edited ]

Yes, that should be it, according to bundles.json (/usr/lib/unifi/dl/firmware/bundles.json, if on linux. On Windows it is a similar location.)

{'U2L48': {'path': 'U2S48/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP48-LR'},
 'p2N': {'path': 'BZ2/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'PicoStation M2'},
 'U2S48': {'path': 'U2S48/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP48'},
 'U2O': {'path': 'BZ2/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-Outdoor'},
 'BZ2LR': {'path': 'BZ2/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-LR'},
 'U2HSR': {'path': 'U2S48/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-Outdoor+'},
 'U5O': {'path': 'BZ2/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-Outdoor 5G'},
 'U7O': {'path': 'U7E/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-AC Outdoor'},
 'U7E': {'path': 'U7E/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-AC'},
 'U7Ev2': {'path': 'U7E/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-AC v2'},
 'U7P': {'path': 'U7P/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP-Pro'},
 'BZ2': {'path': 'BZ2/2.4.6.2178/firmware.bin', 'version': '2.4.6.2178', 'display': 'UniFi AP'}}

 

You should check on that TFTP issue with Checksum.

Also, it might only be a serial glitch, but this looks not cool. (write address is not fully printed)

Erased 12 sectors                 
        writing to address 0x9f050000, length 0x000c0000 ...                                                            
write addr: 9f             

 

Compare to how it should look: (write address is fully printed)

Erased 72 sectors                 
        writing to address 0x9f150000, length 0x00480000 ...                                                            
write addr: 9f150000                    

 

I would check on all the connections again and try another push of the firmware.

Are you using linux or windows for the tftp and ttl connection? You might try to switch OS. I noticed a bare Ubuntu or Debian with no iptables is easier to use for this kind of tasks then Windows, but it might be only my work habits.
Smiley Tongue

Member
Posts: 164
Registered: ‎04-27-2013
Kudos: 10
Solutions: 2

Re: HOWTO: Unbrick your UniFi AP

Any idea how I could fix the u-boot environment ?!
@mehuneau
New Member
Posts: 21
Registered: ‎08-16-2013
Kudos: 14

Re: HOWTO: Unbrick your UniFi AP

[ Edited ]

On a working AP, same model, stop boot via serial and issue the command printenv to u-boot to get the correct environment setup printed out and carefully save it to a text file for reference (pay attention to any copy-paste errors).

 

Then, on the faulty one, stop u-boot and also issue a printenv

For every variable displayed, issue setenv [variable_name_here]. This will clear the default env, one by one, that is automatically setup. It's tedious, but the safest method.

Then, for every line displayed on the working AP printenv output, set the variables on the faulty one.

setenv [var_name_here] [var_value_from_working_AP]

 

Then issue a printenv again, check for any typos, miss-outs etc.

If all seems ok, save the env to ROM with saveenv.

Issue a reset and you should be ok.

 

DO NOT ISSUE saveenv if you are not sure about the consistency of your typing. Triple check. Five times. Smiley Very Happy A valid but badly configured env may get you in bigger trouble than a corupt/inexistent one.

 

[EDIT]: I did not do this on any Unifi AP. This is standard u-boot procedure and should work ok on most u-boot boards. UNLESS the manufacturer is using an u-boot build that blocks users to make env changes from the console issued commands (i.e. the command saveenv will not actually write it to ROM). I only came across one board that had this limitation, a Lacie NAS, very long time ago.
If this is the case, no harm can be done by the above, but upon reset the env will still be missing/default. In this case, an unlocked u-boot build is needed or another method of writing the env to flash. And is out of the scope of my current expertise or this thread. So help me God. Smiley LOL

New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

Receiving file from 192.168.1.254:61158 Received 5683852 bytes Firmware Version: BZ.ar7240.v2.4.6.2178.131008.1132 Setting U-Boot environment variables Will not overwrite u-boot partition! Skipped. Copying partition 'kernel' to flash memory: erasing range 0x9F050000..0x9F10FFFF: ............ done Erased 12 sectors writing to address 0x9f050000, length 0x000c0000 ... write addr: 9f050000 Copying partition 'rootfs' to flash memory: erasing range 0x9F150000..0x9F5CFFFF: ........................................................................ done Erased 72 sectors writing to address 0x9f150000, length 0x00480000 ... write addr: 9f150000 Firmware update complete. Resetting... U-Boot unifi-v1.3.3.124-ge1a2c421 (Sep 27 2013 - 13:13:30) Board: Ubiquiti Networks AR7241 board (e512-6.0101.002e) DRAM: 64 MB Flash: 8 MB Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Image Name: MIPS Ubiquiti Linux-2.6.15-5.2 Created: 2013-10-08 18:37:43 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 729748 Bytes = 712.6 kB Load Address: 80002000 Entry Point: 80002000 Verifying Checksum at 0x9f050040 ...OK Uncompressing Kernel Image ... OK Starting kernel ... Booting...

 

 

"i have changed the OS and the PC after firmware upload it stucks on booting "

New Member
Posts: 12
Registered: ‎12-11-2013

Re: HOWTO: Unbrick your UniFi AP

Decoding error = 1
LZMA ERROR 1 - must RESET board to recover

Reply