Acer 3400LMI manual Appendix C dun­bind.sh

Page 52

F8­x86_64 on the Acer Ferrari 3400LMi

Appendix C – dun­bind.sh

#!/bin/sh

#

#Available at http://ferrari.databa.se/3400/f8/dun­bind.sh

#A verbose sample script for finding the Dial Up Networking

#channel on a Bluetooth device and binding a /dev/rfcomm port to it.

#By Sven­Göran Bergh, 2005­11­03

#Update 2007­04­03 Added release of passive/closed rfcomm port.

#

#Use this /dev/rfcomm port RFPORT=1

#Name of Bluetooth device to bind to: BTNAME="S­Gs P900"

success() {

echo ­e $"\\033[60G[ \\033[1;32mOK\\033[0;39m ]" return 0

}

failure() {

echo ­e $"\\033[60G[\\033[1;31mFAILED\\033[0;39m]" exit 1

}

#Check that local Bluetooth device is active echo ­n $"Checking for local Bluetooth device..." hciconfig grep 'UP RUNNING' &> /dev/null \

&&success failure

#If the rfcomm port exists but is currently not in use, try to release

it

if [ "`rfcomm show ${RFPORT} 2> /dev/null awk ­­ '{print $5}'`" == "closed" ];

then

echo ­n $"Trying to free closed port /dev/rfcomm${RFPORT}..."

rfcomm release ${RFPORT} &> /dev/null \ && success failure

fi

# Check if the rfcomm port is free

echo ­n $"Checking that /dev/rfcomm${RFPORT} is free..." rfcomm show ${RFPORT} &> /dev/null \

&&failure success

#Check for the remote Bluetooth device

52

Image 52
Contents Table of Contents F8-x8664 on the Acer Ferrari 3400LMiF8­x8664 on the Acer Ferrari 3400LMi Version IntroductionQuick reference guide Hardware Status Details Installation Graphical installerPotential pitfalls Disk sizeHard drive Ieee 1394 FirewireUpgrading the drive Potential problems # time cp ­rp /media/ieee1394disk/430MBfolder ~Configuring Firewire CommentsPC-card In-1 Card readerSpecial keys & buttons Configuration procedure Key-codesButton Key-code Default X key symbols Scan-codesLinux key-codes WWW Key-codes revisited= XF86WWW Configure actions CPU & Acpi supportGraphics SuspendCPU frequency scaling BasicsDual-Head Simple configurationRadeon driver Virtual screen size # xrandr ­q Screen 0 minimumXrandr tool Fn-F5 button10.3 3D acceleration Optimization Simple benchmarkOther observations TV-out Load detectionNtsc or PAL InitializationWireless NIC Touch-padWlan tools Installing WlanWlan firmware Manual way Get started with WlanEssid # iwconfig wlan0 essid Perspektiv Verify installation BluetoothGUI way Using a phone modem UP Running PscanPrepare the phone Prepare the laptopObex File Transfer 0x1106 Protocol Descriptor List Static configuration Short explanation of the command aboveDynamic routine Gprs AT+CGDATA=PPP,1KBluetooth InstallationSending files Mouse & keyboardMouse & keyboard Scan for devicesLock screen Infrared Configuring IrDATransfer files IRQ DMATesting IrDA ModemInstalling daemon SLMODEMDCOUNTRY=SWEDEN SLMODEMDDEVICE=Connecting Potential issueDisconnecting References System hangF8­x8664 on the Acer Ferrari 3400LMi Appendix a /etc/X11/xorg.conf XAA INTERNAL=LVDS Appendix B dual­head.shNtsc ACTION=$1­$DEFAULTACTION CURNDX=$CURNDX­$INTNDX CURRENT=$ALLOUT$CURNDX Lvds LVDS+VGA­0 NEXT=$CURRENTInternal internal Tvout Usage Esac Appendix C dun­bind.sh F8­x8664 on the Acer Ferrari 3400LMi RETVAL=0 $CONFIGSLMODEMDOPTS=$SLMODEMDOPTS $SLMODEMDDEVICE RETVAL=$? F8­x8664 on the Acer Ferrari 3400LMi