1
\$\begingroup\$

I'm programming the FPGA on the Red Pitaya and I'm using it for gathering datas and generating images with those datas. Then, I need to transfer the images to an Android device. I so need to use the USB port (for connecting the board to an Android device) and I was wondering what transfer protocol I should use for the image transfer. UDP over USB? Serial over USB? Other?

Or maybe something already exists on the Red Pitaya?

Thanks for your answers.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ Either bulk or isochronous transfers. \$\endgroup\$ Commented Jan 7, 2016 at 9:33
  • \$\begingroup\$ If you've got local storage for the images as you generate them, maybe present as a mass storage device? \$\endgroup\$
    – pjc50
    Commented Jan 7, 2016 at 9:33
  • \$\begingroup\$ Most special-purpose USB devices seem to present themselves as serial adapters, since that's a simple and well-supported protocol. I don't know if it has support on Android, though. (Another factor for them choosing this is probably the availability of FTDI USB-to-serial interface chips) \$\endgroup\$ Commented Jan 7, 2016 at 9:39
  • \$\begingroup\$ Thanks for your answers. If I'm not wrong, it's more isochronous than bulk as I would like to do a streaming... Which answers to pjc50. For the Android device part, a usb a to usb b is enough if I'm not wrong. I saw some apps to do the job. The remaining problem still on the RP side of the communication. \$\endgroup\$ Commented Jan 7, 2016 at 10:01
  • 2
    \$\begingroup\$ Do you have the ability to write your own drivers and load them onto the android device, or do you have to pretend to be a device which is already known to the kernel? \$\endgroup\$
    – pjc50
    Commented Jan 7, 2016 at 13:37

2 Answers 2

-1
\$\begingroup\$

look for FT232h ftdi converter... even if you dont have on your board , you can interface it with spare I/Os... you may find cheap breakout boards in ebay or aliexpress...

Im not 100% sure , but i think there is some driver for android...

\$\endgroup\$
-1
\$\begingroup\$

There is already an FTDI RS232 converter on your board, wired to one of the micro-USB sockets. If the amount of data you want to transfer is moderate, you can use that. You could expect to get 1Mbit/s through such a converted, sometimes a bit more. I don't own such a board so this is just an estimate.

If you need to transfer lots of data and 1Mbit/s is not enough, you should be using Ethernet over USB. See if you have a kernel module called g_ether available for your kernel.

\$\endgroup\$
5
  • \$\begingroup\$ The RS422 versions of the FTDI converters I have used can get up to just about 3Mbps. \$\endgroup\$
    – user4574
    Commented Dec 29, 2016 at 4:48
  • 1
    \$\begingroup\$ FTP is a completely unsuitable protocol for streaming data. It's aimed at transferring files, not arbitrary data, and is relatively complex to implement. HTTP might be a better fit, as it at least has some provisions for streaming data. \$\endgroup\$
    – user39382
    Commented Mar 3, 2017 at 23:03
  • 1
    \$\begingroup\$ @duskwuff The OP specifically mentions transferring images to an Android device. What's wrong with transferring these as files? \$\endgroup\$ Commented Mar 6, 2017 at 10:24
  • \$\begingroup\$ @DmitryGrigoryev The question title specifically asks for a solution for "streaming over USB". FTP is not a streaming protocol. \$\endgroup\$
    – user39382
    Commented Mar 6, 2017 at 15:11
  • 1
    \$\begingroup\$ @uuser39382 Images are not a suitable kind of data for streaming to begin with. It's either still images as files or video as a stream. \$\endgroup\$ Commented Jul 12, 2021 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.