HARDWARE Acer Travelmate 803LCi Manual

From Gentoo Linux Wiki

Jump to: navigation, search


Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article


Split-arrows.gif It has been suggested that this article be split into multiple articles accessible from a disambiguation or index page.   (Discuss)
This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

The coresponding thread to this tutorial can be found in the Gentoo-Forums

If you want to contribute here, please also post your update in the Gentoo Acer 803LCi support thread (discussion section) so we all know you have ;-)

Have fun --feffi 10:10, 2 Aug 2004 (GMT)

Contents

[edit] Updates

  • List of recent updates
    • 24.04.2005 Created articles for Framebuffer, Qingy and linked to them pi~
    • 28.01.2005 Added UDEV Section (finally) pi~
    • 08.10.2004 Added Bluetooth
    • 07.10.2004 Added comment in section smartcard reader
    • 07.09.2004 Added Beamer & external devices
    • 24.08.2004 Added acovea conclusions to CFLAGS
    • 02.03.2006 Corrected formatting error in Xdefaults

[edit] About this Howto

This Howto is intended to provide a usefull overview and installation & configuration guide for Gentoo-Linux on a ACER Travelmate 80x/2xx/. This Howto doesn't cover the ultimate truth, it's merely a compilation of work-reports, own testing, redoing of other howtos always with focus on an optimal stability and relyability on an ACER Travelmate 803 LCi. This howto doesn't cover the basic installation process of the Gentoo Linux distribution as this is exaustively covered by the Gentoo Installation Documents. The Howto is structured upon the inside-out-concept. All sections are optimized for work progress optimization (e.g hdparm before software-installation). So if you do this tutorial from beginning to end, the result should be a optimized stable and working Gentoo-Linux on your ACER-Travelmate 803 LCi. Also this howto is based on kernel 2.6. In special I would like to thank all those geeks in the Gentoo Forums for their help, suggestions, hints, tips, tricks and corrections for this tutorial as it would not be in this form without their help. Thank you !
for $user in
(
 smiler.se, ScubaStreb, treehugger, mrblade, kwaakie, svmaris, Baron FrostFire,
 Fladnag, corey_s, tuxlover, miju, swell, fredrin, federico, |T5|, pjv, thepi,
 Roessi
)
do
   echo 'thanx to ${user}'
done

[edit] Important things to know about the ACER Travelmate 803 LCi

[edit] Specifications of the ACER Travelmate 803 LCi

CPUIntel Pentium-M 1600 MHz
Memory512 MB DDR-RAM
GraphicsATI Radeon 9000 Mobility (64 MB) with VGA-Out / S-Video-Out
Harddrive40 GB
Optical-DriveDVD/CD-RW-Combo (6x-24x/10x/24x) in MediaBay
SoundcardIntel AC'97 Sound-on-Board
PCMCIAStandard (i82365)
SmartcardreaderO2Micro Smartcardreader
NetworkBroadcom Corporation BCM4401 10/100Base-T
Wireless-LANIntel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter
Internal ModemIntel AC97 Modem-on-Board
PortsParallel Port (Standard)
FastInfraRed (F-IR)
USB4x USB2.0 / EHCI / OHCI / UHCI
FireWireTexas Instruments TSB43AB21 (iLink/IEEE1394)

[edit] General Handling

Although the Travelmate 803LCi looks relatively slim (overall height 34 mm) due to its 15.1" display, it is by no means small (area 333 x 284 mm). With 1400 x 1050 pixels, the display offers SXGA+-resolution. Perhaps the most conspicuous feature of the Travelmate (TM) 803LCi is the curved keyboard. The corresponding switches for enabling and disabling the WLAN, Bluetooth and IRDA modules are located on the front of the device. The combo drive is integrated on the right-hand side in the media bay. Anyone who does not require an optical drive while out and about can save himself around 100 grams in weight by using the supplied Weight Saver module. By way of an option, Acer offers an additional battery for this slot.
The rear side incorporates the ports for the modem, Ethernet, I/O port replicator, printer and VGA, in addition to the S-Video output. Acer has not fitted a flap to protect the ports from dust. The hard disk drive, RAM and WLAN modules are easily accessible via flaps on the underside, which greatly facilitates upgrading. To upgrade the memory, remember that there are actually two memory slots. One is easily accessible on the underside. The second one is located under the keyboard. To access this second RAM-slot the keyboard has to be temporarily removed. (to remove the keyboard first unscrew the two screws labeled "K" on the underside. Flip out the plastic cover located around the 'power switch' by lifting it in the middle above the F8 button and remove 2 additional keyboard screws below it, lift the keyboard at it's top being carefull not to crack the keyboard flatcable at it's bottom) I replaced both 256-MB modules with 1GB PC2700-200pin modules for a total of 2 GB.
From a purely statistical perspective, only one in ten people are left-handed writers. A mere two percent of all people are ambidextrous, and the majority of those left over are clearly right-handed. Despite this, Acer has integrated the USB and audio ports as well as the PC card slot on the left-hand side. Left-handed users will be delighted, although the odd one or two right-handed users might find this annoying. The PC card slot is positioned between the audio jacks and the USB ports. Beneath the slot, you will find a smartcard reader, which provides the device's security functions.

[edit] Battery Uptime

From my own experience I can give you two settings on this section: First section is Gentoo-Linux with minimal usage of disk and processor. Due to the use of 'speedfreq' and the complete powerdown of all unneccesary devices (e.g. LAN/WLAN) my longest uptime with this layout is about 6 hours of writing this tutorial.
Second section is Gentoo-Linux with full blown usage of both CPU and disc. With this layout you'll get a runtime of about 2 hours compiling XFree and GCC over and over again.

[edit] Falling down & Scratches

From my own hard experience I had to take the bitter pill of frustration when a friend of mine dropped my laptop from about 1 meter right on the floor. I think it hit on the lower right edge. As far as I know nothing bad happened to my hardware. Not even my display or harddrive. Another bad thing is letting a full blown desktop computer drop on your lid-open laptop. It hit my laptop right above the 'P1' key at the angle of the lid. I now have a little (1mm) scratch there, but despite that AGAIN nothing happened.

[edit] Output of 'lspci'

CPU: Intel Pentium-M 1600 MHz
Memory: 512 MB DDR-RAM
Graphics: ATI Radeon 9000 Mobility (64 MB) with VGA-Out / S-Video-Out
Harddrive: 40 GB
Optical-Drive: DVD/CD-RW-Combo (6x-24x/10x/24x) in MediaBay
Soundcard: Intel AC'97 Sound-on-Board
PCMCIA: Standard (i82365)
O2Micro Smartcardreader
Network: Broadcom Corporation BCM4401 10/100Base-T
Wireless-LAN: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter
Internal Modem: Intel AC97 Modem-on-Board
Ports: Parallel Port (Standard)
FastInfraRed (F-IR)
USB (4x USB2.0 / EHCI / OHCI / UHCI)
FireWire Texas Instruments TSB43AB21 (iLink/IEEE1394)

[edit] Output of 'lshw'

Click here (externalised in sub-article to reduce size)

There is also a really exhaustive hardware report in a seperate html file I made. Maybe this is helpfull to someone? Maybe more tricks? Be aware that this file's size is 280kb, so be patient: Extensive Hardware report

[edit] Compiler Flags

[edit] Design of the Pentium-M

As this section is the most essential for all packages that will be installed afterwards, it will be the first I would like to introduce. The internal layout of the Acer 803 is based upon the Centrino technology introduced by Intel. The Centrino package consist of two parts: The new Pentium-M processor and the Intel Wireless Network Adapter. Despite all rumors about the Pentium-M, often mistaken as an Pentium 4 Mobile (or Pentium 4-M) this processor is a new designed Pentium III. I know that several geeks are now starting to cry, but if you look at the stepping information of this processor it is from the Pentium III family, not the Pentium 4. Although the Pentium-M is not an Pentium 4, it has several improvements above the Pentium III. The compilerflags for GCC below are not the optimal as the GCC team has currently no working optimization setting especialy for the Pentium-M. Those flags only represent a hybrid set of optimizations. Also there are settings for the Pentium-M based upon the Pentium 4 layout that I maybe point out later.
As of gcc 3.4 there is a "-march=pentium-m" flag, I used this one for my first laptop(800Lci) gentoo install, but it didn't bootstrap properly, as gcc-3.4 isn't available yet, so I re-bootstrapped with -march=pentium3, and changed back to pentium-m afterwards. You have to use the specific portage profile for gcc-3.4 & kernel 2.6, I additionally enabled NPTL.

