USB host

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(The Neo1973 as a USB host)
(Grammar)
Line 1: Line 1:
 
== The Neo1973 as a USB host ==
 
== The Neo1973 as a USB host ==
The Neo1973's mini-usb port can be configured to act as a usb host instead of a usb device. This opens up a range of possibilities, such as usb cameras and usb input devices.
+
The Neo1973's mini-USB port can be configured to act as a usb host instead of a usb device. This opens up a range of possibilities, such as USB cameras and usb input devices.
  
 
This used to require a kernel patch [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=876 as an attachment in Bugzilla], but that same page now details how to do this <i>without</i> any kernel hacking:
 
This used to require a kernel patch [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=876 as an attachment in Bugzilla], but that same page now details how to do this <i>without</i> any kernel hacking:
Line 15: Line 15:
  
  
Note: You may want to run <code>ifconfig usb0 down</code> prior to switching to usb host mode, as the Neo's usb networking may not like having it's usb port disappear. You'll probably want to ssh into your Neo over WiFi or Bluetooth before starting all of this, alternatively use an on screen keyboard.
+
Note: You may want to run <code>ifconfig usb0 down</code> prior to switching to usb host mode, as the Neo's usb networking may not like having its USB port disappear. You'll probably want to ssh into your Neo over WiFi or Bluetooth before starting all of this, alternatively use an on screen keyboard.
  
 
=== Three-Headed Cable ===
 
=== Three-Headed Cable ===
Line 21: Line 21:
  
 
* A mini-usb type B cable for the Neo itself
 
* A mini-usb type B cable for the Neo itself
* A cable of whatever type to go to your usb device.
+
* A cable of whatever type to go to your USB device.
* A cable going to a +5V voltage source with enough power for your device and to charge the Neo. This could be a wall charger or even another usb plug.
+
* A cable going to a +5V voltage source with enough power for your device and to charge the Neo. This could be a wall charger or even another USB plug.
  
 
You just connect the Data+ and Data- wires of the Neo and the device, and connect all of the ground wires together and all of the +5V wires together. This powers the Neo and the device, while letting the neo talk to the device.
 
You just connect the Data+ and Data- wires of the Neo and the device, and connect all of the ground wires together and all of the +5V wires together. This powers the Neo and the device, while letting the neo talk to the device.

Revision as of 21:19, 16 July 2008

Contents

The Neo1973 as a USB host

The Neo1973's mini-USB port can be configured to act as a usb host instead of a usb device. This opens up a range of possibilities, such as USB cameras and usb input devices.

This used to require a kernel patch as an attachment in Bugzilla, but that same page now details how to do this without any kernel hacking:


Tell the device that it is logically a host:

echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode


Instruct the device to provide 5 volts:

echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode


Note: You may want to run ifconfig usb0 down prior to switching to usb host mode, as the Neo's usb networking may not like having its USB port disappear. You'll probably want to ssh into your Neo over WiFi or Bluetooth before starting all of this, alternatively use an on screen keyboard.

Three-Headed Cable

At the moment, you'll have to manufacture this one yourself. You need to make a cable with three ends:

  • A mini-usb type B cable for the Neo itself
  • A cable of whatever type to go to your USB device.
  • A cable going to a +5V voltage source with enough power for your device and to charge the Neo. This could be a wall charger or even another USB plug.

You just connect the Data+ and Data- wires of the Neo and the device, and connect all of the ground wires together and all of the +5V wires together. This powers the Neo and the device, while letting the neo talk to the device.

Just for reference, the USB wires from left to right are:

  • Black: Power -
  • Green: Data -
  • White: Data +
  • Red: Power +

Console

Although you could use a USB keyboard, you may want to have a console while you're doing all of this. You'll probably want to use bluetooth in conjunction with pand to set up bluetooth networking.

See Manually_using_Bluetooth

Power Concerns

You'll need to force the Neo to go into fast charge mode, since it can't do its usual power negotiation over USB.

echo -n "fast_cccv" > /sys/devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/chgmode

Personal tools

The Neo1973 as a USB host

The Neo1973's mini-USB port can be configured to act as a usb host instead of a usb device. This opens up a range of possibilities, such as USB cameras and usb input devices.

This used to require a kernel patch as an attachment in Bugzilla, but that same page now details how to do this without any kernel hacking:


Tell the device that it is logically a host:

echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode


Instruct the device to provide 5 volts:

echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode


Note: You may want to run ifconfig usb0 down prior to switching to usb host mode, as the Neo's usb networking may not like having its USB port disappear. You'll probably want to ssh into your Neo over WiFi or Bluetooth before starting all of this, alternatively use an on screen keyboard.

Three-Headed Cable

At the moment, you'll have to manufacture this one yourself. You need to make a cable with three ends:

  • A mini-usb type B cable for the Neo itself
  • A cable of whatever type to go to your USB device.
  • A cable going to a +5V voltage source with enough power for your device and to charge the Neo. This could be a wall charger or even another USB plug.

You just connect the Data+ and Data- wires of the Neo and the device, and connect all of the ground wires together and all of the +5V wires together. This powers the Neo and the device, while letting the neo talk to the device.

Just for reference, the USB wires from left to right are:

  • Black: Power -
  • Green: Data -
  • White: Data +
  • Red: Power +

Console

Although you could use a USB keyboard, you may want to have a console while you're doing all of this. You'll probably want to use bluetooth in conjunction with pand to set up bluetooth networking.

See Manually_using_Bluetooth

Power Concerns

You'll need to force the Neo to go into fast charge mode, since it can't do its usual power negotiation over USB.

echo -n "fast_cccv" > /sys/devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/chgmode