PDF Print E-mail
Written by JLangbridge   
Monday, 20 October 2008 00:07

HP iPaq 4700

hx4700

The HP iPaq 4700 (also known as the hx4700) is an incredibly sexy PocketPC in HP's iPaq range. It was a major step forward for the line, since it was the first HP PocketPC to have a624MHz processor, a full VGA screen (640x480) and a real touchpad instead of cursor buttons. While it didn't work as well as expected, for many it was a joy to own. Most PDAs today tend to prefer a 320x240 screen with less processor power, limiting the users to what 95% of people want anyway - Personal Information Management. The hx4700 had the power and the capacity to run just about anything, and excel in any domain possible. The battery life was excellent for the processor, the screen was perfect for a lot of applications, and the integrated wifi and bluetooth guaranteed maximum mobility. It did, however, have a drawback - Windows.

Technical specs

  • Processor: Intel PXA270 running at 624MHz
  • RAM: 64 Mb

  • ROM: 128 Mb Flash

  • Wireless:

    • WLAN: Texas Instruments TNETW1100B 802.11b aka ACX100

    • Bluetooth: Texas Instruments BRF6150

    • IrDA: Exar XR16L580IL 16550-compatible UART

  • Display: 480x640

  • Graphics controller: ATI Mobileon W3220

  • Touchscreen controller: Texas Instruments TSC2046

  • Audio: AK4641 audio codec

  • Integrated touchpad: Synaptics NavPoint

  • Connectivity: USB  and serial

  • Expansion slots: CF Type I and II, MMC/SD, SDIO slot: Toshiba SDIO

  • Battery: removable, 1800 mAh

  • Weight: 187g

Distributions

The Linux hx4700 began it's life at the Handhelds.org website, which already had an excellent reputation for having ports of Linux on previous iPaqs (my old 3630 and my 3975 were also running distributions from handhelds.org). That worked pretty well, but the handhelds mailing list slowly crawled to a standstill, and then picked up with spam messages. From time to time, a lonely soul asked for help, but they were almost always directed to the Angstrom distribution pages.

Angstrom is a great distribution, that has constant updates, and also provides an entire development system is you want to create your own binaries, add packages or just tinker around. They have pre-made hx4700 distributions, and have 3 different varieties; GPM, Opie and console.

I had no interest what so ever in keeping Windows, so my installation was simple compared to others. I erased the entire flash after updating the bootstrap.

BIG FAT WARNING: The hx4700 is an embedded system, and if something goes wrong, it can be VERY difficult to restore things to their original setting. Everything on the hx4700; the system, the data and even the bootloader, is on flash memory, which can be erased. Be very careful, otherwise you can end up with a pretty, expensive and lightweight brick. Don't blindly follow what is written here, read about Linux on the hx4700, read other blogs and other tutorials before trying anything. WIndows isn't great, but it is better than nothing, which is exactly what you can get on the hx4700 if you aren't careful. It worked for me, though.

Requirements

