1 2 3 Previous Next 32 Replies Latest reply on Feb 26, 2020 11:03 PM by YatheeshK_36

    How to save the data in files?

    DhN_4227681

      Hi,

       

      I am using the FX2LP board to capturing the image in CYUSB_LINUX(like data are giving, that we should seen in 'infile' window). After giving data, how we should store that data in file). Is their any procedure to store the data in file. (In linux ).

        • 1. Re: How to save the data in files?
          YatheeshK_36

          Hello Dhanuja,

           

          Please choose the in-file option and select a file to log/capture the received data to a the file, then you can receive the data from the FX2LP.

           

          Best Regards,

          Yatheesh

          • 2. Re: How to save the data in files?
            DhN_4227681

            Hi,

             

            We have already try this one. 1st we created the one empty file like .hex, .jpg and after that we click on the receive button, the data will giving in the cyusb_linux but in the file, its showing the empty(0 bytes transfer).

            Before this, we should select the outfile path then we should select the infile path. Without selecting the outfile path, its showing on error.

            Is their any steps to do that. Please tell the procedure.

             

             

            how to view the image in linux.Is their any steps to do that. Please tell the procedure.

            • 3. Re: How to save the data in files?
              YatheeshK_36

              Hello Dhanuja,

               

              The control center application in the linux SDK will allow to save the file only send a file through a loopback.

               

              I have altered the application so that you can receive data and capture it in a file.

              Please find the main.cpp file attached to this response.

              Replace the main.cpp with the file attached here in the gui_src folder and do a sudo make in the same folder(gui_src) so that the main.o is regenerated.

               

              Once this is done please follow the steps in the README file (in folder cyusb_linux_1.0.5) in the SDK to install the libcyusb library and GUI application.

               

              After installing library and the GUI application  you can capture the received data in a file by selecting the proper endpoint and file location using the in-file box.

              Mention the size of data that is to be received in the "Size(bytes)" box, and then click Receive.

               

              Let me know is this is what you needed.

               

              Best Regards,

              Yatheesh

              • 4. Re: How to save the data in files?
                DhN_4227681

                Hi,

                 

                Which tool is suitable for host application(GUI) in Linux. In windows we are using Microsoft visual studio.

                • 5. Re: How to save the data in files?
                  DhN_4227681

                  Hi,

                   

                  Ok, we replace the main.cpp file,

                  We are selecting the infile i.e empty text or hex file,but  what must be the outfile we should give?

                  • 6. Re: How to save the data in files?
                    YatheeshK_36

                    Hello Dhanuja,

                     

                    For linux you can make use of QT for gui applications.

                     

                    If you are using the main.cpp file which I shared, to log the received data to a file you dont need to give an out file.

                    Just select the file in which you need to log the data in the "in-file" box, input the number of bytes to be received in the "size" box and click on receive.

                     

                    For testing this you can follow the below steps.

                    1. Program the loopback firmware on FX2LP

                    2. uncheck the loopback button and send data through out endpoint, say you send 8 bytes of data.

                    3. select the in-file where you want to log the data.

                    4. enter the size of bytes to be received in the "size" box, in this case its 8 bytes 

                    5. uncheck the loopback button and click on receive. This will log the data previously sent to the file selected in the "in-file" box.

                     

                    Best Regards,

                    Yatheesh

                    • 7. Re: How to save the data in files?
                      DhN_4227681

                      Hi,

                       

                      Ok, i will follow this steps given above.

                      And, i have another doubt i.e by adding the main.cpp, shall i uninstall the cyusb_linux and then replace the main.cpp during reinstalization. or directly replace the main.cpp file in present installed cyusb_linux

                      and also tell,how to uninstall cyusb_linux in ubuntu

                      • 8. Re: How to save the data in files?
                        DhN_4227681

                        when i'm replacing main.cpp file in gui_src and then i trying sudo make but i'm getting error

                         

                        mangoh@mangoh-vm:~/Downloads/cyusb_linux_1.0.5/gui_src$ sudo make

                        make: *** No rule to make target '/usr/share/qt4/mkspecs/linux-g++-64/qmake.conf', needed by 'Makefile'.  Stop.

                        • 9. Re: How to save the data in files?
                          YatheeshK_36

                          Hello Dhanuja,

                           

                          Try sudo make clean and then sudo make.

                          Let me know if this works.

                          If the error still persists, then you will have to install qt4 again.

                           

                          Best Regards,

                          Yatheesh

                          1 of 1 people found this helpful
                          • 10. Re: How to save the data in files?
                            DhN_4227681

                            Hi,

                             

                            I am successfully installed qt4, but now i am getting this error. can you help to solve this error.

                             

                             

                            main.cpp:74:13: note:   initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’

                            static void libusb_error(int errno, const char *detailedText)

                                         ^~~~~~~~~~~~

                            main.cpp: In function ‘void in_callback(libusb_transfer*)’:

                            main.cpp:1874:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’

                               libusb_error(transfer->status, "Transfer not completed normally");

                                                                                               ^

                            main.cpp: In function ‘void out_callback(libusb_transfer*)’:

                            main.cpp:1927:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’

                               libusb_error(transfer->status, "Transfer not completed normally");

                                                                                               ^

                            Makefile:233: recipe for target 'main.o' failed

                            make: *** [main.o] Error 1

                            • 11. Re: How to save the data in files?
                              YatheeshK_36

                              Hello Dhanuja,

                               

                              Looks like you are using a older verion of libusb.

                              Please install the latest one.

                               

                              Thanks,

                              Yatheesh

                              • 12. Re: How to save the data in files?
                                YatheeshK_36

                                Hello Dhanuja,

                                 

                                Please refer the correct answer in this community thread Error compiling cyusb_linux_1.0.5 on Ubuntu 18.04 (again but different?)  where a similar issue is resolved.

                                 

                                Best Regards,

                                Yatheesh

                                1 of 1 people found this helpful
                                • 13. Re: How to save the data in files?
                                  DhN_4227681

                                  thankyou for reply,

                                  I am successfully solved above problem,and after follow the steps to make and ./install.sh (in cyusb_linux_1.0.5 ).then successfully installed but when i try to give a infile in cyusb_linux  but it's shows error like "cannot select infile when outfile is blank".

                                  Whatever you gave main.cpp file that i replaced in gui_src,but i'm getting error.

                                  • 14. Re: How to save the data in files?
                                    DhN_4227681

                                    I have another doubt i.e by adding the main.cpp.Before adding the main.cpp file in gui_src which you gave, Shall i uninstall the previous cyusb_linux and then replace the main.cpp in gui_src,during reinstalization. or directly replace the main.cpp file in present installed cyusb_linux

                                    and also tell,how to uninstall cyusb_linux in ubuntu.

                                    1 2 3 Previous Next