Difference between revisions of "USB reference"

From Pandora Wiki
Jump to: navigation, search
(Links: cat)
("slave": Add section on networking between Pandora and PC using USB slave mode)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Readme First!==
+
[[File:Lead_Photo_For_USB_reference0-16342102418375748.jpg|thumbnail|Main usb port]]
  
If you have a question to ask, that isn't covered in this FAQ already, please ask over on the [http://www.gp32x.com/board/index.php?showforum=61 Forums].
+
The Pandora has two USB host ports:
  
==USB FAQ==
 
 
===How many USB ports does Pandora have?===
 
Pandora has two USB ports:
 
 
* 1x USB 2.0 host port (USB standard-A receptacle)
 
* 1x USB 2.0 host port (USB standard-A receptacle)
 
* 1x USB 1.1/2.0 OTG port (USB mini-AB receptacle)
 
* 1x USB 1.1/2.0 OTG port (USB mini-AB receptacle)
 +
<br />
 +
{|
 +
|-
 +
|↓PLUGS→            || '''Big USB A''' || '''Small mini USB'''
 +
|-
 +
| '''1.0 devices''' ||  hub            || yes otg
 +
|-
 +
| '''2.* devices''' || Yes            || yes otg
 +
|-
 +
| '''As Host'''    || yes 500mA      || yes 100mA use mini A cable
 +
|-
 +
| '''As slave'''    || No              || yes      use mini B cable
 +
|-
 +
| '''Charging'''    || No              || Yes  700mA → <500mA
 +
|}
  