In order to install Linux onto an hx4700, you will need a few things. You will need a PC with Linux (Windows would probably work, but I don't know how to, this HowTo is focused on Linux). You will also need a card reader, and 2 memory cards; an SD card and a CompactFlash. The Bootloader can only be done via an SD card, and the Linux system can only be done via a CompactFlash. The SD card must be at least 256Mb, but I don't know if SDHC cards will work or not. The CF card can be any size.

Bootloader

The bootloader is the veryfirst thing that is run on the iPaq. When the processor starts up, it looks at a specific memory location to find instructions, and that is where the bootloader lives. It is responsible for basic setups; but its main job is to start up the operating system. In order to put the bootloader into maintenance mode, you need to start up the iPaq in a very specific mode. Enter the bootloader shell by pressing down the Contacts button and the iTask button, then pusing Reset at the bottom of the system. The system will reboot, and the current version should be printed on the screen (v1.01 for me). The screen isn't backlit at this point, so it might be hard to see. At this point, we aren't doing anything dangerous. A reset will immediately put the iPaq back to its original state.

Now we need to talk to the iPaq. iPaqs are great machines that come with lots of hardware, but the one thing a PDA doesn't have is a keyboard. Set the iPaq into its USB cradle, and "USB" should come up on the screen. The iPaq should now be accessible via /dev/ttyUSB0. Set up minicom (or another terminal application) to use the USB port, and connect. You may have to hit enter a few times to talk to the system, but you should get the following message:

USB>

Backing up the original ROM contents

For safety, you should back up the contents of your ROM. In case anything goes wrong, you can always flash this back to your PDA. This will back up the Windows ROM, all applications, but not any saved parameters. Contacts, agendas and any other volatile info are stored in RAM, and this will not back up temporary data. The contents are saved onto an SD card, use a 256Mb+ card (I used a 512Mb and a 1Gb SD card, I'm not too sure if SDHC (4Gb+) cards work). WARNING: This will erase any and all data on the SD card.

USB>d2s
SD:Waiting for card insert.........
CMD3 for SD, it's OK, ready to get RCA from response.
SD:Detected one card
SD:ready for transfer OK
Total card size=3D680000e=0
SDCARDD2S+,cStoragePlatformType=FF
***************************************************************************
Store image to SD/MMC card successful.
USB>

From here on, there are several things you can do. Mark the SD card and put it into a safe place, or copy the data from the SD onto a file on your PC. I saved the contents to my PC, using the following:

# dd if=/dev/sd<x> of=backup.img bs=130M count=1

Make sure that you use the right descriptor for your SD card, mine was /dev/sdb. You can then always write this back onto an SD card, and it doesn't matter what size the card is. This technique writes raw data straight to the SD card, without a file system. To write the contents back, just do:

# dd if=backup.img of=/dev/sd<x>

Now we can do some fun, but dangerous, stuff.

Install the SDG bootloader

WARNING: From here on, things become dangerous... Be careful!

First things first, get the bootloader from here.

Now copy the file onto an SD card. WARNING: This will wipe any and all data from the SD card.

# dd if=bootldr.rom of=/dev/sd<x>

Insert the SD card into the iPaq. Now, start the HTC bootloader as before, press and hold Contacts button and the iTask button, then push Reset at the bottom of the system.The system will detect the SDG bootloader, and automatically install it alongside the HTC bootloader. Follow the on-screen instructions (like before, no backlight), and ignore the CRC warning at the end.

Install Linux

Here comes the fun part! You now have some choice. There are 2 distributions that you can choose; Handhelds or Angstrom. Handhelds was one of the first, and was an excellent distribution for its time. It has slowly died, but the images are still available. The distribution creator can be found here. Angstom has since taken over, and is far more active, supporting numerous devices. The hx4700 files can be found here. Copy the files onto the CF card, making sure it is formatted in FAT16. Copy a kernel, root system and control file. Lock the battery, the device will not flash if it isn't locked.

Insert the CF card, and enter the SDG bootloader by pressing and holding Contacts and Inbox buttons, then resetting. The SDG logo should come up, and it will start to scan the card.

First, select the kernel to flash; scroll up and down with the Contacts and Calendar buttons, select with the iTask button

Next, flash the root folder. Do the same as before, and select the image to flash. The root flash can take a long time.

Once the flash is complete, push the power button, and the device will reboot and boot into Linux. The Penguin is alive!

What now?

So here we are, with a sweet embedded system. So, what now? That isn't the question, the real question is, what do you want to do? The hx4700 is great at being a PDA, but it can be so much more. Angstrom has an almost complete distribution. There are development applications, desktop software, all the useful gizmos you can find on any Linux terminal, and you can even play with Gimp (but it crashed on mine, does anyone have a 128MB model?). If you are careful with your applications, your iPaq can be a mini system, with contacts, email, a web browser, and even a coding station for those long-haul flights.

The hx4700 comes with Bluetooth and WiFi, and this is where things get complicated. There are known problems with the WiFi drivers, and as fas as I know, you cannot connect to WPA stations, but I can connect to WEP at home. Not really the most secure method possible... I created a script to connect to my home system, there is probably a better way of doing this, but it works. The script ifdowns any existing connection, and puts the wifi card into the correct mode, then connects to an ESSID.

#!/bin/sh
ifconfig usb0 down
ifconfig wlan0 down
rmmod hx4700-acx
rmmod acx
sleep 1
modprobe acx
modprobe hx4700-acx
sleep 1
iwconfig wlan0 mode managed
sleep 1
iwconfig wlan0 essid essidname key aabbccddee
sleep 1
iwconfig wlan0 up
sleep 1
udhcpc -i wlan0

This script brings down any connections, removes the kernel modules, reloads the kernel modules, sets up the wifi connection then runs a DHCP client on top. The WiFi system is rather fragile, and I still have a lot of work to do to get it up and running smoothly. Putting the hx4700 to sleep while connected can often result in a crash or freeze. Don't forget to create a script like the beginning of this script to bring the interfaces down when you have finished.

Changing the root file system

The hx4700 is still a lightweight system, and with all systems like this, space is at a premium. If you need more space for your files, you could always add an SD card and use it for your /home folder. If you know you want Linux, you already know how to do that.  Completely changing the root filesystem is slightly harder, but having the root filesystem ion an SD card means that you can add more programs, and have an even more versatile system.

Problems and solutions

The cursor is extremely sensitive, and can often leave the hx4700 unusable at the slightest touch. Opening a terminal will result in dozens of keypresses a seconds, filling the console and rendering the machine useless. To disable the current NavPoint mode, add this to your startup script:

find /sys/class/input -name mode -exec "echo mouse > {}" \;

This will force the trackpad into mouse mode, and will no longer send spurious inputs. Many thanks to Guenter Resch for helping me with the testing and improving my script.

Updates

10/08/2009, added details about Bluetooth, how to get a working WiFi connection, example script and added a script to stop trackpad key bouncing issues.

Work in progress

There are still lots of things to say and to do. If you have any questions, don't hesitate to contact me, and I'll see what I can do! 

Last Updated on Monday, 10 August 2009 15:48
 

Comments  

 
+1 # Which files?Mike 2009-09-26 02:54
You state:

"Copy the files onto the CF card, making sure it is formatted in FAT16. Copy a kernel, root system and control file."

For angstrom...which files do you refer to...all? I'm not sure what to pick.
Reply | Reply with quote | Quote
 
 
0 # aaron 2009-11-06 08:24
I got download fail from SD card while trying to install bootloader.
Minicom still can communicate with it on ttyUSB0.
but all else fails.
won't hard restart either.
Reply | Reply with quote | Quote
 
 
0 # niceasv 2010-01-18 08:13
This looks like a very nice howto. Cannot test it yet, perhaps in few days if I'll get my 4700! :-)

Thanks in advance anyway for the effort.
Reply | Reply with quote | Quote
 
 
0 # Салим 2010-05-11 14:47
Character problem. empty comment
Reply | Reply with quote | Quote
 
 
+1 # booting from wm6.1speedsthatbeat 2010-09-17 16:53
All,
what is the best procedure to boot linux from WM without reflashing?
I understand that we need haret for this.
thanks
Reply | Reply with quote | Quote
 

Add comment


Security code
Refresh