FX3 superspeed kit - STREAMER CODE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

Has anyone ever created an SDK project that I can use to print data read with FX3 into a txt file? - I would like to use the STREAM_IN feature of the device.

   

 

   

Thanks in advance

   

 

   

Best regards

   

 

   

Alessandro

0 Likes
5 Replies
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

Please find the attached host application along with source code. It is a modification of the C# Streamer project which is used to obtain data from an FX3 Device.

   

Before starting the streamer, Make sure that the "Save to Disk" check box is ticked.

   

Search for the text 'mady' to see the places where the Code for writing into a text file is added.

   

Regards,

   

-Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hi Madhu,

   

Thank you so much for your support. The streamer version you sent me only works if "save to disk" check box is NOT ticked.

   

And actually when I tick it the streamer application stops working and sometimes it shuts down the entire OS (windows).

   

 

   

Alessandro Rossetta

0 Likes
Anonymous
Not applicable

Hi Alessandro,

   

I have made edits to the C++ streamer provided in the FX3 SDK to enable RAW data saving to files for our own device. It also works with the infinite source/sink in the "Cypress USB FX3 StreamerExample Device". You may use the code in your project if you wish: https://github.com/myriadrf/RASDR/tree/master/host/RASDRstreamer

   

Best Regards,

   

-bogdan

0 Likes
Anonymous
Not applicable

i also tested the example and find the same problem when the "save to disk" is checked.

   

do you fix the problem in this example?

   

 

   

i get a exeption at

   

"Buffer.BlockCopy(xBufs, 0, temp, Offset, len);"

   

 

   

i add following, than i was able to write to the txt file, but only very slow

   

"

   

 byte[] temp1 = new byte[Offset];

   

Buffer.BlockCopy(temp, 0, temp1, 0, Offset);  // copy the contents received on  temp[] to temp1[]
string res = string.Join("", temp1);
// Put all the data streamed to a single string
string file_name = "C:\\fx3\\test2.txt";    // Write the string to mady.txt
System.IO.StreamWriter objWriter;
objWriter = new System.IO.StreamWriter(file_name);
objWriter.WriteLine(res);

   

objWriter.Close();

   

"

   

after testing: the program crash every time when  "Successes" has 801 reached at ""Buffer.BlockCopy(xBufs, 0, temp, Offset, len);"" also with my modification.

   

 

   

i use win7 64bit

   

visual studio 2015

   

cu

   

alex

0 Likes
veRN_2322216
Level 3
Level 3
5 likes given First like received First like given

actually i am also facing same problem when the check box is checked C#(modified) in streamer  after some time it will throw an exception so .we need to restart the operation before reaching that limit .if any one able to do this please help me also.it will very helpful to me

0 Likes