sme
Posts: 3
Joined: Tue Nov 22, 2016 11:39 am

OTG data forwarded to another computer in real time

Tue Nov 22, 2016 12:04 pm

Dear RPi community,

I am trying to make an RPi (USB gadget mode) get data from a USB host device and then continuously forward it for processing to another computer, in real time.

So far I've got my RPi Zero act as a USB gadget getting data form the host in the form of a file being saved. I plan to modify the kernel module to be able to get that incoming data continuously, but I am out of ideas as to how could I then forward that data to another computer in real time and continue processing it there. I need that data processed explicitly by the other computer and not by the RPi. Any help would be highly appreciated.

Thanks

sme
Posts: 3
Joined: Tue Nov 22, 2016 11:39 am

Re: OTG data forwarded to another computer in real time

Mon Nov 28, 2016 10:55 pm

Just in case bringing this back to possibly increase the chance of getting even just a single idea on how/if that could be done...

aBUGSworstnightmare
Posts: 2014
Joined: Tue Jun 30, 2015 1:35 pm

Re: OTG data forwarded to another computer in real time

Tue Nov 29, 2016 5:40 am

You should define your understanding/expectation of 'realtime'.
Raspbian is a Linux OS --> there is no realtime data processing rather than transfer.

User avatar
davidcoton
Posts: 5084
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: OTG data forwarded to another computer in real time

Tue Nov 29, 2016 9:25 am

Also, if your Pi Zero is connected as a gadget, what are you going to use to communicate with the outside world (I'm assuming the connected device has no network connectivity to share with the Pi). There is only one USB port on the Pi. You can't add a hub, it will break the OTG connection. There is no wired Ethernet on the Zero. So you will have to add either wired ethernet, wireless, or a serial connection to the GPIO.

Once you have the connectivity, forwarding the readings or remote access to the file is just a matter of programming. It may be simple or it may be very hard, depending on what time delay is acceptable (see above).
Signature retired

sme
Posts: 3
Joined: Tue Nov 22, 2016 11:39 am

Re: OTG data forwarded to another computer in real time

Tue Nov 29, 2016 11:00 am

Thanks for your replies, guys!

Yes, the lack of an obvious (for me) way to transfer the data from RPi Zero USB gadget further to the processing pc is what makes me feeling stuck.

Adding wired Ethernet or WiFi to the GPIO is something I didn’t consider until now, but if there is any possibility to have that in place, that would be perfect!
As I am not sure where to start with that, being mainly on the software side, I’d appreciate if you could point me to any related info/how to/whatever, especially if there is a ready to use Ethernet Over RPi GPIO solution.

I’d expect a transfer rate of ca. 1500kbit/200Kbyte per sec. (But if RPi would allow more, I would be happy do a separate setup with 5-10Mbit/s for a different goal.)

“Real time” lag of, say, about 1 sec is not an issue. So if I can have the data stream coming from the host in the processing pc after about a sec, that would be fine.



For more clarity, here is the setup:

1. [ USB host (unfortunately no network connectivity available) ]

----USB(ca.1500kbit/200 KByte)---->

2. [ Raspbery Pi Zero USB Gadget mode]

----??? Ethernet/WiFi via GPIO ???---->

3. [ Data processing PC ]


Thanks

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: OTG data forwarded to another computer in real time

Tue Nov 29, 2016 12:32 pm

sme wrote: Adding wired Ethernet or WiFi to the GPIO is something I didn’t consider until now, but if there is any possibility to have that in place, that would be perfect!
As I am not sure where to start with that, being mainly on the software side, I’d appreciate if you could point me to any related info/how to/whatever, especially if there is a ready to use Ethernet Over RPi GPIO solution.
I believe it's possible to add wifi via the gpio using the sdio interface. Looking on these forums (and google) will likely give some options for that.

User avatar
davidcoton
Posts: 5084
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: OTG data forwarded to another computer in real time

Tue Nov 29, 2016 1:57 pm

sme wrote:Adding wired Ethernet or WiFi to the GPIO is something I didn’t consider until now, but if there is any possibility to have that in place, that would be perfect!
As I am not sure where to start with that, being mainly on the software side, I’d appreciate if you could point me to any related info/how to/whatever, especially if there is a ready to use Ethernet Over RPi GPIO solution.
Not tried it, but something like this?
You haven't put your location in your profile so it is impossible to suggest a supplier in your country.
Signature retired

Return to “General discussion”