[Hackrf-dev] HackRF USB

Dominic Spill dominicgs at gmail.com
Fri Apr 22 14:08:10 EDT 2016


On 22 April 2016 at 09:18,  <chillmf at nctv.com> wrote:
>
> After reading the documentation that I can find I do not see a clear
> declaration of the device profile which the HackRF supports such as HID,
> MCS, CDC, or etc.

None of the above.  HackRF uses a custom USB profile (sometimes called
vendor specific), which in this case involved two bulk endpoints for
sending IQ data to and receiving it from the HackRF.  Everything else
is handled over the control endpoint, EP0.

> I am using a STM32F469 Disco development board and I would like to access
> the HackRF sample data for DSP processing.

You'll need to port or reimplement much of libhackrf for this.  The
bulk of the code is in this file:
https://github.com/mossmann/hackrf/blob/master/host/libhackrf/src/hackrf.c

Anywhere you see libusb_control_transfer() being called, it's using EP0.

If you want to move IQ data around, you'll need the bulk endpoints,
which tend to be used with buffers and a callback that's called when
the transfer completes.

I'm happy to give any more detail that I can if you have specific questions.

Dominic


More information about the HackRF-dev mailing list