===What does “host port” mean?===
+
If you have a question to ask, please head on over to the [http://boards.openpandora.org/index.php/index/ Forums]. Or use feedback function below. Thank you!
A USB host port “hosts” any device that you plug in, just like the USB ports on your computer. Pandora’s full size USB A port can host USB 2.0 devices (only if they are '''high speed compliant'''!), and provide up to 500mA (the maximum allowed according to USB standards).
 
 
 
===What does “OTG” mean?===
 
OTG stands for On The Go. USB OTG ports can operate in two different modes. When connected through this port, the Pandora can act as a device, for example when connected to a computer for charging & data transfer. For this mode, you need a standard-A to mini-B cable. However, the Pandora can also act as a host port for USB 1.1 and USB 2.0 devices. For details on how to make the necessary cable connection, see [[USB_reference#OTG_host_mode|the OTG host mode section]]. This port can supply a maximum of 100mA in host mode. Although this port implements On The Go functionality, it can not get an official On The Go certification because the OTG specification requires a device to have exactly one USB port. (The Pandora has two.) Also, the mini-AB connector used on the Pandora has been taken out of the specification in 2007 (but is still widely adopted).
 
  
===What’s all this stuff about USB 1.1 and USB 2.0? Isn’t USB, uh, universal?===
+
==USB 1.1 vs USB 2.0==
USB 1.1 is a subset of the USB 2.0 protocol. Among many other things, the USB 2.0 standard introduced high-speed data transmission, which requires a special controller on the host side. Most USB ports (eg. on your computer’s motherboard, in USB hubs) actually contain '''two chips''' to allow universal compatibility – one that takes care of the Low-Speed (1.0 Mbit/s) and Full-Speed (12 Mbit/s) devices, and another one for the Hi-Speed (480 Mbit/s) devices. The reason is that Low-Speed and Full-Speed are essentially the same protocols operated at different clock frequencies. Hi-Speed is a completely new development and nothing like the other two.
+
<br />
 +
USB 1.1.0Mbit/s  Low-Speed <br />
 +
USB 1.1 12  Mbit/s  Full-Speed <br />
 +
USB 2.0 480 Mbit/s  Hi-Speed<br />
 +
<br />
 +
Most USB ports (eg. on your computer’s motherboard, in USB hubs) actually contain '''two chips''' to allow universal compatibility – one that takes care of the Low-Speed (1.0 Mbit/s) and Full-Speed (12 Mbit/s) devices, and another one for the Hi-Speed (480 Mbit/s) devices. Low-Speed and Full-Speed are essentially the same protocols operated at different clock frequencies.  
 +
Hi-Speed is a new thing, and inherently different from the other two.
 +
The USB 2.0 standard introduced high-speed data transmission, which requires a special controller on the host side.
  
For reasons beyond our control, Pandora’s USB standard-A host port does not contain this second chip. Only USB 2.0 devices bearing the “USB HI-SPEED” logo can be plugged directly into this port. However, USB 1.1 devices can be connected to this port through a USB hub, provided the hub bears the “USB HI-SPEED” logo.
+
'''Pandora’s big USB standard-A''' host port does not contain this second chip, since it uses too much space on the PCB. Therefore only USB 2.0 devices (bearing the “USB HI-SPEED” logo) can be plugged directly into this port. However, USB 1.1 devices can be connected to this port through a USB hub, provided the hub bears the “USB HI-SPEED” logo, meaning it is 2.0 compatible.
  
Pandora’s USB OTG (mini-AB) port is fully compatible with both USB 1.1 and USB 2.0, allowing it to host either type of device.
+
'''Pandora’s USB OTG (mini-AB) port''' is fully compatible with ''both'' USB 1.1 and USB 2.0, allowing it to host either type of device.
  
===So which devices are which?===
+
===Know the difference===
 
[[Image:USB-HighSpeed-certified-Logo.png|thumb|alt=USB High Speed Certified logo|Devices bearing this logo are certified High Speed devices. They can be plugged directly into Pandora's USB 2.0 host port.]]
 
[[Image:USB-HighSpeed-certified-Logo.png|thumb|alt=USB High Speed Certified logo|Devices bearing this logo are certified High Speed devices. They can be plugged directly into Pandora's USB 2.0 host port.]]
There are no set rules. As a very general guide:
+
As a very general guide:
* Common Low-Speed and Full-Speed devices include keyboards, mice, headsets, older USB devices.
+
* Common Low-Speed and Full-Speed devices often include keyboards, mice, headsets, older USB devices.
* Common Hi-Speed devices include cameras, PMPs, HDDs, hubs, card readers, thumb drives.
+
* Common Hi-Speed devices often include cameras, PMPs, HDDs, hubs, card readers, thumb drives.
This is just a rough representation of what’s out there in the wild, and you will find exceptions. Devices like HSDPA modems and GPS units could fall into either category. The only reliable indication of true Hi-Speed compatibility is the “USB Hi-Speed Certified” logo (right).
+
There are exceptions. Devices like HSDPA modems and GPS units could fall into either category. The ''only'' reliable indication of true Hi-Speed compatibility is the “USB Hi-Speed Certified” logo (right).
 
 
===Arrgh, USB used to be simple. What can I actually connect to Pandora?===
 
Almost anything, as long as it's supported by Linux. Think of a USB device that everybody uses (mouse, keyboard, thumb drive...) and chances are it will be a simple matter of plug and play. But this might not be the case for more specialised USB devices (modems, ethernet adapters, USB displays...), many of which will only function with Windows specific drivers.
 
  
If you intend to purchase USB accessories for use with Pandora, you should first research Linux support for that type of device. Devices already tested on Pandora will be added to the [[USB compatibility list]].
+
=== What works ===
 
+
Mouse, keyboard, thumb drives, plug and play. For more specialised USB devices (modems, ethernet adapters, USB displays...) it needs to
The various USB connection scenarios are as follows:
+
be supported by a linux driver. see [[USB_compatibility_list]]
 
+
If you intend to purchase USB accessories for use with Pandora and it isnt on the list, you should first research to find out if there is Linux support for said device.
==Pandora as USB slave==
 
[[Image:Pandora.usb.slave.png|thumb|alt=Pandora as USB slave|Pandora as USB slave]]
 
Using a USB standard-A to mini-B cable (the kind you probably own several of), you can:
 
* Transfer data to/from Pandora
 
* Charge Pandora's battery.
 
  
'''Note:'''
+
==“host”==
* Charging Pandora from your computer's USB port is best done with Pandora in standby mode. The current provided by your computer will probably not be sufficient to provide a quick charge while Pandora is being used.
+
A USB host port “hosts” any device that you plug in, the same as the USB ports on your computer. Pandora’s full size USB A port can host USB 2.0 devices, (but only if they are '''high speed compliant''') it provides up to 500mA of current (the maximum allowed according to USB standards 2.5Watt. Usb voltage is 5V)
* There are USB standard-A to mini-B cables that can be used to charge your Pandora but don't work to transfer data to/ from the Pandora! MSWindows will complain abount "An unknown device connected". Try using a different cable.
 
  
==Hosting USB devices==
+
===USB standard-A===
 
[[Image:Pandora.usb.host.png|thumb|alt=Pandora as a USB host|Pandora as a USB host]]
 
[[Image:Pandora.usb.host.png|thumb|alt=Pandora as a USB host|Pandora as a USB host]]
*Directly plug in a Hi-Speed USB 2.0 device such as a thumb drive, or a Huawei E160 modem.
+
*Fo example: Directly plug in a Hi-Speed USB 2.0 device such as a thumb drive, or a Huawei E160 modem.
 
*Using a USB standard-A to USB standard-B (or mini-B, micro-B, depending on what's on the device) cable, connect Hi-Speed USB 2.0 devices such as cameras, PMPs, and HDDS.
 
*Using a USB standard-A to USB standard-B (or mini-B, micro-B, depending on what's on the device) cable, connect Hi-Speed USB 2.0 devices such as cameras, PMPs, and HDDS.
*Connect a USB hub, which will enable you to to connect other non-Hi-Speed USB devices such as keyboards, mice, or a Huawei E220 modem.
 
  
'''Note:'''
+
Devices that are not Usb 2.*
*This port can supply a maximum of 500mA. If you plan to use a USB HDD, note that very few of these can draw sufficient power from a single USB port. A powered HDD caddy or powered USB hub will be necessary in most cases.
+
For other non-Hi-Speed USB devices such as keyboards, mice, or a Huawei E220 modem. You need a usb hub in between, which translates, or you can use the smaller usb port which has support for both.
 +
 
 +
Devices that require more power.
 +
USB HDDs, very few of these can draw sufficient power from a single USB port. If its a powered HDD its ok, otherwise a powered USB hub is necessary. A USB standard-A male to USB standard-A female cable '''will not work''' as a hub.
  
==OTG host mode==
+
===USB OTG (mini-AB) port===
 
[[Image:Pandora.usb.otg.host.png|thumb|alt=Pandora in OTG host mode|Pandora in OTG host mode]]
 
[[Image:Pandora.usb.otg.host.png|thumb|alt=Pandora in OTG host mode|Pandora in OTG host mode]]
 
How you connect a device to the mini-AB OTG port depends on the device's USB connector.
 
How you connect a device to the mini-AB OTG port depends on the device's USB connector.
 +
OTG stands for On The Go.
 +
 +
 +
Allows you to connect any USB 2.0-compliant device (Hi-Speed, Full-Speed, Low-Speed, including USB 1.1 ones) directly, without the use of a hub.
 +
 +
This port can act as a host port for USB 1.1 and USB 2.0 devices. It can supply a maximum of 100mA in host mode. (if you need more use the USB standard A (500mA)) If its a non Hi-Speed device, use a powered usb hub.
 +
 +
USB OTG ports can operate in two different modes. When connected through this port, the Pandora can also act as a device, for example when connected to a computer for charging & data transfer. For this mode, you need a standard-A to mini-B cable.
 +
 
*standard-B receptacle: Use a mini-A to standard-B cable.
 
*standard-B receptacle: Use a mini-A to standard-B cable.
 
*mini-B receptacle:  Use a mini-A to mini-B cable.
 
*mini-B receptacle:  Use a mini-A to mini-B cable.
Line 66: Line 82:
 
*micro-A plug: No standardized solution exists.
 
*micro-A plug: No standardized solution exists.
  
This port allows you to connect any USB 2.0-compliant device (Hi-Speed, Full-Speed, Low-Speed, including USB 1.1 ones) directly, without the use of a hub.
+
There are USB standard-A to mini-B cables that can be used to charge your Pandora but don't work to transfer data to/ from the Pandora! In MSWindows you will get the error: "An unknown device connected". Try using a different cable.
  
 
'''Notes:'''
 
'''Notes:'''
*mini-A and mini-AB connectors have been removed from the present USB standard. This means that the above connectors may vanish from the market at some point (although there will probably be demand for them for some time). There are a lot of connectors available that were never standardized. It is recommended that you do not use them as they may lead to non-working connections. Stick to the cables and adapters mentioned above and look for a mention of "OTG" or "On The Go" and you should be on the safe side.
+
Although this port implements On The Go functionality, it can not get an official On The Go certification because the OTG specification requires a device to have exactly one USB port. (The Pandora has two.) The mini-AB connector used on the Pandora has been taken out of that specification in 2007 despite being widely adopted.
*In host mode, this port can supply a maximum of 100mA. USB 1.1 devices that draw more than 100mA will need to connect to Pandora's other USB port via a hub, as depicted in the previous example. The Huawei E220 is one such device.
+
 
 +
*mini-A and mini-AB connectors have been removed from the present USB standard.
 
*If you have trouble connecting any device to the small OTG port, check if 'Setting->Startup->Enable/Disable services on boot->Start USB Network on bootup' is checked! This needs to be set in order to work. Default setting is unchecked (better naming of this option <strike>is planned for Hotfix5</strike> has not been included in HotFix 5, see [http://www.gp32x.com/board/index.php?/topic/56516-wishlist-for-hf5/]).  
 
*If you have trouble connecting any device to the small OTG port, check if 'Setting->Startup->Enable/Disable services on boot->Start USB Network on bootup' is checked! This needs to be set in order to work. Default setting is unchecked (better naming of this option <strike>is planned for Hotfix5</strike> has not been included in HotFix 5, see [http://www.gp32x.com/board/index.php?/topic/56516-wishlist-for-hf5/]).  
  
'''Host mode connector'''
+
'''Mini connector'''
 
[[Image:Mini-usb.png|thumb|Mini-B and Mini-A comparison]]
 
[[Image:Mini-usb.png|thumb|Mini-B and Mini-A comparison]]
 
Shown here are a Mini-B connector (left, black) and a Mini-A connector (right, white). The mini-A connector should be the one you want in order to use the OTG port in host mode. Click on the image for a larger version.
 
Shown here are a Mini-B connector (left, black) and a Mini-A connector (right, white). The mini-A connector should be the one you want in order to use the OTG port in host mode. Click on the image for a larger version.
  
 
With the right connector, it is not necessary to switch the mode of the port[http://www.gp32x.com/board/index.php?/topic/55396-how-do-you-put-the-usb-otg-port-into-host-mode/], it will be done automatically. It may also be possible to force a mode switch, but this has not been clarified by the devs, and could result in two devices both attempting to power the port (which is not recommended)
 
With the right connector, it is not necessary to switch the mode of the port[http://www.gp32x.com/board/index.php?/topic/55396-how-do-you-put-the-usb-otg-port-into-host-mode/], it will be done automatically. It may also be possible to force a mode switch, but this has not been clarified by the devs, and could result in two devices both attempting to power the port (which is not recommended)
 +
 +
== "slave"==
 +
Pandora as USB slave
 +
[[Image:Pandora.usb.slave.png|thumb|alt=Pandora as USB slave|Pandora as USB slave]]
 +
Using a USB standard-A to mini-B cable (the kind you probably own several of), you can:
 +
* Transfer data to/from Pandora
 +
* Charge Pandora's battery.
 +
 +
To enable data transfer for SD cards, run SD-Mass Storage (in the System category).
 +
USB1.1 device work on the Pandora OTG (On The Go) port with the appropriate adapter, active USB extension cable, since the OTG port accepts USB 1.1 devices.
 +
 +
=== Charging ===
 +
With mini usb otg in slave mode. Charging Pandora from your computer's USB port or other powered such, is best done with Pandora in standby mode. The current provided by your computer will probably not be sufficient to provide a quick charge while Pandora is being used.
 +
 +
=== Network ===
 +
When Pandora is connected to a PC it will appear as a USB ethernet device to the PC. This USB ethernet device allows network communication between Pandora and PC with traffic going thru USB cable. This is useful for many things:
 +
* Transfer data to/from Pandora via USB network. Unlike SD-Mass Storage, this doesn't require PC to understand the filesystem on Pandora's SD cards. Instead transfer happens via a program, SSH for example.
 +
* Open a terminal on Pandora via SSH. Great for general Pandora hacking with a better screen/keyboard (the ones from PC).
 +
* Run applications remotely via X forwarding, even PNDs.
 +
 +
LINUX:<br />
 +
When connected you should see a new Ethernet Wired Connection in network manager applet. Edit this connection and change IPv4 settings to "Shared to other computers". Once this is done then run the following command on a terminal on Pandora:
 +
<nowiki>sudo dhclient usb0</nowiki>
 +
If all goes well you should see Pandora take an IP address which you can use to connect to it from PC. To be able to connect via SSH you should enable Dropbear on Pandora in startup settings (Pandora Menu > Settings > Startup).
 +
 +
By default, each time you connect Pandora in this way you'll get a new Ethernet Wired Connection and will have to repeat the above steps. This can be avoided by making Pandora always take the same MAC address when connected as USB slave. To do this add the following line at the end of /etc/modprobe.conf on Pandora:
 +
<nowiki>options g_cdc host_addr=96:d8:19:b7:ef:c3 dev_addr=b2:de:9e:6d:89:b8</nowiki>
 +
 +
Now Pandora will always take the same MAC address and therefore will reuse the same Ethernet Wired Connection on the PC's side. You still need to run the dhclient command on Pandora each time you connect it to PC, though.
  
 
==Links==
 
==Links==
*[[USB_compatibility_list|Pandora USB compatibility list]]
 
 
*[http://www.usb.org/developers/docs/usb_20_122208.zip USB 2.0 Standard (including present OTG spec)]
 
*[http://www.usb.org/developers/docs/usb_20_122208.zip USB 2.0 Standard (including present OTG spec)]
 
*[http://www.usb.org/developers/onthego/otg1_0.pdf Original OTG Specification defining mini-A and mini-AB and allowed connections]
 
*[http://www.usb.org/developers/onthego/otg1_0.pdf Original OTG Specification defining mini-A and mini-AB and allowed connections]
 
*[http://www.usb.org/developers/Deprecation_Announcement_052507.pdf mini-A and mini-AB Deprecation Announcement]
 
*[http://www.usb.org/developers/Deprecation_Announcement_052507.pdf mini-A and mini-AB Deprecation Announcement]
 
*[http://en.wikipedia.org/wiki/USB Wikipedia page on USB]
 
*[http://en.wikipedia.org/wiki/USB Wikipedia page on USB]
 +
*[http://www.retrousb.com/index.php?categoryID=79 Retro USB Game Controllers and Ports]
  
 
[[Category:USB]]
 
[[Category:USB]]

Latest revision as of 17:00, 8 August 2016

Main usb port

The Pandora has two USB host ports:

  • 1x USB 2.0 host port (USB standard-A receptacle)
  • 1x USB 1.1/2.0 OTG port (USB mini-AB receptacle)


↓PLUGS→ Big USB A Small mini USB
1.0 devices hub yes otg
2.* devices Yes yes otg
As Host yes 500mA yes 100mA use mini A cable
As slave No yes use mini B cable
Charging No Yes 700mA → <500mA

If you have a question to ask, please head on over to the Forums. Or use feedback function below. Thank you!

USB 1.1 vs USB 2.0


USB 1.0 1.0Mbit/s Low-Speed
USB 1.1 12 Mbit/s Full-Speed
USB 2.0 480 Mbit/s Hi-Speed

Most USB ports (eg. on your computer’s motherboard, in USB hubs) actually contain two chips to allow universal compatibility – one that takes care of the Low-Speed (1.0 Mbit/s) and Full-Speed (12 Mbit/s) devices, and another one for the Hi-Speed (480 Mbit/s) devices. Low-Speed and Full-Speed are essentially the same protocols operated at different clock frequencies. Hi-Speed is a new thing, and inherently different from the other two. The USB 2.0 standard introduced high-speed data transmission, which requires a special controller on the host side.

Pandora’s big USB standard-A host port does not contain this second chip, since it uses too much space on the PCB. Therefore only USB 2.0 devices (bearing the “USB HI-SPEED” logo) can be plugged directly into this port. However, USB 1.1 devices can be connected to this port through a USB hub, provided the hub bears the “USB HI-SPEED” logo, meaning it is 2.0 compatible.

Pandora’s USB OTG (mini-AB) port is fully compatible with both USB 1.1 and USB 2.0, allowing it to host either type of device.

Know the difference

USB High Speed Certified logo
Devices bearing this logo are certified High Speed devices. They can be plugged directly into Pandora's USB 2.0 host port.

As a very general guide:

  • Common Low-Speed and Full-Speed devices often include keyboards, mice, headsets, older USB devices.
  • Common Hi-Speed devices often include cameras, PMPs, HDDs, hubs, card readers, thumb drives.

There are exceptions. Devices like HSDPA modems and GPS units could fall into either category. The only reliable indication of true Hi-Speed compatibility is the “USB Hi-Speed Certified” logo (right).

What works

Mouse, keyboard, thumb drives, plug and play. For more specialised USB devices (modems, ethernet adapters, USB displays...) it needs to be supported by a linux driver. see USB_compatibility_list If you intend to purchase USB accessories for use with Pandora and it isnt on the list, you should first research to find out if there is Linux support for said device.

“host”

A USB host port “hosts” any device that you plug in, the same as the USB ports on your computer. Pandora’s full size USB A port can host USB 2.0 devices, (but only if they are high speed compliant) it provides up to 500mA of current (the maximum allowed according to USB standards 2.5Watt. Usb voltage is 5V)

USB standard-A

Pandora as a USB host
Pandora as a USB host
  • Fo example: Directly plug in a Hi-Speed USB 2.0 device such as a thumb drive, or a Huawei E160 modem.
  • Using a USB standard-A to USB standard-B (or mini-B, micro-B, depending on what's on the device) cable, connect Hi-Speed USB 2.0 devices such as cameras, PMPs, and HDDS.

Devices that are not Usb 2.* For other non-Hi-Speed USB devices such as keyboards, mice, or a Huawei E220 modem. You need a usb hub in between, which translates, or you can use the smaller usb port which has support for both.

Devices that require more power. USB HDDs, very few of these can draw sufficient power from a single USB port. If its a powered HDD its ok, otherwise a powered USB hub is necessary. A USB standard-A male to USB standard-A female cable will not work as a hub.

USB OTG (mini-AB) port

Pandora in OTG host mode
Pandora in OTG host mode

How you connect a device to the mini-AB OTG port depends on the device's USB connector. OTG stands for On The Go.


Allows you to connect any USB 2.0-compliant device (Hi-Speed, Full-Speed, Low-Speed, including USB 1.1 ones) directly, without the use of a hub.

This port can act as a host port for USB 1.1 and USB 2.0 devices. It can supply a maximum of 100mA in host mode. (if you need more use the USB standard A (500mA)) If its a non Hi-Speed device, use a powered usb hub.

USB OTG ports can operate in two different modes. When connected through this port, the Pandora can also act as a device, for example when connected to a computer for charging & data transfer. For this mode, you need a standard-A to mini-B cable.

  • standard-B receptacle: Use a mini-A to standard-B cable.
  • mini-B receptacle: Use a mini-A to mini-B cable.
  • micro-B receptacle: Use a mini-A plug to standard-A receptacle adapter and a standard-A to micro-B cable.
  • standard-A plug: Use a mini-A plug to standard-A receptacle adapter.
  • mini-A plug: No extra cable or adapter needed.
  • micro-A plug: No standardized solution exists.

There are USB standard-A to mini-B cables that can be used to charge your Pandora but don't work to transfer data to/ from the Pandora! In MSWindows you will get the error: "An unknown device connected". Try using a different cable.

Notes: Although this port implements On The Go functionality, it can not get an official On The Go certification because the OTG specification requires a device to have exactly one USB port. (The Pandora has two.) The mini-AB connector used on the Pandora has been taken out of that specification in 2007 despite being widely adopted.

  • mini-A and mini-AB connectors have been removed from the present USB standard.
  • If you have trouble connecting any device to the small OTG port, check if 'Setting->Startup->Enable/Disable services on boot->Start USB Network on bootup' is checked! This needs to be set in order to work. Default setting is unchecked (better naming of this option is planned for Hotfix5 has not been included in HotFix 5, see [1]).

Mini connector

Mini-B and Mini-A comparison

Shown here are a Mini-B connector (left, black) and a Mini-A connector (right, white). The mini-A connector should be the one you want in order to use the OTG port in host mode. Click on the image for a larger version.

With the right connector, it is not necessary to switch the mode of the port[2], it will be done automatically. It may also be possible to force a mode switch, but this has not been clarified by the devs, and could result in two devices both attempting to power the port (which is not recommended)

"slave"

Pandora as USB slave

Pandora as USB slave
Pandora as USB slave

Using a USB standard-A to mini-B cable (the kind you probably own several of), you can:

  • Transfer data to/from Pandora
  • Charge Pandora's battery.

To enable data transfer for SD cards, run SD-Mass Storage (in the System category). USB1.1 device work on the Pandora OTG (On The Go) port with the appropriate adapter, active USB extension cable, since the OTG port accepts USB 1.1 devices.

Charging

With mini usb otg in slave mode. Charging Pandora from your computer's USB port or other powered such, is best done with Pandora in standby mode. The current provided by your computer will probably not be sufficient to provide a quick charge while Pandora is being used.

Network

When Pandora is connected to a PC it will appear as a USB ethernet device to the PC. This USB ethernet device allows network communication between Pandora and PC with traffic going thru USB cable. This is useful for many things:

  • Transfer data to/from Pandora via USB network. Unlike SD-Mass Storage, this doesn't require PC to understand the filesystem on Pandora's SD cards. Instead transfer happens via a program, SSH for example.
  • Open a terminal on Pandora via SSH. Great for general Pandora hacking with a better screen/keyboard (the ones from PC).
  • Run applications remotely via X forwarding, even PNDs.

LINUX:
When connected you should see a new Ethernet Wired Connection in network manager applet. Edit this connection and change IPv4 settings to "Shared to other computers". Once this is done then run the following command on a terminal on Pandora:

sudo dhclient usb0

If all goes well you should see Pandora take an IP address which you can use to connect to it from PC. To be able to connect via SSH you should enable Dropbear on Pandora in startup settings (Pandora Menu > Settings > Startup).

By default, each time you connect Pandora in this way you'll get a new Ethernet Wired Connection and will have to repeat the above steps. This can be avoided by making Pandora always take the same MAC address when connected as USB slave. To do this add the following line at the end of /etc/modprobe.conf on Pandora:

options g_cdc host_addr=96:d8:19:b7:ef:c3 dev_addr=b2:de:9e:6d:89:b8

Now Pandora will always take the same MAC address and therefore will reuse the same Ethernet Wired Connection on the PC's side. You still need to run the dhclient command on Pandora each time you connect it to PC, though.

Links