More progress: there is no error message but the error code is 40 (
UHD_ERROR_ASSERTION
<https://files.ettus.com/manual/error_8h.html#a7fbc3f872dadd2c73cd656b2e5acdd2ba59829d0fc28459df62b18c88122a3d70>
=
40)

On Tue, Nov 7, 2017 at 1:18 PM, Sivan Toledo <stol...@tau.ac.il> wrote:

> A bit of progress. The error_string might have been used by two threads,
> so I allocated a new buffer for error messages in the thread that starts
> streaming and receives samples. This revealed the error message: TX/RX.
> What is is error?
>
> On Tue, Nov 7, 2017 at 1:06 PM, Sivan Toledo <stol...@tau.ac.il> wrote:
>
>> Hi,
>>
>> I've ported a code from the C++ API to the C API; it runs okay on Linux
>> but fails on Windows. The failure occurs at the function:
>>
>> void radioRxStartStreaming(void) {
>>   uhd_stream_cmd_t stream_cmd;
>>
>>   size_t n;
>>   uhd_rx_streamer_max_num_samps(rx_stream, &n);
>>   fprintf(stderr,"### UHD max samples %d ###\n",n);
>>
>>   fprintf(stderr,"### starting rx streaming ###\n");
>>
>>   stream_cmd.stream_mode = UHD_STREAM_MODE_START_CONTINUOUS;
>>   stream_cmd.stream_now = true;
>>
>>   if (uhd_rx_streamer_issue_stream_cmd(rx_stream, &stream_cmd)) {
>>     uhd_rx_streamer_last_error(rx_stream, error_string,
>> ERROR_STRING_LENGTH);
>>     fprintf(stderr,"### cannot start UHD rx streamer: <%s>
>> ###\n",error_string);
>>   } else {
>> fprintf(stderr,"### started rx streaming ###\n");
>>   }
>> }
>>
>> issue_stream_command fails but last_error returns an empty string.
>> The functions uhd_rx_streamer_make(&rx_stream) and
>> uhd_usrp_get_rx_stream(usrp, &stream_args, rx_stream) are called prior to
>> the attempt to start the stream, but from another thread. I am using
>> pthreads in both Linux and Windows (using a pthreads library) and have not
>> had a problem with this with the C++ API.
>>
>> I'm using UHD 3.9.7, installed from uhd_3.9.7-release_Win64_VS2013.exe
>> <http://files.ettus.com/binaries/uhd/uhd_003.009.007-release/uhd_3.9.7-release_Win64_VS2013.exe>.
>> The code is linked against visual studio 12.0 (which I think is VS2013)
>>
>> Any idea what might be going wrong? It's difficult to debug when the
>> error message is empty.
>>
>> Thanks, Sivan
>>
>>
>>
>
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to