5 Replies Latest reply on Feb 17, 2016 7:35 AM by ap_1570381

    FX3 superspeed kit - STREAMER CODE

    alerossetta

      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

        • 1. Re: FX3 superspeed kit - STREAMER CODE
          Madhu Lakshmipathy

          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

          • 2. Re: FX3 superspeed kit - STREAMER CODE
            alerossetta

            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

            • 3. Re: FX3 superspeed kit - STREAMER CODE
              bogdan.vacaliuc

              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

              • 4. Re: FX3 superspeed kit - STREAMER CODE
                ap_1570381

                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[k], 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[k], 0, temp, Offset, len);"" also with my modification.

                   

                 

                   

                i use win7 64bit

                   

                visual studio 2015

                   

                cu

                   

                alex

                • 5. Re: FX3 superspeed kit - STREAMER CODE
                  veerendrarn1_2322216

                  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