TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

Fedora Core 6 on Emperor Linux's Meteor Notebook (Sharp Actius PCMM20)

The notebook came with Windows XP and Fedora Core 2 preinstalled with a custom 2.4 kernel. Around the end of Nov. 2006 the hard disk started to give read errors in Linux. The Windows partition seemed fine. Using the docking station I backed up as much as I could the Windows and Linux files onto a desktop computer. The next day the disk was dead and the notebook was unbootable. This is the story of how this very nice notebook was brought back to life ...

Old Disc: 1.8" Hitachi "Travelstar" 20GB 4200rpm model:HTC424020F7AT00

New Disc: 1.8" Hitachi 40GB 4200rpm model:MK4006GAH

The new disk is a little bit thicker than the original and doesn't fit well in the case. However the case can still be screwed back and I can live with the ~2mm little gap at the front edge of the notebook.

Attached a USB cdrom drive. Attempted to reinstall Windows using Windows XP Home and XP Professional original disks, but hangs during install. Used Sharp original recovery disks which created two 15GB partitions (strange, the original disk was only 20GB). The original Windows XP installation boots fine. Deleted the second 15GB partition and copied into Windows partition backup files except system files. After reboot got back Windows system just like before the disk failure. Yeah!

Created Linux partition in remaining disk space. Installed FC6 using the software Development Workstation installation option.

Almost everything works out of the box, even suspend to RAM (but not hibernate). Exceptions are noted below.

Wireless Card

lspci finds it as:

00:06.0 Network controller: Intersil Corporation ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow] (rev 01)

Fedora 6 insists on using the prism54 module that needs a firmware file. The prism54 driver worked fine with FC2 ... but I went instead with ndiswrapper. Followed the instructions in ndiswrapper.sourceforce.net, particularly useful the page

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Fedora.

Installed ndiswrapper-1.31.tar.gz as per instructions using the FC6 kernel modules of the 2.6.18-1.2798.fc6-i586 kernel that were already installed.

Retrieved manufacturer/model number using lspci -n:

00:06.0 0280: 1260:3890 (rev 01)

the relevant numbers here are 1260:3890. Searched

http://ndiswrapper.sourceforge.net/mediawiki/index.php/List

for Windows driver. Downloaded

http://download.fujitsu-siemens.com/Download/ShowDescription.asp?SoftwareGUID=3B928095-EEEE-4194-91A7-E0CBE2D28B56

and did "ndiswrapper -l 2802W.inf" but failed because it was looking for 2802W51.sys. Made symlink 2802W51.sys pointing to 2802W.sys and it worked. Driver got installed in /etc/ndiswrapper/2802w/. Then tested driver by doing

rmmod prism54; modprobe ndiswrapper 

Proceeded to setup the wlan0 interface using the graphical Network Configuration tool. To make changes permanent I did in /etc/modprobe.conf:

options ndiswrapper if_name=eth1 
alias eth1 ndiswrapper

and put prism54 in the blacklist file /etc/modprobe.d/blacklist:

#wireless
blacklist prism54

Note that the above it's just to fool Fedora's automatic hardware setup tool. ndiswrapper continues to use the default wlan0 interface.

Many thanks to ndiswrapper developers.

TouchPad

Works but I hate the pad tapping thing, as well as the vertical and horizontal scrolling. Turned them off in /etc/X11/xorg.conf:

Section "InputDevice"
        Identifier  "Synaptics"
        Driver      "synaptics"
        Option      "Device" "/dev/input/mice"
        Option      "Protocol" "auto-dev"
        Option      "Emulate3Buttons" "yes"
        Option      "MaxTapTime" "0"
        Option      "VertScrollDelta" "0"
        Option      "HorizScrollDelta" "0"
EndSection

Bluetooth

I have a not-better-identified Trendnet TBW-101UB usb bluetooth dongle. lsusb sees it as:

Bus 002 Device 003: ID 1310:0001 Roper Class 1 Bluetooth Dongle

