greatscottgadgets / hackrf

low cost software radio platform
https://greatscottgadgets.com/hackrf/
GNU General Public License v2.0
6.6k stars 1.53k forks source link

Hack RF not detecting, firmware update not working #456

Closed SujayNarayana closed 5 years ago

SujayNarayana commented 6 years ago

Steps to reproduce

  1. Connect HackRF to PC

Expected behaviour

HackRF should be detected in PC. USB LED should glow

Actual behaviour

HackRF is detected as Unrecognized device. Only 3V, 1.8V and RF LEDs are glowing.

Version information

Operating system: Win 7

DESCRIPTION: I connected HackRF to PC. It is being recognized as "Unknown device". I had installed the HackRF driver from Zadig earlier and it was working. Now, all of a sudden it is not working. Hackrf_tools is not detecting HackRF.

I tried updating dfu firmware as mentioned in the webpage. In DFU mode, Only RF and 3V LEDS glow. The output is as follows.:

hackrf_info output:

_dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

DFU suffix CRC does not match A valid DFU suffix will be required in a future dfu-util release!!! Opening DFU capable USB device... ID 1fc9:000c Run-time device DFU version 0100 Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0100 Device returned transfer size 2048 Copying data from PC to DFU device Download [=========================] 100% 22056 bytes Download done. unable to read DFU status after completion can't detach Resetting USB to switch back to runtime mode_

After this the hackrf disconnects from PC and as earlier 3.3V, 1.8V and RF LEDS glow.

I tried programming LPC4320 with the latest firmware "hackrf_one_usb.bin" using JTAG. I could successfully program HackRF but no luck, same behavior.

PCB has no burn mark or burn smell.

mossmann commented 6 years ago

Can you please try connecting the HackRF to Linux PC? If you do not have a Linux installation, I suggest downloading the GNU Radio Live SDR Environment

mossmann commented 6 years ago

Once connected to a Linux box, check to see if the USB LED lights up and look for 1d50 in the output of lsusb.

SujayNarayana commented 6 years ago

Tried that earlier. USB LED doesnt glow even in linux PC. Also, lsusb doesnt show HackRF. However, DFU mode works in linux as well as windows. It is detected ass LPC.

mossmann commented 6 years ago

Which release did you take your hackrf_one_usb.bin from?

Please try this:

  1. Boot in DFU mode
  2. dfu-util --device 1fc9:000c --alt 0 --download hackrf_usb.dfu
  3. Check for 1d50 in lsusb.
  4. Assuming 1d50 has failed to appear, check the status of the RF LED and report it here. Is it off, dimly lit, or fully lit?
  5. Hold down the DFU button while pressing and releasing the RESET button. (I want you to bring it back into DFU mode without removing power.)
  6. Check for NXP in lsusb and also check the status of the RF LED again and report these results here.
  7. retry: dfu-util --device 1fc9:000c --alt 0 --download hackrf_usb.dfu
  8. Does 1d50 appear in lsusb this time?
SujayNarayana commented 6 years ago

Which release did you take your hackrf_one_usb.bin from? --> From the github release page. The release version is release 2018.01.1

Please try this:

Boot in DFU mode
dfu-util --device 1fc9:000c --alt 0 --download hackrf_usb.dfu

--> Used "hackrf_one_usb.dfu". In dfu mode, 3V3 and RF LED glows (full bright). Once dfu update is complete, 3V3, 1V8 and RF LEDs glow brightly. Check for 1d50 in lsusb. --> Does not appear. If I try the same in windows, HackRF is detected as unrecognized device (same as when when we connect broken USB devices) Assuming 1d50 has failed to appear, check the status of the RF LED and report it here. Is it off, dimly lit, or fully lit? --> Fully lit Hold down the DFU button while pressing and releasing the RESET button. (I want you to bring it back into DFU mode without removing power.) Check for NXP in lsusb and also check the status of the RF LED again and report these results here. retry: dfu-util --device 1fc9:000c --alt 0 --download hackrf_usb.dfu Does 1d50 appear in lsusb this time?

