girijapretha
Posts: 4
Joined: Fri Aug 05, 2016 8:59 am

Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 7:28 am

Hi,

I am trying to emulate Raspberry Pi 3 as USB gadget device and connect to linux PC. But I am not able to achieve it.

I found in https://www.element14.com/community/thr ... hread=true that the micro USB port act only as power port and not OTG.
So I want to confirm whether RPI supports OTG and can I make RPI to act as gadget device?
If yes which model does support this functionality?

fruitoftheloom
Posts: 20427
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 8:35 am

girijapretha wrote:Hi,

I am trying to emulate Raspberry Pi 3 as USB gadget device and connect to linux PC. But I am not able to achieve it.

I found in https://www.element14.com/community/thr ... hread=true that the micro USB port act only as power port and not OTG.
So I want to confirm whether RPI supports OTG and can I make RPI to act as gadget device?
If yes which model does support this functionality?
Unfortunately not, but the RPi 3B has other capabilities, which you may find of interest:

https://www.raspberrypi.org/blog/pi-3-b ... orage-boot

https://www.raspberrypi.org/blog/pi-3-b ... he-awesome
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

girijapretha
Posts: 4
Joined: Fri Aug 05, 2016 8:59 am

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 8:48 am

Thanks for your answer :)
I have gone through the link you have shared and it speaks about booting RPI with USB mass storage and Ethernet instead of SD Card. Correct me if I am wrong.

User avatar
B.Goode
Posts: 8220
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 9:24 am

There seem to be 2 issues here:

The microUSB connector on an RPi3 is for power only. It has no usb functionality of any sort.

Edit: the following was posted in error and should be ignored! There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device. If it does not work after following the documentation in the blog post, see the very last line of the blog entry.
It should have said ... "allows the conventional (full-size) usb port on an RPi3 to be reconfigured to boot from a Mass Storage Device." The post is the one to which @fruitoftheloom had already provided a link: your interpretation that this does not meet your needs is correct although you might have benefitted from the information provided.

Allegedly an RPiZero can have its microusb port (but NOT the power connector) reconfigured as a Mass Storage Device.

Edit: apologies for adding uncertainty rather than clarity.
Last edited by B.Goode on Fri Aug 19, 2016 9:28 pm, edited 3 times in total.

fruitoftheloom
Posts: 20427
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 11:26 am

B.Goode wrote: Allegedly an RPiZero can also have its microusb port (but NOT the power connector) reconfigured as a Mass Storage Device.
Yep a ZERO can be many things a RPi 3B can not, because the 1B / 1B+ / 2B / 3B has a LAN9512/4 USB Hub/ Ethernet Port on the end of the USB BUS, so will answer about the ZERO but it has zero relevance to OP:

http://blog.gbaman.info/?p=699
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

fruitoftheloom
Posts: 20427
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 11:27 am

B.Goode wrote:There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device. If it does not work after following the documentation in the blog post, see the very last line of the blog entry.
Yes I provided the links in my response :shock: :shock:
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

fruitoftheloom
Posts: 20427
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 11:28 am

girijapretha wrote:Thanks for your answer :)
I have gone through the link you have shared and it speaks about booting RPI with USB mass storage and Ethernet instead of SD Card. Correct me if I am wrong.
Yes you are reading the Blog correctly, but it is still in BETA Status ;)
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
B.Goode
Posts: 8220
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 11:49 am

fruitoftheloom wrote:
B.Goode wrote:There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device. If it does not work after following the documentation in the blog post, see the very last line of the blog entry.
Yes I provided the links in my response :shock: :shock:
Quite so. I was being ironic/sarcastic and attempting to suggest that the questioner should read the information that had been placed in front of them.

Let's not fall out...

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 12:01 pm

B.Goode wrote:There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device.
For clarity, no the RPi3 CANNOT be "configured as a mass storage device"
- the rpi3 can only BOOT from USB /ethernet with that beta software.


The only pi models that can be a slave gadget device (mass storage device) are those without the usb hub chip:
Pi Zero, A+ and compute module
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
B.Goode
Posts: 8220
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 12:07 pm

mikerr wrote:
B.Goode wrote:There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device.
For clarity, no the RPi3 CANNOT be "configured as a mass storage device"
- the rpi3 can only BOOT from USB /ethernet with that beta software.


The only pi models that can be a slave gadget device (mass storage device) are those without the usb hub chip:
Pi Zero, A+ and compute module
Oops! Clang!

Absolutely right. Thanks Mike, and apologies to FoL. I'll edit my contribution with a retraction.

fruitoftheloom
Posts: 20427
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Fri Aug 19, 2016 12:14 pm

mikerr wrote:
B.Goode wrote:There is a blog post from the RPF describing BETA software that allows the conventional (full-size) usb port on an RPi3 to be reconfigured as a Mass Storage Device.
For clarity, no the RPi3 CANNOT be "configured as a mass storage device"
- the rpi3 can only BOOT from USB /ethernet with that beta software.


The only pi models that can be a slave gadget device (mass storage device) are those without the usb hub chip:
Pi Zero, A+ and compute module
You forget the RPi 1A !!

It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.


http://blog.gbaman.info/?p=699
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
E3V3A
Posts: 26
Joined: Sun Apr 17, 2016 7:13 am
Location: -∇φ

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Tue Sep 13, 2016 10:15 am

@fruitoftheloom
Yep a ZERO can be many things a RPi 3B can not, because the 1B / 1B+ / 2B / 3B has a LAN9512/4 USB Hub/ Ethernet Port on the end of the USB BUS,
Assuming an RP3-B:
If one is not using any of those USB HUB endpoint devices (Ethernet etc), I'd guess it would be possible to cut and pull the original USB_ID line to provide a OTG function? Where are the schematics showing how this is actually wired?

User avatar
rpdom
Posts: 14976
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Tue Sep 13, 2016 7:59 pm

E3V3A wrote:Assuming an RP3-B:
If one is not using any of those USB HUB endpoint devices (Ethernet etc), I'd guess it would be possible to cut and pull the original USB_ID line to provide a OTG function? Where are the schematics showing how this is actually wired?
The schematics for the USB data and OTG lines will be similar, if not identical, to that of the original Pi A/B ones.

The OTG USB_ID line is grounded close to the chip, which means you can't get normal OTG function without hardcoding it (as has been used on the A and A+ models).

User avatar
E3V3A
Posts: 26
Joined: Sun Apr 17, 2016 7:13 am
Location: -∇φ

Re: Can I use Raspberry Pi model B as slave(gadget) device?

Wed Sep 14, 2016 3:05 pm

rpdom wrote:The schematics for the USB data and OTG lines will be similar, if not identical, to that of the original Pi A/B ones. The OTG USB_ID line is grounded close to the chip, which means you can't get normal OTG function without hardcoding it (as has been used on the A and A+ models).
Great! So looking at the schematics (page 3) from the other models and assuming (since we don't have the proper ones for the RP3B) that the connections to the LAN9514 are similar to what is shown, then we should be able to cut the USB_OTGID`(K16) and patch it out to a switch, while either (a) shutting down the LAN9512 completely or (b) cut-patching out USB_DP/M0 (IC3:58,59). Then we see that we have direct USB connection to IC2.

Image

Return to “General discussion”