Edited /etc/bluetooth/hcid.conf and set into the “options” section the pin_helper application as /etc/bluetooth/pin, where pin is an executable shell script that reads:

#!/bin/sh
echo "PIN:1234"

1234 is not my real pin. I commented out "dbus_pin_helper" that caused a window to pop up every time a bluetooth device tried to link with the dongle. In the “device” section I simply changed the name of the device. The final hcid.conf file looks like:

#
# HCI daemon configuration file.
#
# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security user;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # PIN helper
        #pin_helper /usr/bin/bluepin;
        pin_helper /etc/bluetooth/pin;

        # D-Bus PIN helper
        #dbus_pin_helper;
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        #name "%h-%d";
        name "meteor";

        # Local device class
        class 0x120104;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy 
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;

        # Authentication and Encryption (Security Mode 3)
        auth enable;
        #encrypt enable;
} 

I tested the setup by restarting the bluetooth services:

/etc/rc.d/init.d/bluetooth restart

and manually initializing the bluetooth interface

#/usr/sbin/hciconfig hci0 up
#/usr/sbin/hciconfig -a
hci0:   Type: USB
        BD Address: 00:0B:0D:0B:62:8B ACL MTU: 120:20 SCO MTU: 50:0
        UP RUNNING PSCAN ISCAN AUTH 
        RX bytes:5909 acl:14 sco:0 events:240 errors:0
        TX bytes:2656 acl:14 sco:0 commands:169 errors:0
        Features: 0xff 0xff 0x05 0x38 0x18 0x18 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF PARK 
        Link mode: SLAVE ACCEPT 
        Name: 'meteor'
        Class: 0x120104
        Service Classes: Networking
        Device Class: Computer, Desktop workstation
        HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 0x8a9
        Manufacturer: Silicon Wave (11)

And then scanning for bluetooth devices (first turned on bluetooth on the Treo, see below):

#hcitool scan
Scanning ...
        00:07:E0:21:8D:61       Treo

At least with Fedora 6, it is sufficient to have bluetooth services on

/sbin/chkconfig --level 345 bluetooth on

to have the bluetooth interface to be initialized automatically when the dongle is inserted.

Treo Sync

I have a Treo 650 with PalmOS v. 5.4.8 I currently sync it with the meteor over bluetooth. Information for the older sync method using the cradle are given first.

Standard Sync

All Palm devices get confused by udev because /dev/ttyUSB1 doesn't exist unless the sync button is pressed. Simply made "cp -a" copy of /dev/ttyUSB1 in /etc/udev/devices:

mkdir /etc/udev/devices/ ; cp -a /dev/ttyUSB* /etc/udev/devices/ ; \
chmod go+rw /etc/udev/devices/ttyUSB*

while the sync button was pressed. I use jpilot with the pilot device set as /etc/udev/devices/ttyUSB1. All is well.

Bluetooth Sync

The first step is to have the Treo see laptop over bluetooth. Turn on bluetooth by clicking on the bluetooth icon or by going to the Prefs application and selecting bluetooth, then click on “ON”. Set "Discoverable=yes", then clicked on "SetupDevices->TrustedDevices->AddDevice" when "meteor" comes up click on it and click "done". It asks for the PIN, after which it adds "meteor" to the list of trusted devices. Then set up a new network service using the “meteor” connection: Prefs->Network->New, give it a name (“unix” for example), then in “Connection” select “meteor”. In “Details” set “IdleTimeout” to “Never”, no username and password.

On the laptop created a file called "dun" in "/etc/ppp/peers":

115200
192.168.1.1:192.168.1.2
local
ms-dns 4.2.2.1
noauth
debug

then executed:

dund --nodetach --listen --persist --msdun call dun

“dund” is an utility part of the bluez bluetooth module that was already installed in my Fedora 6 installation. dund starts a ppp server that will assign 192.168.1.2 as the remote IP number and 192.168.1.1 as the local IP number. 4.2.2.1 is the DNS to give internet access to the Treo through the laptop (not working yet).