--> Same behavior as before

mossmann commented 6 years ago

Can you try using this test firmware?

SujayNarayana commented 6 years ago

@mossmann: Thank you very much for your support. Here are the observations.

JTAG is the only possible way for me to program HackRF. I programmed it with blinky.bin. All the LEDs are blinking as expected.

With test firmware no improvement. Same observation.

I did not go through the hackrf source code but just curious if HackRF waits for some reply from other devices such as FPGA before initializing USB wherein the other device went bad?

More observations:

  1. Hold DFU button -> Connect USB to PC -> Release DFU button -----> 3V3 LED glows brightly, TX LED at 50% brightness, 1V8 LED OFF, rest of the LEDs are at around 10% brightness.

img_20180224_031219879

  1. With HackRF connected to PC, hold DFU button -> press and release reset button -----> 3V3 LED glows brightly, RF LED at full brightness, TX at 50%, 1V8 LED OFF, rest are at around 10% brightness.

img_20180224_031203876

  1. Connect HackRF to PC without pressing any button, 3V3, 1V8, RF LED glows. Rest are OFF.

img_20180224_031513428

SujayNarayana commented 6 years ago

I also tried to load the test firmware using JTAG. Even though programming was successful, USB LED is not glowing. Same observation as before.

f6jig commented 6 years ago

i have thé same problem. m'y hacker one is only detected on dfu mode. my USB led lever illuminated outside this mode. i dont understand could you tell me toi

zanco commented 6 years ago

Hi, (Chinese HackRF version) Might or might not be helpfull for anyone, but after disconnecting my HackRF from the main computer and connect it to the laptop my HacRF did not light the USB led anymore and other led's not as bright. Tried other micro USB cable and computer with no luck.

Opened the case, powered the unit and noticed 2 Volt drop over FB1 which is power to the unit. On the press of the pin of my multimeter the USB led lighted up.

So I resoldered FB1 and all works fine now!

(My first original I blew because connected to a non earthed PC and earthed antenna system. So my PC got ground by USB shield and antenna cable. Even the processor USB connection shorted to ground, game over it was...)

Ferenczyg commented 6 years ago

Hi Zanco i have exactly the same problem. Could you please give me more info about FB1? How do I locate it in the mainboard?

ekiojp commented 5 years ago

Just in case anyone face this behavior, after trying 8 different micro-usb cables, last one work! Clearly a poor quality cable will make the USB LED not coming up and neither lsusb will see it README

SujayNarayana commented 5 years ago

I used JTAG to execute example programs on the microcontroller. All the programs including LED blinking worked except USB. Looked like the USB PHY side of the MCU is damaged. Replaced the microcontroller now and Hack RF is working fine :)

novaKC3 commented 5 years ago

This happened to me. Here's what worked. Leave powered off for about an hour (maybe because some electronics retain power even after disconnected from main power source). Then, plug into you PC (mine is Windows 10). Then hold down the DFU and reset buttons for about five seconds together. Then all my lights came on and it was connected.

ghost commented 3 years ago

@SujayNarayana I know this is a closed thread however I'm having this issue it came out of nowhere. I have hackrf one chinese clone Portapack H2 firmware. Windows detects it but no usb light no software detects device windows makes the sound as if usb is connect but do not see any change in device manager. lsusb in linux will not recognize it. Used over 20 micro usb cables 5 of them i bought new. No go. Has someone found a fix that does not require soldering a replacement MCU or purchasing a hackrf again?

ka9cql commented 3 years ago

@SujayNarayana I have a Chinese Hack RF One + Portapack H2 clone that got messed up when I tried to upgrade from the Mayhem release it had on it from the manufacturer (v.1.3.0) to the latest Mayhem Portapack H2 release. I haven't managed to restore the factory firmware yet (I suspect it may be customized) but I can use the following process to at least get my device working under Linux as a "stock" Hack RF One.

