Page 1 of 1

Bug in Matlab driver - TX

Posted: Wed Dec 10, 2014 11:13 am
by Michael
Hi, all!

I found a bug in Matlab driver for bladeRF
Here: ... 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: ... lay_demo.m always crashes

Re: Bug in Matlab driver - TX

Posted: Thu Dec 11, 2014 6:35 pm
by yoshimifuj
I encountered this problem, too and changed the C source code as follows.
/* check input */
// The following line has moved into 'if' statement.

rx = 1;
if (mxGetString(DEVICE_MODE, (char *)&mode, 3)) {
rx = 1;
} else {
if (!strcmp(mode, "TX"))
rx = 0;
Would you confirm this change?

Re: Bug in Matlab driver - TX

Posted: Mon Dec 15, 2014 1:37 am
by robert.ghilduta
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.