User avatar
phaze3131
Posts: 45
Joined: Thu Apr 30, 2015 3:50 am

Needing USB Device/Slave Capabilities, Advice Please :)

Sat May 02, 2015 1:11 am

I finally realized the raspberry pi does not have the capability to be a USB device/slave.

Raspberry pi is awesome and has everything else I need, like wifi, fast speed, video functionality, and much more.

My hardware project though needs usb device type of functionality.

But just wondering if anyone might have some advice as to how I could get a prototype made without having to take out a loan.

To keep it short for now, my hardware would be very similar to the raspberry pi B, except it would have the hardware for usb device/slave capabilities.

Please let me know if consulting for a project like this is something you're interested in.

Thanks much,

Travis

W. H. Heydt
Posts: 12655
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Needing USB Device/Slave Capabilities, Advice Please :)

Sat May 02, 2015 1:54 am

There are other SBCs that enable an OTG USB port. The Odroid-C1 does as, IIRC, do boards based on the Allwinner A10/A20, such as Cubieboard 1 & 2 and the Banana Pi.

Rather than designing your own board, perhaps one of those boards would do what you need?

In the mean time, since you're going to either designing your own board or looking elsewhere for one that meets your needs, this really belongs in Off Topic.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Needing USB Device/Slave Capabilities, Advice Please :)

Sat May 02, 2015 9:19 am

The Raspberry Pi Compute Module has USB_OTG, that's how the eMMC is flashed on that device.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Needing USB Device/Slave Capabilities, Advice Please :)

Sat May 02, 2015 2:54 pm

add a small micro controller that has USB-slave capabilities then connect it to the PI using the serial port.
I recommend a Cypress PSOC type of microcontroller.


The CM (or rather it's SoC) has USB-OTG compatibilities, which are unencumbered by an embedded USB hub, as on a normal (non "A" or "A+") PI, but there is no software stack for slave mode, and as the USB hardware isn't documented there probably never will be.
Also, the CM although it does use OTG hardware capabilities doesn't actually use USB-OTG to program the MMC, instead the boot loader simply expects data being sent to the USB port, without any USB protocol being used, it simply uses the hardware only.

User avatar
phaze3131
Posts: 45
Joined: Thu Apr 30, 2015 3:50 am

Re: Needing USB Device/Slave Capabilities, Advice Please :)

Sat May 02, 2015 3:57 pm

Thanks so much Dougie! Just learned alot about the compute module.

After reading this:
http://www.element14.com/community/comm ... ng-started

I think I understand that the compute module could not be both a slave and a host at the same time, because of the need to switch the J4 jumper, is that correct?

My project needs my board to have wifi capability so it would need to be a host to a wifi adapter. The project also needs to be plugged in via OTG to a cell phone, where it would be the device/slave.

I would be correct by saying I could not achieve this with the CM, yea?

Thanks so much Dougie really appreciate your help.

Travis

edit: just read mahjongg's post, I wrote this prior, so going to understand that type of solution, I will update my post, thanks mahjongg!

editx2: Just read and think I understand this serial connection, I read over this here:
http://elinux.org/RPi_Serial_Connection

If the purpose of this connection was to transfer live video feeds from the Rpi (acting as a router to multiple client IP cams), to the micro-controller via the usb serial connetion... would there just be too much lag because of the throughput of that usb serial connection?

Can't thank you enough guys, I'm learning so much!

Return to “General discussion”