1) Plug HackRF One (HRF) into Linux computer USB port 2) After power-up, press and release the reset button to reset the device 3) Using lsusb I do not see the NXP device 4) Press and hold both the Reset button and the DFU button, wait a second or two, release ONLY the Reset button, pause, then release the DFU button 5) Using lsusb I can now see an NXP Semiconductors device (Great!) 6) dfu-util --device 1fc9:000c --alt 0 --download hackrf_one_usb.dfu 7) Seems to download the dfu, but errors-out after writing (Error is "DFU device not found", I believe) 8) hackrf_info now shows the HRF device! (More goodness!) 9) Loading my Linux SDR porgram (CubicSDR is what I tried) now seems to work. It detects my unit as a regular Hack RF One, and seems to be controllable.

This process has one flaw - removing the USB connection always reset the device.

UPDATE: While working on the Windows version of this solution I figured out that my Portapack H2's built-in battery was messing things up.

If this battery is connected when I remove the USB connector after performing the steps above, the HackRF One resets, and "forgets" the steps we just performed. When I unplugged the battery pack connector to the Portapack H2 board and then performed the above steps, the device kept the firmware modifications I made!

So now I can reliably get my HackRF One back to "production mode" after power off/unplugging the USB.

My next goal is to figure out the Windows equivalent of the above procedure to be able to use my Hack RF One on Windows.

A stretch goal is to (obviously) fully restore the device to its its state when I opened the box, and have it work without a computer connection.

A final goal of mine is to push the latest Mayhem H2 PortaPack release onto the device in place of what it shipped with.

I will keep at it, and update this thread with more information.

ka9cql commented 3 years ago

WINDOWS -

If your Portapack has a built-in battery, you must open the case and REMOVE THE BATTERY CONNECTION from the Portapack daughter board. If you do not do this, the following process WILL NOT WORK. (No damage will occur, it just won't work, and you'll just have to re-do all this every time you boot your HackRF One.)

Connect the HackRF One (HRF) to your Windows computer using a USB cable Wait a second or two Press and hold both the Reset button and the DFU button Release ONLY the Reset button wait a second or two Release the DFU button

Check Windows device manager, I found an "LPD device" but it had a yellow triangle with an exclamation point - "driver problem" If your device is recognized as a HackRF One, don't touch the drivers in the next step!

