Modify your h2200 cradle to provide a serial port
- Introduction
- Parts and tools required
- Procedure
- What the final result looks like
- Testing
- Connecting to the serial console of your Pocket PC
- Sample of a console boot
1. Introduction
-
If you can't source some sort of serial cable for your h2200, the cradle can be modified to add what is known as
This procedure should be classed as an AT YOUR OWN RISK project. The fine soldering required by this procedure should not be attempted by a novice.
2. Parts and tools required
-
-
DB9M to DB9F serial cable
-
Transistor nipper (small side-cutting plier)
-
Soldering Iron with small plated tip (25W min.)
-
T6 Torx screwdriver
-
Multimeter
-
A drill or sharp hobby knife
-
a small cable-tie
3. Procedure
3.1. Serial cable preparation
-
Cut off the male plug from the serial cable, and strip about 2cm of the insulation. Prepare the ends of each wire to be connected by stripping approx. 2mm of it's insulation and tinning each one, then retrim the wire to 1-1.5mm.
3.2. Cradle preparation
-
Open the cradle by undoing the four screws in the base (2 are under the rubber feet). No force is required, however, slight pressure on the black base just above the HP Logo will release the clip underneath.
Once apart, unclip the USB cable from it's socket (it gets in the way). A hole for the serial cable now needs to be cut in the base next to the entry for the USB cable. Thread the cut end of the serial cable into the cradle enclosure.
3.3. Soldering the cable
-
With the multimeter, find the wires which correspond to pins 2, 3 and 5 on the DB9F.
The diagram below indicates the pin numbering of the female DB9 (the plug with the holes, not the pins!:)
(Observing that TXD and RXD are "crossed over".).
| DB9F | CON103 | ||
| 2 | RXD | TXD | 3 |
| 3 | TXD | RXD | 2 |
| 5 | GND | 5 | |
-
It is best to tin the pads first, and then dab the iron on the wire while it's being held in place. DO NOT OVERHEAT THE SOLDER PADS!!!
Check using a multimeter that adjacent pads are not bridged.
3.3.1. OPTIONAL
-
By soldering the remaining wires in order, it's possible to enable hardware flow control.
Be aware that this only makes the job harder, and is not a requirement.
3.3.2. Note for those trying to modify a USB-only cradle from another port:
-
Solder a piece of ribbon cable to likely connector points. Locate signal ground by testing continuity with pin 4 of the USB plug. Measure the voltages on your best guesses. Insert device and boot Linux.
# cat /dev/urandom > /dev/ttyS0The TXD line will probably end up being just over 1V rather than +/- 6V (or 0V). RXD will mostly likely be close by TXD, and can be found by experimentation. Once you have likely candidates hooked up with clip leads, try
# for i in $(seq 10000); do echo -n $i > /dev/ttyS0; doneon the device, and use minicom or hyperterminal on the other end to verify output.
3.4. Reassembly
-
Slide the board into the upper base being carefull not to move the serial cable too much, as the solder pads may break off the board (particularly if you've overheated your soldering). Carefully move the serial wires to ensure that there is enough room for the screw mount. Secure the end of the serial cable within the cradle, by tightly strapping a cable tie to the insulation of the lead.
Now remove the board, reattach the USB cable, and insert the board into the lower base, carefully placing the power socket into it's locating clip. With short leads on the serial cable, this can be quite tricky, as the power socket can be hard to secure while assembling the wrong way around, so caution and patience are required (or longer, more flexible serial leads
4. What the final result looks like
5. Testing
-
The simplest way to test that the cable "works" is to shove random data out of the host serial port:
# dd if=/dev/urandom of=/dev/ttyS0By measuring the voltage between GND (5) and RXD (2) on CON103, both before and after using the dd command, you should be able to detect a voltage change in the order of 60-100 mV. (ie. from, say, 10.6V to 10.66V). Press CTRL+C to halt dd when finished.
The same technique can be used on the Pocket PC end to compare the RXD voltages on the DB9.
6. Connecting to the serial console of your Pocket PC
-
Start a
S:2345:respawn:/sbin/getty 115200 ttyS0 vt100A reboot is required (*) to have the getty started. (* simple method)
-
Start
# minicom -s
(you don't need to be root, but you do need privilleges for the port)
-
Set the port parameters:
-
* Set Hardware Flow Control to No if you have only soldered a 3-wire interface.
| A | Serial Device | /dev/ttyS0 |
| B | Lockfile Location | /var/lock |
| C | Callin Program | |
| D | Callout Program | |
| E | Bps/Par/Bits | 115200 8N1 |
| F | Hardware Flow Control | Yes* |
| G | Software Flow Control | No |
-
Save the settings as default (handy for later), and restart minicom with
# minicom -o
-
Reset your Pocket PC and place it in your new Serial Cradle.
7. Sample of a console boot
-
Sample output from an old image I had lying around:
Welcome to minicom 2.1 OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n Compiled on Nov 4 2005, 18:10:30. Press CTRL-A Z for help on special keys Linux version 2.6.13-hh1 (marcus@gentoo) (gcc version 3.4.4) #3 Mon Nov 14 17:05:515CPU: XScale-PXA255 [69052d06] revision 6 (ARMv5TE) Machine: HP iPAQ H2200 Memory policy: ECC disabled, Data cache writeback Memory clock: 99.53MHz (*27) Run Mode clock: 398.13MHz (*4) Turbo Mode clock: 398.13MHz (*1.0, inactive) CPU0: D VIVT undefined 5 cache CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets Built 1 zonelists Kernel command line: root=/dev/mmcblk0p2 noinitrd cachepolicy=writeback console=tty8PID hash table entries: 512 (order: 9, 8192 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 64MB = 64MB total Memory: 62208KB available (2091K code, 401K data, 96K init) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 platform_device_register hamcop platform_device_register pxa2xx-keys platform_device_register h2200 battery platform_device_register pxa2xx-mci platform_device_register pxa2xx-udc platform_device_register pxa2xx-fb platform_device_register pxa2xx-uart platform_device_register pxa2xx-uart platform_device_register pxa2xx-uart platform_device_register pxa2xx-i2c platform_device_register pxa2xx-i2s platform_device_register pxa2xx-uart hamcop: using irq 104-129 on irq 28 platform_device_register samcop adc platform_device_register hamcop nand platform_device_register samcop owm platform_device_register hamcop leds platform_device_register samcop dma SAMCOP DMA Driver, (c) 2003-2004 Simtec Electronics DMA channel 0 at c4902400, irq 120 platform_device_register samcop sdi Initialising wince bootloader suspend workaround NetWinder Floating Point Emulator V0.97 (double precision) JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc. Initializing Cryptographic API platform_device_register mq11xx ttyS0 at MMIO 0x40100000 (irq = 15) is a FFUART ttyS1 at MMIO 0x40200000 (irq = 14) is a BTUART ttyS2 at MMIO 0x40700000 (irq = 13) is a STUART ttyS3 at MMIO 0x41600000 (irq = 0) is a HWUART io scheduler noop registered RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx IPAQ flash: probing 32-bit flash bus, window=0 Probe at base[0x00](0x00000000) past the end of the map(0xffffffff) Probe at base[0x00](0x00000000) past the end of the map(0xffffffff) Probe at base[0x00](0x00000000) past the end of the map(0xffffffff) NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit) Scanning device for bad blocks Using builtin partition definition Creating 4 MTD partitions on "NAND 32MiB 3,3V 8-bit": 0x00000000-0x00004000 : "HTC first-stage bootstrap" 0x00004000-0x00028000 : "HTC rescue bootloader" 0x00028000-0x00168000 : "second-stage loader" 0x00168000-0x02000000 : "root fs" platform_device_register pxa2xx-pcmcia pxa2xx_udc: version 4-May-2005 usb0: Ethernet Gadget, version: May Day 2005 usb0: using pxa2xx_udc, OUT ep2out-bulk IN ep1in-bulk usb0: MAC 96:eb:f6:2e:9d:e6 i2c /dev entries driver I2C: i2c-0: PXA I2C adapter dmabounce: registered device samcop sdi on platform bus samcop sdi: probe: irq=124 irq_cd=31 dma=0. samcop sdi: initialisation done. platform_device_register mq11xx_fb platform_device_register mq11xx_lcd platform_device_register mq11xx_udc platform_device_register mq11xx_uhc MediaQ 1188 chip detected, base IRQ 130 NET: Registered protocol family 2 mmc0: host does not support reading read-only switch. assuming write-enable. mmcblk0: mmc0:a95c SD512 495488KiB mmcblk0: p1 p2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended VFS: Mounted root (ext2 filesystem). Freeing init memory: 96K INIT: version 2.86 booting mount: Mounting proc on /proc failed: Device or resource busy chvt: Couldn't get a file descriptor referring to the console chvt: VT_ACTIVATE: Bad file descriptor Creating initial device nodes... mount: Mounting usbdevfs on /proc/bus/usb failed: No such device umount: /proc/bus/usb: Invalid argument Setting up IP spoofing protection: rp_filter. Configuring network interfaces... SIOCSIFADDR: No such device SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device SIOCGIFFLAGS: No such device route: SIOC[ADD|DEL]RT: No such device done. Starting portmap daemon: portmap. Turning echo off on /dev/tts/3 Configuring h2200-bootloader FATAL: Module mtdblock not found. postinst script returned status 1 ERROR: h2200-bootloader.postinst returned 1 Nothing to be done INIT: Entering runlevel: 5 Starting Dropbear SSH server: dropbear. Starting advanced power management daemon: apmd[2206]: apmd 3.2.1 interfacing with 2apmd. Removing stale PID file /var/run/dbus/pid. Starting system message bus: dbus-1. Starting irattach: . Starting lirc daemon: lircdlircd 0.7.1: WARNING: config file contains no valid remon. Starting PCMCIA services: modprobe: WARNING: Error inserting crc_ccitt (/lib/modulet cardmgr[2320]: watching 1 socket done. Starting Samba: smbd nmbd. Starting syslogd/klogd: done Starting Bluetooth subsystem: hcid sdpd hidd hid2hci rfcomm pand. Starting at daemon: atd. Starting GPE display manager: gpe-dm Familiar Linux v0.8.3-prerelease-snapshot-20051025 h2200 tts/0 h2200 login:








