Hi, all!
I found a bug in Matlab driver for bladeRF
Here: https://github.com/Nuand/Simulink-MATLA ... rf_dev.cpp , line 188 - CHECK_BUF_LENGTH (BUF_LENGTH );
BUF_LENGTH == TX_DATA (see lines 42 and 43)
So in TX mode line 188 asserts that the real value of the first IQ must be positive, otherwise you get a message:
Error using bladerf_dev
Buffer Length must be numeric and greater zero
So this example: https://github.com/Nuand/Simulink-MATLA ... lay_demo.m always crashes
Bug in Matlab driver - TX
-
- Posts: 15
- Joined: Wed May 07, 2014 8:59 pm
Re: Bug in Matlab driver - TX
I encountered this problem, too and changed the C source code as follows.
Would you confirm this change?/* check input */
CHECK_DEVICE_INDEX(DEVICE_INDEX);
CHECK_BANDWIDTH (BANDWIDTH );
CHECK_SAMPLE_RATE (SAMPLE_RATE );
CHECK_FREQUENCY (FREQUENCY );
// The following line has moved into 'if' statement.
// CHECK_BUF_LENGTH (BUF_LENGTH );
rx = 1;
if (mxGetString(DEVICE_MODE, (char *)&mode, 3)) {
rx = 1;
CHECK_BUF_LENGTH (BUF_LENGTH );
} else {
if (!strcmp(mode, "TX"))
rx = 0;
}
-
- Posts: 162
- Joined: Thu Feb 28, 2013 11:14 pm
Re: Bug in Matlab driver - TX
Thanks for the report Michael and thanks for the patch Yoshimi!
The bug fix has been committed to Github. We'll update the windows binary installer with the fix soon.
The bug fix has been committed to Github. We'll update the windows binary installer with the fix soon.