My device was "brain dead" (LPD driver problem mentioned above), so I downloaded Zadig.exe, a tool commonly used to replace the default Windows drivers it wants to load for RTL-SDR dongles. Launch Zadig Select Options/List All Devices In the device drop-down list, select LPD device (that'll be your "brain dead" HackRF One!) Used Zadig to replace whatever driver Windows is currently using with libusbK (v3.0.7.0)

When the driver gets replaced, check if Windows can see the chips on the board -

dfu-util-static.exe -l

If the DFU utility can find the device, good! (If not, try other drivers in the Zadig utility. BE VERY CAREFUL to ONLY modify the LPD device drivers. You can really screw up your Windows devices if you arbitrarily change a driver you're not supposed to!)

Following the URL below, I could get the HackRF One to boot up in normal mode (not yet Portapack enabled) - https://github.com/sharebrained/portapack-hackrf/wiki/Updating-Firmware#restoring-hackrf-firmware

Here is that process, for reference -

Run:

dfu-util-static.exe --device 1fc9:000c --download hackrf_one_usb.dfu --reset

The HackRF firmware is now running from the microcontroller's RAM.

DO NOT RESET the HackRF at this point!!! --- I repeat --- DO NOT RESET the HackRF at this point!!!

Now re-flash the HackRF firmware:

hackrf_spiflash.exe -w hackrf_one_usb.bin

Once this command completes, unplug the HackRF. REMEMBER: If your Portapack has a built-in battery, you should have that battery disconnected already. Otherwise removing the USB cable here will RESET THE HackRF ONE, and the above changes will not get preserved! (I told you to remove the battery cable in one of the above steps, right?) If you forgot, when you remove the USB cable, the device will forget everything you just did, and you'll have to remove the battery and start over.

If your Portapack doesn't have a battery, or you removed its connector already, you should now be able to boot the HackRF One into "normal" mode when you reconnect the USB cable or press the Reset button to reset the device.

Reconnect the USB cable. Your HackRF should now be in "regular HackRF mode" (no Portapack yet).

Now the Windows Device Manager should find a HackRF One under the "USB Serial Device" section, and it will likely be using a WinUSB driver (Windows replaces the one you may have selected earlier using the Zadig tool.) If your HackRF now it works, leave this driver alone!

Now test it as a Windows SDR.

I ran AirSPY (was sdrsharp.exe) and IT WORKS!

========================= My Chinese knock-off HackRF One + Portapack H2 now at least boots up in stand-alone mode, as an SDR. (GOOD!)

I still gotta figure out which Portapack H2 firmware I need, and figure out the steps to push that onto the board(s) now.

But at least I'm making progress! I hope this helps someone else!

ka9cql commented 3 years ago

I finally got my Chinese PortaPack H2 clone to work.

I used the procedures above to restore my device to "native HackRF mode" (aka disconnect built-in battery, and follow the above procedure to restore "native" HackRF mode), and then downloaded the PortaPack H2 firmware from the following URL -

http://www.mmdvm.club/index.php/h2.html

As of today (2021-04-12) file/version mayhem_v1.3.1_FIRMWARE_WM8731.zip was present.

After downloading that zip onto a Windows 10 box, I unzipped it and changed directory to the newly-unzipped directory.

I plugged my HackRF into my Windows 10 box and then ran "flash_portapack_mayhem_8731.bat". VIOLA! PortaPack H2 operation restored! W0000 H0000!

Here are the contents of flash_portapack_mayhem.8731bat - @echo off

echo Re-flash the HackRF with PortaPack wm8731 firmware from www.mmdvm.club echo. echo Connect your HackRF One to a USB port on your computer. echo. echo If using a PortaPack, put the PortaPack in HackRF mode by selecting echo the "HackRF" option from the main menu. echo. pause

echo. hackrf_update.exe portapack-h1_h2-mayhem.bin echo. pause

 SIZE        FILENAME

865,620 portapack-h1_h2-mayhem.bin

I have attached the portapack-h1_h2-mayhem.bin I used to this post

Enjoy! ChineseCloneOf__mayhem_v1.3.1_FIRMWARE_WM8731.zip

EticalHack commented 1 year ago

Hi u all! Om new in here but i have search and search on the web all over but cant find whats housing this problem. I at first bought hackrf with portapack2 and then the buttons were done and the screen was crusched.....so i ordered i new portapack2

But for months now i cant solve what causing the issue for hackrf Alone... Somebody have messed with me cops or somebody else but i didnt recognize my hackrf pcb anymore....can someone tells me what the problem is? Should the pcb looken like this or am i stupid?

I think the pcb lack a component or two and the also have been soldering off the board.

 

The only thing s whole computers can tell me is that the hackrf is found as LPC nothing else could be done. No upgrade no downgrade or flashing..... And the leds are they even supposed to look like this im gonna show u with a pic..

I just plugged in the device in my linux laptop and wrote lsusb and the information i got from the usb ports was this>

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f2:b5fa Chicony Electronics Co., Ltd EasyCamera Bus 001 Device 002: ID 8087:0a2a Intel Corp. Bluetooth wireless interface Bus 001 Device 006: ID 1fc9:000c NXP Semiconductors LPC4330FET180 [ARM Cortex M4 + M0] (device firmware upgrade mode)

Please can someone telll me what to do next, in windows i get the hackrf detected as LPC nothing more.....

Can i do something about it in ubuntu to upgrade something, i dont know what to do next, but in linux it is detecting the hackrf as NXP Semiconductors LPC4330FET180 [ARM Cortex M4 + M0] (device firmware upgrade mode)

but i dont know what do do or next step.. can somebody please help me out! thanks alot

/Eticalhack

i could upload a photo or two of the pcb incase somebody want it....