EMU in serial mode
It is possible to get a serial console without opening the phone.
You can set the EMU into a mode which acts as serial port. You get RX and TX from the mini usb plug, but need an external level shifter like MAX3232 and a power source for the MAX3232.
You need to add console=ttyS0,115200n8 console=tty0 to kernel command line to see boot log on serial. console=tty0 is needed to see the bootmessages on the framebuffer at the same time.
In order to login via serial console you have to make sure the following line is in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
Gen1 phones (outdated)
In the file arch/arm/mach-pxa/ezx.c you need to enable the line emu_switch_to(EMU_SWITCH_TO_UART); and comment out emu_switch_to(EMU_SWITCH_TO_USB); instead. Kernel 2.4 needs a change in drivers/usbd/usbdezx.c. In function cable_hotplug_attach you need to change emu_switch_to(EMU_SWITCH_TO_USB); to emu_switch_to(EMU_SWITCH_TO_UART); for serial conosle to work.
The next patchset, ezx8, will contain a patch which allows a EMU mode switch via a config option.
WARNING: Tested on A1200 only.
Gpios 39 and 53 of AP are connected via EOC to mini usb D+ and D- and by default configured to usb. Following patch required to switch them to FFUART:
Build your own EMU - serial adapter
To build your own EMU to serial adapter you need an external 3.3V power source since the 2.775V from the cell phone is too weak to power the MAX3232. A 2.9V supply can be used, but it is out of spec for the part.
The default color coding for the mini USB signaling is included in the schematic.
- 1* MAX3232
- 5* Capacitor 0.1µF (= 100nF, Code 104)
- 1* [Mini USB plug type B]
- 1* [DE-9 female connector]
Soldering wires on the test pads
The STUART of the AP (ttyS2) can be used as a serial console. There are two test pads (TP440=TxD and TP441=RxD) on the PCB. Also, you'll have to pass "console=ttyS2" to the kernel at boot time (which doesn't seem possible with the original bootloader). However, if you run your own kernel, you can easily add this to CONFIG_CMDLINE.
We are pretty sure that there are also test pads for an uart on test pads of the E680 PCB. Unfortunately we don't get it working until now.