Raspberry Pi has a Micro USB port for power supply. My question is if this port is only for power purposes or can it be used for data as well? I would like to be able to attach my Raspberry Pi as a USB peripheral to another computer. Is this possible over a power port? If not, can this be done in another way?
|
I've had a look at the schematic; the data pins for the micro USB connection are not connected to anything. Therefore, there is no way to mount the RPi as an external device. It could be possible to mount the RPi's hard drive or login over the network by using SSH. The GPIO pins include a set of UART data lines, which could be used to form a serial connection to the RPi from your PC. Bit-banging USBBit-banging USB has been done (AVR V-USB), however, you would need to design your own expansion board that added another USB port. It is conceivable this port could power the RPi. Having done this, you would need to write some sort of driver. Good Luck. If you are prepared to go to all this trouble, it might be worth looking at an FTDI Chip instead. You would connect this to the UART pins of the RPi. From a software perspective, you would communicate with the computer as if it was a serial device. |
|||||||||||||||||
|
|
Unfortunately power supply ports do not generally work this way so you will not be able to use the micro USB port for anything other than power. I can't currently think of a way you can use the Pi as a peripheral device, however there are several other ways you can access the Pi including SSH, FTP or samba share. If you elaborate on what you are trying to achieve then we can advise the best method of doing it. |
|||||
|
|
The Model A will be able to use the standard gadget interface since the USB on the PI is OTG then you can just force it into device mode. But this means you lose ethernet and any other USB Gordon |
|||||
|
|
As the data pins of the micro USB port are not connected to the SoC's USB PHY you cannot use this port for data (in either host or slave mode). It should be possible however to use the USB Type A port on the Model A in slave mode. Some further details; The Model B uses a SMSC LAN9512 USB 2.0 Hub and 10/100 Ethernet Controller IC to provide multiple physical USB host ports from the single USB OTG port available on the Broadcom SoC. (See schematic here: http://www.raspberrypi.org/wp-content/uploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf) The presence of this hub IC prevents the USB ports from being used in slave mode. However, as the Model A does not have this IC present and instead just has a single USB port connected directly to the SoC's OTG port it should be possible to configure it to act in slave mode through software. As the Model A has a female host USB port, a HOST to HOST conversion cable will be needed. Please see this Raspberry Pi Forum thread for more details: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=15696 |
|||
|
|
|
Yes you can if you use some USB Peripheral Controller with SPI Interface like MAX3420E and write driver for it if it is not yet supported in Linux and handle specific USB class you want to implement. |
|||
|
|
|
You could do a simple network connection from your PC to the Raspberry Pi and use Pulse Audio to transfer sound over the network. Pulse Audio is a Sound Server which offers network transparency. So you can play sound files on your PC and hear them with speakers connected to your Raspberry Pi. |
|||
|
|