[edit] CFLAGS

The CFLAGS option is set in the '/etc/make.conf' file where all your global optimzations and variables reside. My currently working set of CFLAGS are as below:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -pipe -O2 -fomit-frame-pointer -fforce-addr -frename-registers
        -fprefetch-loop-arrays -falign-functions=64"
CXXFLAGS="${CFLAGS}"
Be aware that the 'march=??' breaks compatability to other systems but enables a little more performance. For all other options despite the '-falign-functions=64' please look up the GCC Reference for further details. The '-falign-functions' option in detail aligns all system calls an funtions in orders of 64 byte, wich is exactly the size of the Pentium-M instruction pipe.

[edit] Acovea

To find out the most optimized CCFLAGS, you can use Avocea, a gcc benchmarking tool. See Avocea Tip.

[edit] USE-Variables

The USE variables tell all packages you install on your system which extra components or interfaces to include. A usefull set of USE flags CAN be the following.
USE="acpi alsa avi cups curl dga doc dvd encode ethereal fbcon freetds gb gd
gif gphoto2 gpm gtk2 imap innodb jpeg junit kerberos lcms lirc maildir mmx mozilla
mpeg mpi mysql oggvorbis opengl pam pcmcia plotutils png pnp ppds quicktime samba sasl
scanner sdl slp snmp socks5 sse ssl tcltk tiff trusted usb vmf wmf X x86 xinerama xml
zlib -apm -arm -arts -alpha -berkdb -hppa -java -kde -mips -slang -sparc"

Keep in mind that the flags above should be in ONE line. Also these flags heavily depend on the purpose your system is intended for. This is not the ultimate truth but a hint to start from.

Note: The useflags above are for Gnome, you should adapt them if you want to use KDE

[edit] Important Must-Have-Software

Before we go on I would recommend to install to most essential software. These tools are used in the sections ahead. If you don't want to install all the tools one-shot, each section has a requirement pointed out at the beginning. For all those who want to go through the complete tutorial, fire up a console as root and start the emerge below:
bash$ emerge sys-power/acpid sys-power/cpufreqd sys-apps/hdparm net-misc/dhcpcd net-wireless/wireless-tools
      media-sound/setmixer media-gfx/bootsplash sys-apps/hotplug app-admin/usbview

[edit] GEP (Gentoo Emerge.log Parser)

GEP - Gentoo Emerge.log Parser is little tool implementing a parser for the Gentoo emerge.log file and a webpage displaying analysis and statistics data about compile times on different hardware plattforms. The true intention ahead of this project is to include the statistical data processed and stored in a database by this tool into emerge. The goal is to enhance emerge to display the needed compilation times for your specific system. You will be able to forecast the times different packages need to compile and install. I already know there are tools to process the emerge.log but none of them are able to store the processed data in a central database.
In the next weeks I will put up this project I did for my studies, so you can test it.

[edit] Compile times for different applications

This is a rough estimation from the installation I've done: emerging Gnome lasts about 6 hours.
KDE stuff: about the same.

(none yet)

[edit] ACPI

  • Reference
  • Requirements
    • sys-apps/acpid
    • sys-apps/speedfreq
    • for Kernel 2.6.5
      • software-suspend-core-2.0-whole.bz2
      • software-suspend-linux-2.6.5-test16-whole.bz2
      • software-suspend-core-2.0.0.66-incremental.bz2
    • for Kernel 2.6.8-r1
      • 20-software-suspend-linux-2.6.8.1-rev1-whole
      • 30-software-suspend-core-2.0.0.104-whole

[edit] General ACPI

The integration of ACPI is fully supported and working. The ACPI support can be enabled in kernel 2.6 by activating the following config:
Linux Kernel Configuration: General ACPI
Power management options (ACPI, APM)  --->
   [*] Power Management support
   [*]   Software Suspend (EXPERIMENTAL)
   [*]   Suspend-to-Disk Support
   (/dev/hda1) Default resume partition
   ACPI (Advanced Configuration and Power Interface) Support  --->
      [*] ACPI Support
      [*]   Sleep States (EXPERIMENTAL)
      <*>   AC Adapter
      <*>   Battery
      <*>   Button
      <*>   Fan
      <*>   Processor
      <*>     Thermal Zone
   CPU Frequency scaling  --->
      [*] CPU Frequency scaling
         Default CPUFreq governor (performance)  --->
         <*>   'userspace' governor for userspace frequency scaling
         [*]     /proc/sys/cpu/ interface (2.4. / OLD)
         <*>   CPU frequency table helpers
         <*> Intel Enhanced SpeedStep
This will enable all needed modules for the forthcoming sections in this tutorial. As the configuration of the ACPI implementation also mostly applies to other systems, this can be used by many different layouts of laptops. On kernel 2.6 you'll get the new '/sys' interface which can be used with the sys-apps/speedfreq package. If you're having trouble accessing the 'sys-interface', simply do the following:
bash$ cd /
bash$ mkdir sys
to get it working correctly. Sometimes just the directory is not created or missing.

[edit] ACPI DSDT Table fixing

Like most of the notebook vendors nowadays, Acer provides us with a buggy DSDT Table. A lot has been said about this already, and this is not the place for rants. Anyway, you don't have to live with that. Just get the fixed DSDT table for the current BIOS (4a20, make sure you update your BIOS first!) and follow the instructions in the ACPI DSDT Howto. Of course, you can skip the steps where it says to get the DSDT table from memory and fix it, because that has been done for you already.

[edit] ACPI Event Handling

The acpid daemon by default has it's scripts and settings stored in '/etc/acpi/'. The default events like pressing the power-button and closing the lid are defined in '/etc/acpi/events/default'
File: /etc/acpi/events/default
event=button power.*
action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/default.sh %e
Now let's install 'acpid' to your system, if you did not do this already in section 3 and add the daemon to your boot runlevel to have it available at boot time:
bash$ emerge sys-apps/acpid
bash$ rc-update add acpid boot
bash$ /etc/init.d/acpid start
Now you're ready to go: If you close your laptop-lid the blacklight of you LCD will go off and at anytime you hit your power-button the system will go to runlevel 0 and power-off your laptop.

[edit] Enhanced Speedstepping

With activating all settings for 'CPU Frequency Scaling' in kernel 2.6, you have prepared nearly everything you need. If you already loaded your new kernel this will get you a '/proc/acpi/processor/CPU0/performance' interface which can be used for accessing the Speedstepping features. You can look up your current frequency with
bash$ cat /proc/acpi/processor/CPU0/performance
   state count:             5
   active state:            P1
   states:
      P0:                  1600 MHz, 24000 mW, 10 uS
     *P1:                  1400 MHz, 20000 mW, 10 uS
      P2:                  1200 MHz, 18000 mW, 10 uS
      P3:                   800 MHz, 16000 mW, 10 uS
      P4:                   600 MHz, 12000 mW, 10 uS
And if you want to change this setting, just do a
bash$ echo "x" > /proc/acpi/processor/CPU0/performance
where "x" is your desired frequency. The only thing missing is the userspace tool 'speedfreq'. This tool runs as a daemon and is able to adjust the CPU frequency accordingly to your needs. If the CPU is not used it scales down to 600 MHz, if in full use it scales up to 1600 MHz. All you have to do now is to emerge and install it into your runlevel:
bash$ emerge speedfreq
bash$ rc-update add speedfreq boot
The config for speedfreq can be found in /etc/conf.d/speedfreq. Here you can set the default behaviour of speedfreq and also control if users are able to monitor speedfreq. I would suggest to set the speed setting to 'dynamic' as this allows the feature described above.
File: /etc/conf.d/speedfreq
#       powersave       maximise power savings
#       performance     maximise performance
#       dynamic         adjust speed according to CPU load (default)
#       NNN             set CPU to a fixed speed of NNN MHz
#       auto            let the init script detect current battery status
SPEEDFREQ_SPEED="dynamic"
# If you want normal users to be able to control the speed
# Default is to only allow root
SPEEDFREQ_USERS="yes"

