[myTouch 3G, Magic Android Development] hause:
You will need soldering equipment and some tools for this.

To connect the magic's rx/tx pins to a pc's com port you will need a ttl-converter.

I had to built such one to flash OpenWRT on a Netgear wgt634u router.

Here is a good source: http://wiki.openwrt.org/oldwiki/openwrtdocs/hardware/netgear/wgt634u

and here: http://members.shaw.ca/swstuff/wgt634u.html

Some nokia data cables have a built-in ttl converter. They can also be modified and used.

I modified the emu (enhanced-mini-usb) connector of the stock-usb-cable.

Here is the pinout:

_____________
| A B C D E |
\1 2 3 4 5 6|

A: GND
B: NC
C: +DATA
D: -DATA
E: +5v

1: +Mic
2: +Right
3: Switch / Rx / CABLE_IN2
4: GND / Tx / CABLE_IN1
5: GND
6: +Left

Source: http://groups.google.com/group/andr...eb835e8dbcc?lnk=gst&q=serial#10a80eb835e8dbcc

See the connector here: http://www.tracyandmatt.co.uk/blogs/index.php/htc_hermes_usb_connector_pin_config

The stock-usb-cable of my magic is not fully equipped. The pins 1-6 are missing.

I took some pins from a old digicam-mainboard and fit them in the stock-usb-cable. (You only need pin 3 and pin 4)

You can buy a emu connector here: http://www.sparkfun.com/commerce/product_info.php?products_id=9167

The cheap version is here: http://www.sparkfun.com/commerce/product_info.php?products_id=9078

Find a 3.3v power-source for the ttl-converter.

(I use the netgear wgt634u as power-source)

Wire the emu's pins to the ttl-converter's pins:

(I think this is not correct but it works for me.)

emu ttl-converter 3.3v power-source
----- -------------- -----------------
3.3v 3.3v
3(RX) TX
4(TX) RX
GND(I used the shield) GND GND

Test if it works:

1. On the pc start a serial-terminal software (minicom/mtty) 115200,8,N,1,no flow control.

2. Power on the ttl-converter.

3. Remove the battery from the magic.

4. Connect the ttl-converter to your pc's com port.

5. Connect the emu to the magic.

6. Don't connect the magic to the pc's USB (for now)

7. Insert the battery into the magic.

8. Press ACTION (Trackball) and POWER

For me this enters ARM9_BOOT_MODE1.

If it works your terminal should show something like this:

boot reason: PM_KPD_PWR_KEY_ON_RT_ST

(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : HYNIX_512MB_FLASH_128MB_SDRAM

ARM9_BOOT_MODE1

If it works, type in your serial-terminal:

setboot (will not be echoed)

If you don't get this:

ARM9BootMode:0

Then try setting mode 0, type:

setboot 0 (will not be echoed)

If you get this:

ARM9BootMode:0

Then remove the battery from your magic, unplug the emu and insert the battery again.

Maybe that's all and your magic boots again.

For me this won't work the first time, when I stuck in the RUU USB mode.

I connected the magic's emu's to the pc's serial and to the pc's USB.

Then on the pc I did:

./fastboot oem rtask a

From there I could change the ARM9 bootmode.

The working rtask's on my magic are: a, b and c.

b and c bring me to the AT-Command interpreter of the radio-bootloader.

When my battery ran empty, in the AT-Command interpreter this was useful:

ate1 (echo on)
atv1 (be verbose)
at$qcpwrdn (brings the magic in bootmode 5 and turns the battery-charger on)

As I said before I think my wiring is wrong:

Some things only work if only the ttl-converter is connected to the ps's serial and the the pc's USB is disconnected.

Can someone give me a hint how to correctly wire these 4 devices together?

(magic, pc, ttl-converter-power-source, ttl-converter)