So you want to use your Freerunner in USB Host mode but don't want to drain your battery eh?
Well what you need is a 3 headed power and data cable.
I'm going to cover creating a 3 headed USB cable for connecting a device to your Freerunner and powering them both from an external USB power source (laptop).
You need a USB mini type B 5 pin Male connector to hook into the Freerunner.
You need a USB connector for your device. I have a USB type A Male connector on the cable and use a USB type A Female to Female gender changer to hook up a device.
You need a connector to go to power. I use a USB type A Male connector to hook up to my laptop.
You need a set of 15kOhm resistors.
Yes, I know my wiring is horribly ugly.
If I do this again I'll probably try to wire the lines straight so things area bit neater.
This three headed cable
A pack of resistors that included 15kOhm ones (RadioShack part number 271-306 - 100 Piece Carbon-Film Resistor Assortment - 1/2 watt - 5% tolerance)
A USB type A Female to Female gender changer
A USB keyboard ($10 USB with USB to PS2 adapter rubber rollup keyboard from Staples)
A PS2 Keyboard (TypeMatrix JME-2020) hooked to a USB to dual PS2 port adapter
My Neo Freerunner (running up to date 2008.8)
My ZaReason UltraLap SR laptop.
A cable cutter to cut the cables from the block
A Wire stripper to remove the outside shielding
A sharp knife to remove the shielding from the individual wires
A soldering iron and solder
A hot glue gun and glue
Cut the cables apart from the block where they are joined (if you really want, you could whittle through it like I did when I was dissecting the cable…but it's not really worth the time).
Now you have 3 cables.
The data/power line for the Freerunner, the data/power line for your device, and the power only line for you laptop.
Strip enough of each wire to work with.
Note that with this particular cable, the individual lines are composed of stranded wires, so be careful when cutting away the shielding on them.
Wire the cable back up how it was originally and add in the resistors. :)
Wire the Data+ (White) wires together.
Wire the Data- (Green) wires together.
Wire all 3 Power+ (Red) wires together.
Wire all 3 Power- [Ground] (Black) wires together.
Connect a 15kOhm resistor from Data+ (White) to Power- [Ground] (Black).
Connect a 15kOhm resistor from Data- (Green) to Power- [Ground] (Black).
Hook everything up, Put the Freerunner into USB host mode, enable USB fast charging, and make sure it all works (test the keyboard, run apm to be the Freerunner is charging, etc.)
Hook everything up, Put the Freerunner into USB host mode, enable USB fast charging, and make sure it all still works (test the keyboard, run apm to be the Freerunner is charging, etc.)
I used a hot glue gun to seal all the wiring to ensure the wires don't get crossed or touched by something else and short out the connections.
If all went well you should now have a sealed and working 3 headed data/power cable for your Freerunner.
I just use a quick script for this. It downs the usb0 interface, puts the Freerunner into USB host mode, and enables fast charging at 500mA so it draws enough power even though it can't “see” the power source due to using a power only line to connect to the power source.
ifdown usb0 echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode echo -n "fast_cccv" > /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/chgmode echo 500 > /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/force_usb_limit_dangerous
To put the Freerunner back into USB device mode use
echo "device" > /sys/devices/platform/s3c2410-ohci/usb_mode
I also keep a script with just the usb charging lines in it handy for when I unplug the Freerunner and then plug it back in while it is still in host mode.
echo -n "fast_cccv" > /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/chgmode echo 500 > /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/force_usb_limit_dangerous
I have noticed that the Num Lock and Scroll Lock keys do not work connected to the Freerunner.
Everything else seems to work as usual, even the QWERTY/DVORAK switch on my TypeMatrix.
Usual disclaimer applies. I'm not liable if you fry your Freerunner, Laptop, self, dog, burn your house down, or anything else.