I found that SPEEDFREQ_USERS="yes" won't work in a newer version

# emerge -s speedfreq
Searching...
[ Results for search key : speedfreq ]
[ Applications found : 1 ]

*  sys-apps/speedfreq
      Latest version available: 0.7.2-r1
      Latest version installed: 0.7.2-r1
      Size of downloaded files: 30 kB
      Homepage:    http://www.goop.org/~jeremy/speedfreq/
      Description: daemon to control the CPU speed in 2.6 kernels
      License:     GPL-1

Instead you want to use SPEEDFREQ_OPTS like this:

File: /etc/conf.d/speedfreq
#       powersave       maximise power savings
#       performance     maximise performance
#       dynamic         adjust speed according to CPU load (default)
#       NNN             set CPU to a fixed speed of NNN MHz
#       auto            let the init script detect current battery status
SPEEDFREQ_SPEED="dynamic"
# For more options refer to `speedfreqd -h`
SPEEDFREQ_OPTS="-u"
bash$ /etc/init.d/speedfreq start
After that the speedfreqd daemon will come alive and set your frequency based on your policy. If you have set this setting to 'dynamic' you can monitor this process by typing
bash$ speedfreq -m
in an active console. If you start an compilejob now, you'll have a nice raise or drop in your scaling.

[edit] Support for Software Suspend

Just follow the steps of the Software Suspend v2 HOWTO and you should be set to go.

[edit] Suspend-to-RAM / Standby / ACPI S3

(Patches and howto by Doesi. Thanks a bunch!)

 Section "Device"
  BoardName    "RV250 Lf"
  BusID        "1:0:0"
  Driver       "radeon"
  Option     "RenderAccel" "true"
  Option "DynamicCLocks" "true"
  Identifier   "Card0"
  VendorName   "ATI"
 EndSection
  • Before suspend unload ehci-hcd and uhci-hcd:
rmmod ehci-hcd
rmmod uhci-hcd
  • To suspend:
echo 3 > /proc/acpi/sleep

[edit] Hardware Sensors