Now go back to the Treo and click “connect” in the “unix” network configuration page. If all is well you'll see output scrolling by in the window where dund is running. You should be able to ping the Treo from the laptop

ping 192.168.1.2

and connect from the Treo to the laptop (192.168.1.1) using “pssh” (http://www.sealiesoftware.com/pssh/) for example.

Now to set up the HotSync over the ppp connection open the Hotsync application on the Treo. Go back to the bluetooth setup, tap Setup Devices then HotsyncSetup, in the second screen select “meteor” and tap ok, tap cancel in the screen that follows. Now go to the HotSync application. Set “Modem” Hotsync over "unix", and in the Options menu set: Modem Hotsync Preferences: Network, LANSync Preferences: Local Hotsync, Primary PC setup: 192.168.1.1, Connection Setup: edit the meteor device, set it to Local Network via Bluetooth. Very likely these options are not all necessary, but that's what I have in my working setup.

Now you have to realize that network hotsync needs to access four ports (14237 and 14238, both for the TCP and UDP protocols as far as I can tell) on the laptop. If you have the firewall on (as you should) these ports are very likely closed. Add the following rules to /etc/sysconfig/iptables:

-A RH-Firewall-1-INPUT -s 192.168.1.0/8 -m state --state NEW -m tcp -p tcp –dport 14237 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/8 -m state --state NEW -m udp -p udp –dport 14237 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/8 -m state --state NEW -m udp -p udp –dport 14238 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/8 -m state --state NEW -m tcp -p tcp –dport 14238 -j ACCEPT

then restart the iptables service:

/etc/rc.d/init.d/iptables restart

Manual editing of the iptables configuration file is necessary since the “Security Level and Firewall” setup GUI in gnome would allow you to open ports but, as far as I can tell, it won't let you open ports conditional on the source IP address. DISCLAIMER: Do this at your own peril, I'm no iptables expert.

Now test this setup by using pilot-xfer using the “net:” port (that is “net” followed by a colon)

pilot-xfer -p net: -l

and press the Hotsync button on the Treo. If you see list of databases you are ok.

Automation of this setup is very simple: make sure that the “bluetooth” and “dund” services are turned on at boot:

#/sbin/chkconfig --level 345 bluetooth on
#/sbin/chkconfig --level 345 dund on

In Jpilot I set the port to “net:”. I first hit the “Sync” button and then press the Hotsync button on the Treo.

Backing Up

I’m not going to find myself unprepared from now on. I used to back up only my files in /home thinking that one way or another the OS can be restored to its original state. Although this is true in principle, it takes more time that I’m willing to spend. Therefore I started to back up entire partitions ... meet partimage.

partimage (www.partimage.org) is a tool to create images of Linux or Windows partitions. I installed partimage-0.6.4-static on the desktop machine, got hold of a spacious hard disk, created in it a ext3 filesystem, mounted it under /u1, and created directories called /u1/meteor-hda1/ and /u1/meteor-hda2/. Then placed the Meteor in its docking cradle and flicked the DirectHD switch (if you own a meteor you know the switch I’m talking about). The USB subsystem of my desktop Linux machine sees the meteor’s hard drive as /dev/sda. The windows partition is /dev/sda1 and the Linux partition is /dev/sda2. As root do “cd /u1/meteor-hda1” and start the partimage client (/path-to-partimage/partimage). Follow instructions to create image files of /dev/sda1. I suggest to save uncompressed image files. In only few minutes (provided that you have USB 2.0) you have backed up the Windows partition. Do the same for /dev/sda2 (the Linux partition). Don’t forget to save the partition table as well:

cd /u1/meteor ; /sbin/sfdisk -d /dev/sda > hda.out

you’ll need that to restore the disk, as well as the partition image files.



Emilio Gallicchio, Dec. 2006