greatscottgadgets / hackrf

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

CPLD update fails on Windows #113

Closed mossmann closed 9 years ago

mossmann commented 10 years ago

We don't know why yet. As a workaround, use Linux to perform the update.

bvernoux commented 10 years ago

I have pushed a workaround for HackRF Jawbreaker (as the firmware included is only for Jawbreaker) see my website http://hydrabus.com/hackrf/dfu_hackrf_jawbreaker_fullsrc.7z Tested with Windows 8.1 and HackRF Jawbreaker.

zefie commented 10 years ago

bvernoux, I tried your package, it appears to flash the cpld binary to the spiflash.

bvernoux commented 10 years ago

Yes it is a firmware which contains the latest CPLD bitstream and flash it through the MCU.

gsj0791 commented 10 years ago

the cpld upate via usb is full speed mode, but on the windows driver libusb1.0 no support. on the ubuntu working fine.

gsj0791 commented 10 years ago

this is not hackrf bug,is libusb1.0 driver bug, when i use vs2012 to debug source code at hackrf.c line 650(result = libusb_set_configuration(device->usb_device, 2);) has error,so don't use windows update cpld

supersat commented 10 years ago

The WinUSB driver (used by libusb-1.0) does not support alternate configurations.

supersat commented 10 years ago

I think I have CPLD reprogramming working from Windows. I modified the set_transceiver_mode request in the firmware to support a new mode -- CPLD programming. After updating libhackrf as well, everything appears to work.

dominicgs commented 9 years ago

@supersat Do you still have the code for this? I tried writing a version but the first bulk transfer fails. I'm investigating why, but if you're willing/able to share your solution, that would make things quicker.

supersat commented 9 years ago

Yep: http://pastebin.com/tgeD8Zrf

dominicgs commented 9 years ago

@supersat Thanks! I was failing to initialise the endpoint.

I've created PR #186 to fix this based on the above pastebin/patch.

dominicgs commented 9 years ago

PR #186 was merged and was included in the 2015.07.2 release.