The hardware sensors (like lm-sensors) are not working yet. This is owing to the fact that the PC87591E Sensor Chip which is used here doesn't have a driver. A driver for the PC87330 is in the works though, maybe it's similar enough to work. Until then, you should use the /proc/acpi/thermal_zone/* interface to monitor your system's health.

Despite the non-working sensor chip, it's possible to get some modules of the I2C section to work. It'll give access only to the RAM's EEPROM chips though. To enable these modules follow the kernel options below:

Linux Kernel Configuration: Hardware Sensors
Device Drivers  --->
    I2C support  --->
       <M> I2C support
       <M>   I2C device interface
       I2C Algorithms  --->
          --- I2C bit-banging interfaces
          <M> I2C PCF 8584 interfaces
       I2C Hardware Bus support  --->
          <M> Intel 801
          <M> ISA Bus support
       Miscellaneous I2C Chip support  --->
<M> EEPROM reader
After recompiling the kernel you will be provided with the kernel modules you have to load. This can be done by setting the modules up in /etc/modules.autoload.d/kernel-2.6:
File: /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $
#
# Note that this file is for 2.6 kernels.
#
i2c_core
i2c_sensor
i2c_dev
i2c-algo-bit
i2c-algo-pcf
i2c-isa
i2c-i801
eeprom
The information provided by these modules can be found in '/sys/bus/i2c/'.

[edit] UDEV

UDEV is the new dynamic device manager system which is to replace the now obsolete devfs on 2.6 Kernels. To find out how to change your system to UDEV, first hop over to the Gentoo-Wiki HowTo or decibel's UDEV Primer, and follow those directions. After you've done that, change your udev rules accordingly. I made an example:

File: /etc/udev/rules.d/10-local.rules
###########################################################
#
# user defined rules
#
###########################################################
# thepi's UDEV conf file

# Synaptics Touchpad
# Note that your {dev} entry may vary within address space 13:??
# You also have to change the entry in your xorg.conf
SYSFS{dev}="13:33", KERNEL="mouse?", NAME="input/%k", SYMLINK="input/touchpad"
#SYSFS{dev}="13:66", KERNEL="event?", NAME="input/%k", SYMLINK="input/tpevents" # not really needed

# I own two mice: A Logitech MX700 for work at home, one Genius Traveller for mobile use
BUS="usb", SYSFS{manufacturer}="Logitech", SYSFS{idProduct}="c50b", KERNEL="mouse?", NAME="input/%k", SYMLINK="input/mx700"
BUS="usb", SYSFS{manufacturer}="Genius", SYSFS{idProduct}="0036", KERNEL="mouse?", NAME="input/%k", SYMLINK="input/genius"

# dvd fix - try out whether you need it
KERNEL="hdc", SYMLINK="dvd"

# ext. storage
# Dummy entry for my still-to-buy external hdd :)
#BUS="usb", SYSFS{manufacturer}="", KERNEL="sd?", NAME="usb/%k", SYMLINK="extdrive"

# cdemu patch
KERNEL="cdemu[0-9]*",	NAME="cdemu/%n"

# rename ipw2100 interface name
# it didn't like the ifname=ath0 option using the gentoo net.lo script, so I
# forced it to do so using udev :)  works flawlessly so far
# Note that you have to change the {address} field to your WLAN card's MAC
KERNEL="?th*", SYSFS{address}="00:00:00:00:00:00", NAME="ath0"

# An alternative is to use aliases in the module's config file /etc/modules.d/ipw2100
# The problem is that I'd still have to find a way to tell net.lo to actually use this
# Anyway, the lines to add to the file:
# alias ath0 ipw2100
# options ipw2100 ifname=ath0

The only really important entry for a standard AcerTM installation is the touchpad's. I had cases when my ext. mouse was plugged in and was labelled mouse0 instead of the touchpad, so I wanted a fixed entry for it. If you use /dev/psaux for the Synaptics you propably won't need it. I find it better this way though :)

I don't know whether it's still needed, but there's a patch for the Frambuffer: fb_sysfs_udev.patch I didn't apply it, yet it works.

[edit] Harddrive & 'hdparm' Optimization

The first thing we are doing is to set some harddriver parameters with hdparm. This will definetly optimize speed and throughoutput of your harddrive and will speed up disc usage a lot. But first let's check the possible settings and verify the HD correctness:
bash$ hdparm -I /dev/hda
/dev/hda:
ATA device, with non-removable media
      Model Number:       IC25N040ATCS04-0
      Serial Number:      CSH406DDHN872B
      Firmware Revision:  CA4OA71A
Standards:
      Used: ATA/ATAPI-5 T13 1321D revision 3
      Supported: 5 4 3 2 & some of 6
Configuration:
      Logical         max     current
      cylinders       16383   16383
      heads           16      16
      sectors/track   63      63
      --
      CHS current addressable sectors:   16514064
      LBA    user addressable sectors:   78140160
      device size with M = 1024*1024:       38154 MBytes
      device size with M = 1000*1000:       40007 MBytes (40 GB)
Capabilities:
      LBA, IORDY(can be disabled)
      bytes avail on r/w long: 4      Queue depth: 1
      Standby timer values: spec'd by Vendor, no device specific minimum
      R/W multiple sector transfer: Max = 16  Current = 16
      Advanced power management level: 128 (0x80)
      DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
         Cycle time: min=120ns recommended=120ns
      PIO: pio0 pio1 pio2 pio3 pio4
         Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
      Enabled Supported:
      *    NOP cmd
      *    READ BUFFER cmd
      *    WRITE BUFFER cmd
      *    Host Protected Area feature set
      *    Look-ahead
      *    Write cache
      *    Power Management feature set
            Security Mode feature set
      *    SMART feature set
      *    Device Configuration Overlay feature set
      *    SET MAX security extension
            Address Offset Reserved Area Boot
            Power-Up In Standby feature set
      *    Advanced Power Management feature set
      *    SMART self-test
      *    SMART error logging
Security:
      Master password revision code = 65534
            supported
      not     enabled
      not     locked
      not     frozen
      not     expired: security count
      not     supported: enhanced erase
      44min for SECURITY ERASE UNIT.
HW reset results:
      CBLID- above Vih
      Device num = 0 determined by the jumper
Checksum: correct
See the 'Checksum: correct' ? This should alway be the condition of a healthy harddrive. If this isn't in your case please contact your manufacturer as some hardware related problems could be occured and your Hd is in severe danger. But let's go on with some primary settings I use on my ACER 803 since it first contacted Gentoo:
bash$ hdparm -d1 -A1 -m16 -u1 -a64 -c3 /dev/hda
      -d1 : enable overall DMA access
      -A1 : enable drive read-lookahead
      -m16 : set multiple sector count to 16
      -u1 : enable unmaskirq
      -a64 : enable fs readahead
      -c3 : enable IDE 32-bit IO access with sync
Please take a little time to test these settings and test their correctness for your system. After that you can also edit your /etc/conf.d/hdparm file accordingly to set these settings at boot time:
bash$ rc-update add hdparm boot
bash$ vi /etc/conf.d/hdparm
      all_args="-d1 -A1 -m16 -u1 -a64 -c3"
      #EOF
And finally for all those who want to try a more extreme setting with hdparm, take those below, BUT BE WARNED:
bash$ hdparm -X udma5 -A1 -a1 -m16 -u1 -d1 -c3 /dev/hda
ATTENTION: PLEASE BE AWARE THAT MESSING AROUND WITH YOUR HARDDRIVE SETTINGS (hdparm) CAN SERIOUSLY DAMAGE YOUR HARDDRIVE OR RESULT IN LOSS OF DATA. BE CAREFULL ! I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR SYSTEM, YOU TRY THIS AT YOUR OWN RISK !

[edit] Networking LAN

[edit] Broadcom 4400

The Acer 803 LCi runs network through a Broadcom Corporation BCM4401 10/100Base-T ethernet adapter which runs fine with the modules provided by both kernels:
Linux Kernel Configuration: Broadcom 4400
Device Drivers  --->
   Networking support  --->
      Ethernet (10 or 100Mbit)  --->
         [*] Ethernet (10 or 100Mbit)
         [*] EISA, VLB, PCI and on board controllers
<M> Broadcom 4400 ethernet support (EXPERIMENTAL)
This will give you a module named 'b44' in kernel 2.6 which also can be loaded at boot time through '/etc/modules.autoload.d/kernel-2.6':

bash$ vi /etc/modules.autoload.d/kernel-2.6

File: /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16
# 18:13:45 azarah Exp $
#
# Note that this file is for 2.6 kernels.
#
b44
Beneath that you also need to install the package 'dhcpcd' to get IP's from your DHCP-server (if you have one)

bash$ emerge net-misc/dhcpcd

add the startup script for the network device 'eth0' to the boot runlevel

bash$ rc-update add net.eth0 boot

and on next boot you'll be given an IP automagically, if your device can find a DHCP server.

[edit] Networking Tools

Welcome to the fine art of networking tools. This section will introduce you to the secret (and not-so-secret) tools of everyday use in a networked enviroment. All tools pinned out here are usefull supplements for your work. Although some of them could be misused, so be warned to do nothing that could harm other against their will or without their knowledge. I'm not responsible for any trouble you might be exposed to, so don't complain.

[edit] SSH-Agent and Keychain

This section mainly covers passphraseless logins on remote-servers, by using openssh and a tool named keychain. First be sure you have openssh installed and configured correctly. If you don't have (what I don't expect), you need to install it first:
bash$ emerge net-misc/openssh
After your successfull installation and configuration of ssh and sshd we'll move on to install net-misc/keychain. Keychain in general will spawn a ssh-agent session which remembers your passphrases and ssh-keys for later use in a current session. This is extremely usefull as you only enter your passphrase once you login and have these keys available throughout your whole system without entering the passphrase again. Let's emerge:
bash$ emerge net-misc/keychain
Keychain doesn't need any configuration as all parameters are given at runtime. Let's move on
bash$ emerge net-misc/gtk2-ssh-askpass
or
bash$ emerge net-misc/x11-ssh-askpass
Depending on your favourites emerge one of those askpass-tools (I prefer the GTK2 - looks geekier). Now let's move on to include your keys:
File: /etc/X11/Sessions/fluxbox
#!/bin/sh
...
export SSH_ASKPASS="/usr/bin/gtk2-ssh-askpass"
/usr/bin/keychain --dir ~/.ssh ~/.ssh/ssh2_key1 ~/.ssh/ssh2_key2 ...
source ~/.ssh/your-computers-name-sh > /dev/null
...
exec /usr/bin/fluxbox
As you can see above there are three lines of code you need to include. The first tells SSH what favour to use if it asks for a passphrase. The second one is the actual keychaining where you include your key(s). You can include more than one key (e.g. for different servers). Keychain creates some sort of PID-file for the spawned ssh-agent therefore I also specified the directory to put this file. I prefer to have the file in ~/.ssh/ but you can leave this option. Keychain then will put this PID-file in ~/.keychain/. The third line sources your PID-file to the current bash-session and makes the ssh-agent available. If you restart your xfree now, gtk2-ssh-askpass should ask you for your passphrase.
Last but not least we also need to edit our ~./.bashrc file for keychain to work correctly:
File: ~/.bashrc
# /etc/skel/.bashrc:
...
case $TERM in
  xterm*|rxvt|Eterm|eterm)
     export SSH_ASKPASS="/usr/bin/gtk2-ssh-askpass"
     /usr/bin/keychain --dir ~/.ssh ~/.ssh/ssh2_key1 ~/.ssh/ssh2_key2 ...
     source ~/.ssh/your-computers-name-sh > /dev/null
     PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
     ;;
  screen)
     PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
     ;;
esac
...
As you can see here, the same three lines are included. The purpose, why these lines are included inside the "case" is because I use xterm and I don't want to spawn keychain (and especially gtk2-ssh-askpass) on a normal text-console (without xfree running). Else this will produce a deadlock, where keychain is waiting for a passphrase and gtk2-ssh-askpass cannot ask you, because there is no display from xfree. This can be optimized by exporting different SSH_ASKPASS variables on different logins, but I need more research in this. If someone has a good hint, post it!! If you now open up a console in xfree, keychain will come to live, search for your key(s), a running ssh-agent and load them all. But what the heck?? We forgot to put our keys on the server?? surely we'll do!! All we need is to put our public keypart on the server to authenticate there with our private key:
cat ~/.ssh/your_key.pub | ssh username@machine.org "cat >> .ssh/authorized_keys"
Voila! If you now fire up another console and ssh to your remote-machine, no passphrase will be asked. Have fun!!

[edit] tcpdump

[edit] mtr

The little mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool. It features a console as well as a GTK based interface. To emerge it just do
bash$ emerge net-analyzer/mtr
After installing this little tool, you can start it with
bash$ mtr www.google.com
This tool is very usefull, as well as in Xfree as on text-based console to measure your network quality and output.

[edit] iptraf

IPTraf is an IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It is very usefull to monitor different networking devices or whole networks.

bash$ emerge net-analyzer/iptraf

After installation it can be started with

bash$ iptraf

Have fun with it.

[edit] tethereal

[edit] nessus

[edit] Backup and distribution solutions

[edit] Networking WLAN

[edit] ipw2100

The ipw2100 are the native intel drivers for the Intel Pro Wireless 2100 card. Fortunately for us, ipw2100 is in portage which makes it pretty easy. First of all you need to enable the Cryptographic API in your kernel, as the ipw2100 driver needs it for WEP support. It can be found here:
Linux Kernel Configuration: ipw2100
Cryptographic options  --->
   [*] Cryptographic API
      <*>   ARC4 cipher algorithm
      <*>   CRC32c CRC algorithm
Now do an
 $bash # emerge -va ipw2100
It should tell you that it will emerge hostap and ipw2100. Confirm the question with a yes which will automatically download and compile hostap (for the WEB stuff), as well as the most recent and stable ipw2100 firmware and driver. After the emerge you should be able to load the driver
 $bash # modprobe ipw2100
If everything works, you can add it to /etc/modules.autoload.d/kernel-<kernel version>. Replace <kernel version> with your kernel base version e.g. 2.6
 $bash # echo ipw2100 >>/etc/modules.autoload.d/kernel-2.6
You now have a eth1 interface with a wireless extension. Bring it up with
 $bash # ifconfig eth1 up
And connect to your accesspoint.
 $bash # iwconfig eth1 essid youressid
 $bash # iwconfig eth1 key s:key
You will see if it has connected to your accesspoint by looking at iwconfig. It should show your essid, the key and the hardware adress of your accesspoint. Now you can get your ip adress with dhcp and start browsing (well, you might have to set a proxy if there is one in your network).
 $bash # dhcpcd eth1 &
If you have several locations with accesspoints and you don't want to do all of this manually i suggest you have a look at Wireless configuration and startup - The Gentoo way which will automatically connect to preferred accesspoints at startup including WEP and dhcp.
Note: The ifname doesn't work anymore according to the README.ipw2100.gz this module option doesn't exist anymore. Also it gives an error that this is an unknown option.
When you don't like the device name eth0 (or eth1) you should create the file /etc/modules.d/ipw2100 with this content
options ipw2100 ifname=wlan%d
After that you have to do
$bash # modules-update

/NOTE

Reboot the machine (or reload the driver) to get the device wlan0 (or wlan1) - this also works for the ipw2200 driver! But don't forget to symlink /etc/init.d/net.wlan0 to /etc/init.d/net.lo (see gentoo-handbook) and adapt your configs.
You may have to do a modprobe ieee80211_crypt_wep to make the wep encryption work in the ipw2100 driver.

[edit] ndiswrapper

Note: Using ndiswrapper is no longer needed, let alone recommended, as the Intel native drivers work without shortcomings.

The first tool that was known to emulate the NDIS structure of the win-drivers for the Intel 2100 Pro was the tool 'ndiswrapper'. As it is free and open-source it found acceptance than the commercial tools around. To get ndiswrapper working first you have to enable some options in your kernel config:
Linux Kernel Configuration: Wireless LAN
Device Drivers  --->
   Networking support  --->
      Wireless LAN (non-hamradio)  --->
         [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
This will provide you with the interface in '/proc/net/wireless' which is used by the wireless-tools package and some other tools. After recompiling your kernel you'll have to install the ndiswrapper. The source is currently not in portage but you can download it. Untar it in some temporary directory (e.g. /tmp/ndiswrapper/). Follow the installation instructions to compile the driver and the utils. If you ever recompile your kernel, be sure to recompile 'ndiswrapper' as well! It won't work otherways because of linking problems. If you have done that, copy the file './driver/ndiswrapper.o' and './driver/ndiswrapper.ko' into the directory '/lib/modules/2.6.0/kernel/drivers/net/' and you'll have a new module for modprobe. Now do:
bash$ cd /tmp/ndiswrapper
bash$ cp driver/ndiswrapper.o /lib/modules/2.6.0/kernel/drivers/net/
bash$ cp driver/ndiswrapper.ko /lib/modules/2.6.0/kernel/drivers/net/
bash$ modules-update
bash$ mkdir /usr/local/bin/wlan
bash$ cp utils/loadndisdriver /usr/local/bin/wlan/
bash$ ln -s /usr/local/bin/wlan/loadndisdriver /usr/local/bin/loaddriver
to set up the binary part of the ndiswrapper tool. All we need now is to copy the w70n51.inf and w70n51.sys files from the Intel Wireless Network Drivers for WindowsXP to your freshly installed directory:
bash$ cp w70n51.inf /usr/local/bin/wlan
bash$ cp w70n51.sys /usr/local/bin/wlan
But how we are going to use it? Nothing easier that that: All you have to do, is to copy the little script provided below to '/etc/init.d/net.wlan'
File: /etc/init.d/net.wlan
#!/sbin/runscript
start() {
       ebegin "Bringing WLAN (NDISwrapper) up"
       modprobe ndiswrapper 2> /dev/null
       /usr/local/bin/loaddriver 8086 1043 /usr/local/bin/wlan/w70n51.sys /usr/local/bin/wlan/w70n51.inf
       /sbin/dhcpcd eth1 &
       #/sbin/ifconfig eth1 192.168.0.2 up 2>/dev/null
       #/sbin/route add -net 192.168.0.0 netmask 255.0.0.0 gw 192.168.0.1 dev lo 2> /dev/null
       eend 0
}
stop() {
      ebegin "Bringing WLAN (NDISwrapper) down"
      /sbin/ifconfig eth1 down &>/dev/null
      rmmod ndiswrapper 2> /dev/null
      eend 0
}
Done that you have to add it to runlevel boot:
bash$ rc-update add net.wlan boot
bash$ /etc/init.d/net.wlan start
      * Bringing WLAN (NDISwrapper) up...
      Calling putdriver ioctl
      Parsing the inf file.
      Driver version: 07/31/2003,1.2.0.58
      Calling startdriver ioctl
bash$ iwconfig
      lo      no wireless extensions.
      eth0   no wireless extensions.
      eth1   IEEE 802.11b  ESSID:"WWLAN"
             Mode:Managed  Frequency:2.437GHz  Access Point: 00:60:B3:99:AD:30
             Bit Rate=11Mb/s
             RTS thr=1600 B   Fragment thr=2344 B
             Encryption key:off
             Power Management:off
             Link Quality:0  Signal level:180  Noise level:0
             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
             Tx excessive retries:0  Invalid misc:0   Missed beacon:0
If your output looks somewhat like this you'll have a working eth1 interface which can be used with the wireless-tools mentioned above. Of course the most networking tools should work with that interface.

[edit] Exchanging the Intel Mini-PCI with a Dell Truemobile 1150

As mentioned below in this thread it is possible to replace the Intel Mini-PCI WLAN Card with a Dell Truemobile 1150 (costs about $49). So here is a small conclusion: The new Card needs Kernel 2.6 to run properly as the drivers in 2.4 aren't working correctly. The replacement of the card itself is a little bit missleading, as the antenna-cables look soldered right onto the board. However they are not. They do look like they are soldered, however they are not. They push down onto their ports so all you have to do is pull straight up and they will come off. The Truemobile has two antenna wire inputs and the connectors fit onto them perfectly. To disconnect the wires, just pull straight up. To reconnect them, push straight down.
Closeup of the antenna connectors
The installed card
In Kernel 2.6 config you'll need to enable
Linux Kernel Configuration: Dell Truemobile 1150
Bus Options -->
   [*] PCMCIA Cardbus Support
   [*]Cardbus yenta-compatible bridge support
   [*]I82365 bridge support
and
Linux Kernel Configuration: Dell Truemobile 1150
Networking Support -->
   Wireless Lan (Non-Ham Radio) -->
      [*] Wireless LAN (Non-Hamradio)
      [*] Hermes Chipset 802.11b...
      [*] Hermes PCMCIA Card Support
After that it should work right away. I can't proof this, because i don't have that piece of hardware, but it's reported to work.
ATTENTION: PLEASE BE AWARE THAT MESSING AROUND WITH YOUR HARDWARE CAN SERIOUSLY DAMAGE YOUR COMPUTER OR RESULT IN LOSS OF DATA. BE CAREFULL ! I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR SYSTEM, YOU TRY THIS AT YOUR OWN RISK !

[edit] Wireless Tools

[edit] Kismet

Note: As of Tue Jul 13 2004, Kismet has moved to subversion. This means that the following CVS-based ebuild file may not work any longer
Kismet is (as you probably all know) a wireless sniffing tool at the best. In fact its the standart of scanning or wardriving. At the moment, kismet standard is not able to handle the ipw2100 drivers, so we need to install the cvs version. Maybe this becomes obsolete the next time. First create a new directory for the kismet-cvs version:
bash$ cd /usr/portage/net-wireless
bash$ mkdir kismet-cvs
bash$ cd kismet-cvs
Now download the ebuild provided by the kismet developers either directly from their site kismetwireless.net or via wget:
bash$ wget http://dev.gentoo.org/~latexer/files/kismet-cvs-3.1.0.ebuild
Now we need to create the manifesto for this ebuild and then we're able to emerge kismet-cvs
bash$ ebuild kismet-cvs-3.1.0.ebuild digest
bash$ emerge kismet-cvs
After successfull installation, we now move on to configure kismet to use the correct sources for capturing:
File: /etc/conf.d/kismet
logtemplate=/home/defaultuser/kismet_log/%n-%d-%i.%l
WIFI_DEV="eth1"
KISMET_MONITOR_OPTS=""
KISMET_SERVER_OPTS=""
Keep an eye on the defaultuser entry in this and the next config. This should be the name of your normal user as kismet drops priviledges to it. Now kismet is set to use the correct network device, but we also need to tell kismet where to find the capture sources:
File: /etc/kismet.conf
servername=Kismet
suiduser=defaultuser
source=ipw2100,eth1,ipw2100,10
channelhop=true
These are only the main settings, so feel free to set your own settings depending on devices (e.g. GPS) you own or preferences you might have for scanning. After configuring, init the the kismet server via the init script in /etc/init.d/kismet:
bash$ /etc/init.d/kismet start
Some last words on using kismet: To use it you have to change to the home directory of the user you entered in the config files and then start kismet:
bash$ cd /home/user
bash$ kismet
Happy scanning...

[edit] Wellenreiter

[edit] Airsnort

[edit] IPSEC & VPN

[edit] Bluetooth

  • Reference

HOWTO mobile phone, Bluetooth and GNOME#Configure kernel for Bluetooth support

  • Requirements
    • bluez-utils
    • bluez-sdp
[edit] Configure kernel for Bluetooth support
Linux Kernel Configuration: Bluetooth support
Device Driver --->
   Networking support --->
      Bluetooth subsystem support -->
         <M>      L2CAP protocl support
         <M>      SCO links support
         <M>   RFCOMM protocol support
           [*]     RFCOMM TTY support
         <M>   BNEP protocol support
           [*]     Multicast filter support
           [*]     Protocol filter support
      Bluetooth device drivers --->
<M> HCI USB driver
[edit] Configure the bluetooth-service
Then you have to emerge the bluez-utils and the bluez-sdp, they are in the portage so just
bash# emerge bluez-utils bluez-sdp -av

if everything is ok, say yes and go on.

Now you have to set up your config the file is /etc/bluetooth/hcid.conf

be aware .. there is a file that the deamon call --> /usr/bin/bluepin that doesn't work for me.

So I change the PIN helper in the /etc/bluetooth/hcid.conf
#PIN helper
#pin_helper /usr/bin/bluepin;
pin_helper /usr/bin/my_bluepin; #this is my new file
This file have only to say to the other device what is the PIN, so I write a simple bash script that is
File: /usr/bin/my_bluepin
#!/bin/bash
echo "PIN=xxxx" #insert the pin inside it
to tell the pin to my phone and I had replaced the original.
It has to be executable so
chmod 775 /usr/bin/my_bluepin
At this point you can add bluetooth to default profile and start it.
rc-update add bluetooth default && /etc/init.d/bluetooth start
You can scan with hcidtool
bash# hcitool scanning
Scanning ...
       00:08:C6:02:D9:A5       Fisio 82X

now you can see your phone and what service are avaible with it

bash# sdptool browse 00:08:C6:02:D9:A5
Browsing 00:08:C6:02:D9:A5 ...
Service RecHandle: 0x10000

Service RecHandle: 0x10006

Service RecHandle: 0x1000d

Service RecHandle: 0x10013

Service RecHandle: 0x10019

Service RecHandle: 0x1001f

Service RecHandle: 0x10025

Service Name: Serial Port
Service RecHandle: 0x10026
Service Class ID List:
 "Serial Port" (0x1101)
 "Generic Telephony" (0x1204)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 5
Profile Descriptor List:
 "Serial Port" (0x1101)
   Version: 0x0100

Service Name: Dial-up networking
Service RecHandle: 0x10027
Service Class ID List:
 "Dialup Networking" (0x1103)
 "Generic Networking" (0x1201)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 2
Profile Descriptor List:
 "Dialup Networking" (0x1103)
   Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10028
Service Class ID List:
 "OBEX Object Push" (0x1105)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 4
 "OBEX" (0x0008)
Profile Descriptor List:
 "OBEX Object Push" (0x1105)
   Version: 0x0100

Service Name: Voice gateway
Service RecHandle: 0x10029
Service Class ID List:
 "Headset Audio Gateway" (0x1112)
 "Generic Audio" (0x1203)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 1
Profile Descriptor List:
 "Headset" (0x1108)
   Version: 0x0100

Service Name: Fax
Service RecHandle: 0x1002a
Service Class ID List:
 "Fax" (0x1111)
 "Generic Telephony" (0x1204)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 6
Profile Descriptor List:
 "Fax" (0x1111)
   Version: 0x0100
The first time maybe you have to digit the same PIN you have choosen above in the phone.

I work with nautilus so the front-end application that I have choosen is gnome-bluetooth-manager

bash# emerge gnome-bluetooth

Lauch it

bash# gnome-bluetooth-manager

Scan when your phone is in the discoravable mode and then you can send and receive images.

If you have trouble try to launch th gnome-obex-serve with

bash# gnome-obex-server

[edit] Internal modem

The following introduction on the internal modem currently only works with kernel 2.6. Once more compile the kernel after enabling the following option:
Linux Kernel Configuration: Internal modem
Device Drivers  --->
   Sound  --->
      Advanced Linux Sound Architecture  --->
         PCI Devices  --->
            [M] Intel i8x0/MX440; AMD768/8111 modems (EXPERIMENTAL)
This will make a module of the modem via ALSA. After reboot load the module with (or set it to load everytime):
bash$ modprobe snd_intel8x0m
Now simply add ALSA support to your make.conf and emerge slmodem which is in portage with
bash$ nano /etc/make.conf
      SUPPORT_ALSA=1
bash$ emerge slmodem
After a successfull emerge add the following line to /etc/modules.d/alsa. If the doesn't exist, just create it:
bash$ nano /etc/modules.d/alsa
      alias snd-card-1 snd-intel8x0m
For the first time run the driver with:
bash$ slmodemd -a hw:1 -c <country>
Fill in the right <country> above. Now you should have a device created at /dev/ttySL0. Next install the neccessary tools to use your dialin:
bash$ emerge ppp
bash$ emerge pppconfig
bash$ emerge wvdial
Now we go on with the setup of ppp and wvdial
bash$ pppconfig
or edit them manually at /etc/ppp/peers/YourISP. Follow the instructions and setup for your ISP, using /dev/ttySL0 as the modem device. I chose PAP and staticDNS. You might have to do this a couple times, because with me it didn't always stay the way I left it. Doesn't seem very stable.
bash$ wvdialconf /etc/wvdial.conf
and manually edit the /etc/wvdial.conf. Again follow instructions and once more fill in the data for your ISP. After configuring just run
bash$ wvdial
and it should connect you to your ISP. First dialup, then connecting and negotiating, and finally handing over to the pppd deamon. As long as it is running you are online. You can exit with Ctrl-C.
bash$ wvdial
      --> WvDial: Internet dialer version 1.53
      --> Initializing modem.
      --> Sending: ATZ
      ATZ
      OK
      --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
      ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
      OK
      --> Modem initialized.
      --> Sending: ATDT0909 30 199
      --> Waiting for carrier.
      ATDT0909 30 199
      CONNECT 37333
      --> Carrier detected.  Waiting for prompt.
      ~[7f]}#@!}!O} }9}"}&} }*} } }#}%B#}%}%}&[1b][7f]x}9}'}"}(}"o[17]~
      --> PPP negotiation detected.
      --> Starting pppd at Fri Jul  2 17:48:09 2004
      --> pid of pppd: 10753
Note: If you also have networking configured, you might have some problems with the default route. I think it's best that you first shutdown your network connection and turn off your ADSL modem by running:
bash$ /etc/init.d/net.eth0 stop
Ofcourse in real life you will only have 1 connection up. These are sane outputs:
bash$ ifconfig
      eth0      Link encap:Ethernet  HWaddr 00:C0:9F:20:D5:52
      inet addr:<xxx>  Bcast:10.0.0.255  Mask:255.255.255.0
      UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:42729 errors:0 dropped:0 overruns:0 frame:0
      TX packets:42347 errors:0 dropped:0 overruns:0 carrier:5
      collisions:118 txqueuelen:1000
      RX bytes:57731041 (55.0 Mb)  TX bytes:3175717 (3.0 Mb)
      Interrupt:5
      ...
      ppp0      Link encap:Point-to-Point Protocol
      inet addr:<yyy>  P-t-P:194.78.16.11  Mask:255.255.255.255
      UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
      RX packets:4 errors:0 dropped:0 overruns:0 frame:0
      TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:3
      RX bytes:64 (64.0 b)  TX bytes:97 (97.0 b)
bash$ ping -I ppp0 www.gentoo.org
      PING www.gentoo.org (203.112.31.164) from <yyy> ppp0: 56(84) bytes of data.
      64 bytes from 203.112.31.164: icmp_seq=1 ttl=44 time=477 ms
      64 bytes from 203.112.31.164: icmp_seq=2 ttl=44 time=471 ms
      64 bytes from 203.112.31.164: icmp_seq=3 ttl=44 time=460 ms
      64 bytes from 203.112.31.164: icmp_seq=4 ttl=44 time=454 ms
      --- www.gentoo.org ping statistics ---
      5 packets transmitted, 4 received, 20% packet loss, time 4003ms
      rtt min/avg/max/mdev = 454.167/465.744/477.388/9.080 ms
Now just have a look at your routes with eth0 up
bash$ linux # route
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
      194.78.16.11    *               255.255.255.255 UH    0      0        0 ppp0
      10.0.0.0        *               255.255.255.0   U     0      0        0 eth0
      loopback        localhost       255.0.0.0       UG    0      0        0 lo
      default         sth.lan         0.0.0.0         UG    0      0        0 eth0
and your routes with eth0 down
bash$ linux # route
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
      194.78.16.11    *               255.255.255.255 UH    0      0        0 ppp0
      loopback        localhost       255.0.0.0       UG    0      0        0 lo
      default         194.78.16.11    0.0.0.0         UG    0      0        0 ppp0
You also don't need to touch /etc/init.d/net.ppp0 or it's config. What you do need to do is make an init script for the slmodemd deamon. This is an adapted version from http://www.kcore.org/?menumain=4&menusub=1
File: /etc/init.d/slmodemd
#! /bin/bash
#
# slmodemd   Starts the slmodemd daemon.
#
NAME=slmodemd
DAEMON=/usr/sbin/slmodemd
PIDFILE=/var/run/$NAME.pid
COUNTRY=BELGIUM
DEVICE=/dev/ttySL0
test -f $DAEMON || exit 0
start_dev()
{
  echo -n "Starting slmodem daemon: $NAME "
  start-stop-daemon --start --pidfile $PIDFILE --make-pidfile --background --exec $DAEMON -- -a hw:1 -c $COUNTRY
}
stop_dev()
{
  echo -n "Stopping slmodem daemon: $NAME"
  start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON
}
case "$1" in
  start)
    start_dev
    ;;
  stop)
    stop_dev
    ;;
  restart)
    stop_dev
    echo ""
    rm $PIDFILE
    start_dev
    ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
    exit 1
    ;;
esac
if [ $? == 0 ]; then
  echo .
  if [ $1 == "stop" ]; then
    rm $PIDFILE
  fi
  exit 0
else
  echo failed
  exit 1
fi
Now to make the modem modules and also the pcscd deamon run at boot do
bash$ rc-update add pcscd boot
bash$ rc-update add slmodemd default
It's as easy as that. And it practically works out of itself. These connections also go very well with the gnome 2.6 Network Monitor applets!

[edit] IRDA support

  • Reference
    • Tutorial via Email from tuxlover (THANX)
  • Requirements
    • sys-apps/irda-utils
    • app-misc/gscmxx (to connect to a Siemens mobile phone)
As the infrared-port (IRDA) works flawlessly on kernel 2.6 don't forget to enable them in your BIOS (I forgot it and almost threw my notebook out of the window)!. Just enable the following kernel options to get the correct modules:
Linux Kernel Configuration: IRDA support
Bus options (PCI, PCMCIA, EISA, MCA, ISA)  --->
   [*] ISA support

Device Drivers  --->
   Networking support  --->
      <M> IrDA (infrared) subsystem support  --->
         --- IrDA (infrared) subsystem support
         <M>   IrNET protocol
         <M>   IrCOMM protocol
         [*]   Ultra (connectionless) protocol
         ---   IrDA options
         [*]   Cache last LSAP
         [*]   Fast RRs (low latency)
         Infrared-port device drivers  --->
            --- SIR device drivers
            <M> IrTTY (uses Linux serial driver)
            --- FIR device drivers
            <M> NSC PC87108/PC87338
You can insert the module into the kernel with the modprobe parameters, also it may or may not be nessacery to turn off UART mode for you serial port:
bash$ setserial /dev/ttyS1 uart none
bash$ modprobe nsc-ircc io=0x2f8 irq=3 dma=1
After recompiling and installing your new kernel install the irda-utils, which provide all kinds of programms for accessing IRDA. Also you should add the /etc/init.d/irda to your default runlevel to initialize the IRDA device on boot:
bash$ emerge irda-utils
bash$ rc-update add irda default
After rebooting with your new kernel, you can use irdadump to check if there's any traffic on your infrared port. By default, you should see your own computer's polling:
bash$ irdadump
      13:51:49.342590 xid:cmd ebbe58d4 > ffffffff S=6 s=0 (14)
      13:51:49.432474 xid:cmd ebbe58d4 > ffffffff S=6 s=1 (14)
      13:51:49.522460 xid:cmd ebbe58d4 > ffffffff S=6 s=2 (14)
      13:51:49.612446 xid:cmd ebbe58d4 > ffffffff S=6 s=3 (14)
      13:51:49.702433 xid:cmd ebbe58d4 > ffffffff S=6 s=4 (14)
      13:51:49.792418 xid:cmd ebbe58d4 > ffffffff S=6 s=5 (14)
      13:51:49.882405 xid:cmd ebbe58d4 > ffffffff S=6 s=* linux hint=0400 [Computer] (20)
You should now make the IRDA device (/dev/ircom...) accessible for all users. To archive it just edit /etc/devfsd.conf and add the following line:
bash$ nano /etc/devfsd.conf
      REGISTER        ^ircomm.*     PERMISSIONS root.users  0660
Now, if you put an irda device in front of your irda port, it could look like this:
bash$ irdadump
      13:57:22.291974 xid:cmd ebbe58d4 > ffffffff S=6 s=0 (14)
      13:57:22.381857 xid:cmd ebbe58d4 > ffffffff S=6 s=1 (14)
      13:57:22.471843 xid:cmd ebbe58d4 > ffffffff S=6 s=2 (14)
      13:57:22.561830 xid:cmd ebbe58d4 > ffffffff S=6 s=3 (14)
      13:57:22.651814 xid:cmd ebbe58d4 > ffffffff S=6 s=4 (14)
      13:57:22.741804 xid:cmd ebbe58d4 > ffffffff S=6 s=5 (14)
      13:57:22.823723 xid:rsp ebbe58d4 < 00481537 S=6 s=5 SIEMENS S45i hint=b124 [ PnP Modem Fax IrCOMM IrOBEX ] (29)
      13:57:22.831790 xid:cmd ebbe58d4 > ffffffff S=6 s=* linux hint=0400 [Computer] (20)
Now you should be set to connect any IRDA devices to your notebook.

[edit] Siemens mobile phones

If you have a siemens mobile phone like I do (S25 to MT50), you can install app-misc/gscmxx and use it to manage your address book, pictures and similar things:
emerge app-misc/gscmxx
Put your phone close to your irda port, start gscmxx and configure it to use /dev/ircomm0, baudrate 115200, and set the timeouts to relatively high values.

[edit] PCMCIA

The PCMCIA card slot of the Acer 803 Lci is fully supported by the yenta-compatible module, so all you have to do is to compile yourself a new kernel with the following options:
Linux Kernel Configuration: PCMCIA
Bus options (PCI, PCMCIA, EISA, MCA, ISA)  --->
   [*] Support for hot-pluggable devices
   PCMCIA/CardBus support  --->
      <M> PCMCIA/CardBus support
      <M>   CardBus yenta-compatible bridge support
to get it working. By it's nature as a module you need to load the appropiate modules before you can use the tools by using the commands below:
modprobe pcmcia_core
modprobe yenta_socket
modprobe ds
You can also load those modules at boot-time by placing the settings in your '/etc/modules.autoload.d/kernel-2.6' file:
File: /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.
# $Header: /var/cvsroot/acer_thread/sections/pcmcia.txt,v 1.1 2004/02/24 15:31:46 feffi Exp $
#
# Note that this file is for 2.6 kernels.
#
pcmcia_core
yenta_socket
ds
To configure and work with you PCMCIA-cards, you'll need to install the 'pcmcia-cs' package which will provide you with the neccessary tools:
emerge sys-apps/pcmcia-cs
After you installed these tools you can get some information about the sockets and the installed cards by typing:
bash$ cardctl status
      Socket 0:
      no card
      Socket 1:
      5V 16-bit PC Card
      function 0: [ready]
The card that resides in Socket 1 displayed here is the O2Micro Smartcardreader which is currently not supported under Linux. You can also get more information about your plugged-in cards by:
bash$ cardctl ident
      Socket 0:
      no product info available
      Socket 1:
      product info: "O2Micro", "SmartCardBus Reader", "V1.0"
      manfid: 0xffff, 0x0001

[edit] Smartcardreader

The smartcard reader works using the new official driver with some patches for the new pcmcia structure in the latest kernels, and with the latest pcsc-lite. We are still looking for applications though. -- pjv 14-08-2006

Edit: Recently it stopped working and I needed to make the adjustments as posted at [1] (mostly dropping the %n in the udev rule). I also had the FF FF atr, which went away by either one of these: pcscd -f, having your card already in the reader before starting the commands, second run. -- pjv 11-10-2006

[edit] Driver and dependencies

Get the latest gentoo-sources kernel (in my case gentoo-sources-2.6.17-r5), compile and use it. The drivers will contain a solution for <2.6.13 and for 2.6.13<=...<2.6.16-somewhat. For >=2.6.16-somewhat will need patches as the drivers aren't up to date enough yet, see later on.

Emerge pcsc-lite >=1.2.9 (in my case 1.3.1-r1) and optionally also opensc (in my case 0.11.0-r1).

Download the latest driver (in my case O2Micro_PCMCIA_SCR_203_Linux_Kernel26_OpenSource.tar.gz) from O2Micro. Unpack it to (for example) /opt/OZSCR_2.0.3_Kern_2.6/ as root.

We're now going to patch it for kernel version 2.6.17, and then we'll just follow the included install guide:

Download the two patches to the drivers rootdirectory: ozscrlx.c-patch-kernel-2.6.13-to-2.6.17configids-b-0001.bin (the actual update for 2.6.17) and ozscrlx.c-patch-kernel-2.6.17sysfs.bin (for adding basic sysfs functionality)(you can add this udev rule to /etc/udev/rules.d/50-udev.rules under misc devices: KERNEL=="o2cr*", NAME="ozscrlx%n", GROUP="tty", MODE=660). More info about this can be found at [2], credits go fully to the people there. The driver is Windows-formatted so do: recode /CR-LF src/ozscrlx-2.6.13/ozscrlx.c. Better backup ozscrlx.c first. Now apply the patches:

cat /opt/OZSCR_2.0.3_Kern_2.6/ozscrlx.c-patch-kernel-2.6.13-to-2.6.17configids-b-0001.bin | patch -p1
cat /opt/OZSCR_2.0.3_Kern_2.6/ozscrlx.c-patch-kernel-2.6.17sysfs.bin | patch -p1

With both it will ask "File to patch:", answer with (just point to the right file): src/ozscrlx-2.6.13/ozscrlx.c. It should finish with "patching file src/ozscrlx-2.6.13/ozscrlx.c" and certainly no HUNKS FAILED or you will have to try and apply it manually.

Next, just follow the guide (with your running 2.6.17 kernel and ditto /usr/src/linux symlink). It says to ./configure-release. This is the output:

Found pcsclite 1.3.1 in /usr/lib
Found kernel 2.6.17-gentoo-r5030 includes directory
Building OZSCR modules...
rm -f *.o
rm -f .*.o.d
rm -f *.ko
rm -f *.mod.*
rm -f .*.cmd
rm -rf .tmp_*
rm -f *~
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.17-gentoo-r5'
  CC [M]  /opt/OZSCR_2.0.3_Kern_2.6/src/ozscrlx-2.6.13/ozscrlx.o
  Building modules, stage 2.
  MODPOST
  CC      /opt/OZSCR_2.0.3_Kern_2.6/src/ozscrlx-2.6.13/ozscrlx.mod.o
  LD [M]  /opt/OZSCR_2.0.3_Kern_2.6/src/ozscrlx-2.6.13/ozscrlx.ko
make[1]: Leaving directory `/usr/src/linux-2.6.17-gentoo-r5'
cp -f ozscrlx.ko /lib/modules/`uname -r`/pcmcia
rm -f *.o
rm -f .*.o.d
rm -f *.ko
rm -f *.mod.*
rm -f .*.cmd
rm -rf .tmp_*
rm -f *~
Copying files...
Old /etc/reader.conf backedup as /etc/reader.conf.bak
cp: kan stat niet toepassen op `etc/reader.conf.1.3.1': Onbekend bestand of map
/etc/reader.conf updated
OZSCR installation complete.

It only complains about reader.conf. This is because the script has the expected version of pcsc-lite (so 1.2.9) hard-coded. Just copy it manually: cp etc/reader.conf.1.2.9 /etc/reader.conf.

Load the driver: modprobe ozscrlx. If I'm not forgetting anything then this is all you need to do. Now just run pcscd and see if it works: pcscd -d -f. Output:

pcscdaemon.c:259:main() pcscd set to foreground with debug send to stderr
readerfactory.c:1095:RFInitializeReader() Attempting startup of O2Micro SmartCardBus Reader 00 00.
readerfactory.c:933:RFBindFunctions() Loading IFD Handler 2.0
pcscdaemon.c:464:main() pcsc-lite 1.3.1 daemon ready.
hotplug_libusb.c:105:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/lib/readers/usb
hotplug_libusb.c:106:HPReadBundleValues() Disabling USB support for pcscd.
Card ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11

[edit] Applications

Belgian eID card: Browse to www.godot.be and use the applet that is loaded automatically (you might also need to make the symlink as indicated). Needless to say this application is very specific for eID cards. You will see things happening in your running pcscd too:

winscard_msg_srv.c:203:SHMProcessEventsServer() Common channel packet arrival
winscard_msg_srv.c:212:SHMProcessEventsServer() SHMProcessCommonChannelRequest detects: 7
pcscdaemon.c:151:SVCServiceRunLoop() A new context thread creation is requested: 7
winscard_svc.c:129:ContextThread() Thread is started: 7
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard_svc.c:171:ContextThread() Client is protocol version 2:0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:159:SCardEstablishContext() Establishing Context: 17015081
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:213:SCardConnect() Attempting Connect to O2Micro SmartCardBus Reader 00 00 using protocol: 3
prothandler.c:130:PHSetProtocol() Attempting PTS to T=0
winscard.c:323:SCardConnect() Active Protocol: T=0
winscard.c:333:SCardConnect() hCard Identity: 1d068
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0
winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 7
winscard.c:1464:SCardTransmit() Send Protocol: T=0


Acer's green security card (360Degree PlatinumPAS/PlatinumSecret actually) I haven't found much useful here. It's not that it doesn't work, it's just that I haven't found an application yet to use it with, or read it out with.

When trying any of the commands from opensc,