[Hackrf-dev] Simulink support for HackRF

Mitja kocjančič veso266 at gmail.com
Wed Nov 18 12:53:32 EST 2015


can someone help me with building this? (I am using Matlab R2015a and I
build hackrf.dll and copy it to deps/bin (I also need to copy hackrf-h into
src folder) but when I run make in Matlab I get:

>> make

Building target 'hackrf_find_devices.c':
Building with 'Microsoft Windows SDK 7.1 (C)'.
Error using mex
hackrf_find_devices.c
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(38) : error C2275:
'hackrf_device' : illegal use of this type as an expression
        i:\users\mitja\sdr\hackrf\windows tx\matlab hackrf
simulink\simulink-hackrf\src\hackrf.h(93) : see declaration of
        'hackrf_device'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(38) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(39) : error C2143: syntax
error : missing ';' before 'type'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(41) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(41) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(41) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(44) : error C2143: syntax
error : missing ';' before 'type'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(45) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(45) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(45) : warning C4047:
'function' : 'hackrf_device *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(45) : warning C4024:
'hackrf_board_id_read' : different types for formal and actual parameter 1
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(45) : error C2065:
'board_id' : undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(46) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(46) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(47) : error C2143: syntax
error : missing ';' before 'type'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : warning C4047:
'function' : 'hackrf_device *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : warning C4024:
'hackrf_version_string_read' : different types for formal and actual
parameter 1
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : error C2065:
'version'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : error C2109:
subscript
requires array or pointer type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : warning C4047:
'function' : 'char *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : warning C4024:
'hackrf_version_string_read' : different types for formal and actual
parameter 2
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(48) : error C2198:
'hackrf_version_string_read' : too few arguments for call
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(49) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(49) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(51) : error C2065:
'board_id' : undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(51) : error C2065:
'version'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(54) : error C2275:
'read_partid_serialno_t' : illegal use of this type as an expression
        i:\users\mitja\sdr\hackrf\windows tx\matlab hackrf
simulink\simulink-hackrf\src\hackrf.h(107) : see declaration of
        'read_partid_serialno_t'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(54) : error C2146: syntax
error : missing ';' before identifier 'data'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(54) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : warning C4047:
'function' : 'hackrf_device *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : warning C4024:
'hackrf_board_partid_serialno_read' : different types for formal and actual
parameter 1
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(55) : warning C4133:
'function' : incompatible types - from 'int *' to 'read_partid_serialno_t *'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(56) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(56) : error C2065: 'ret'
:
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(58) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(58) : error C2224: left
of
'.part_id' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(58) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(58) : error C2224: left
of
'.part_id' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(60) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(60) : error C2224: left
of
'.serial_no' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(60) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(60) : error C2224: left
of
'.serial_no' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(61) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(61) : error C2224: left
of
'.serial_no' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(61) : error C2065:
'data' :
undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(61) : error C2224: left
of
'.serial_no' must have struct/union type
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : warning C4047:
'function' : 'hackrf_device *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : warning C4024:
'hackrf_close' : different types for formal and actual parameter 1
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : error C2065:
'device'
: undeclared identifier
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : warning C4047:
'function' : 'hackrf_device *' differs in levels of indirection from 'int'
I:\Users\Mitja\SDR\HackRF\WINDOWS TX\MATLAB HackRF
SIMULINK\simulink-hackrf\src\hackrf_find_devices.c(64) : warning C4024:
'hackrf_close' : different types for formal and actual parameter 1



Error in make (line 66)
mex(options{:}, 'src/hackrf_find_devices.c')

So I don't know what do do now

Thanks for Anwsering and Best Regards

2015-11-18 14:07 GMT+01:00 Koslowski, Sebastian (CEL) <
sebastian.koslowski at kit.edu>:

> On 11/17/2015 10:51 PM, MA wrote:
>
> Hi Sebastian
> What's the difference between your project and jocover's
> <https://github.com/jocover/Simulink-MATLAB-HackRF>
> https://github.com/jocover/Simulink-MATLAB-HackRF  ?
> (I've already built that on both Windows and Mac)
>
> Mehdi
>
>
> Well, I guess, on the surface there is not much difference. Both are based
> on our simulink-rtlsdr package (which in turn came out of simulink-uhd).
> Looks like jocover has added a nice m-script level interface.
>
> I have contacted him and we are discussing merging both projects.
>
> Sebastian
>
> _______________________________________________
> HackRF-dev mailing list
> HackRF-dev at greatscottgadgets.com
> https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20151118/eb82937d/attachment.html>


More information about the HackRF-dev mailing list