USB host

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(-cat)

Revision as of 12:32, 13 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.

In order to get this working, you need the proper patch. For now, that patch is available as an attachment in Bugzilla.

Once you've managed to get a patched kernel onto your openmoko, you just need to tweak a /sys knob to switch to host mode:

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

Note that 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 it's usb port disappear. You'll probably want to ssh into your Neo over bluetooth before starting all of this.

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 negotation 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.

In order to get this working, you need the proper patch. For now, that patch is available as an attachment in Bugzilla.

Once you've managed to get a patched kernel onto your openmoko, you just need to tweak a /sys knob to switch to host mode:

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

Note that 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 it's usb port disappear. You'll probably want to ssh into your Neo over bluetooth before starting all of this.

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 negotation over USB.

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