<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Peter"/>
	<updated>2026-05-20T00:36:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_setup_Bluetooth&amp;diff=20268</id>
		<title>How to setup Bluetooth</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_setup_Bluetooth&amp;diff=20268"/>
		<updated>2006-02-21T16:10:15Z</updated>

		<summary type="html">&lt;p&gt;Peter: /* Configuring the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#efefef; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
This HOWTO tells you how to install and configure Bluetooth on your Linux driven ThinkPad and how to make the most common Bluetooth applications (like connecting your mobile phone etc.) work.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==BlueZ Installation==&lt;br /&gt;
===Building from source===&lt;br /&gt;
Get the source packages from [http://www.bluez.org www.bluez.org].&lt;br /&gt;
&lt;br /&gt;
Build each of them with the usual steps:&lt;br /&gt;
:{{cmduser|./configure &amp;amp;&amp;amp; make}}&lt;br /&gt;
:{{cmdroot|make install}}&lt;br /&gt;
&lt;br /&gt;
===Gentoo ebuilds===&lt;br /&gt;
Under {{Gentoo}}, install the following ebuilds:&lt;br /&gt;
*net-wireless/bluez-bluefw&lt;br /&gt;
*net-wireless/bluez-firmware&lt;br /&gt;
*net-wireless/bluez-hcidump&lt;br /&gt;
*net-wireless/bluez-hciemu&lt;br /&gt;
*net-wireless/bluez-libs&lt;br /&gt;
*net-wireless/bluez-utils&lt;br /&gt;
&lt;br /&gt;
{{NOTE|net-wireless/bluez-kernel is not needed, since the current version is included in your kernel.}}&lt;br /&gt;
&lt;br /&gt;
===Other distributions===&lt;br /&gt;
You will find packages for {{Debian}}, {{Redhat}} and {{Slackware}} on the [http://www.bluez.org/packages.html packages page] of the BlueZ project.&lt;br /&gt;
&lt;br /&gt;
==Configuring the kernel==&lt;br /&gt;
Since the Bluetooth card is connected to the USB subsystem, you will need to enable USB support in your kernel:&lt;br /&gt;
:{{kernelconf|CONFIG_USB|&amp;lt;M&amp;gt;|Support for Host-side USB|USB support|Device Drivers||}}&lt;br /&gt;
:{{kernelconf|CONFIG_USB_DEVICEFS|[*]|USB device file system|USB support|Device Drivers||}}&lt;br /&gt;
&lt;br /&gt;
Choose an appropriate USB host driver, one of: &lt;br /&gt;
:{{kernelconf|CONFIG_USB_EHCI_HCD|&amp;lt;M&amp;gt;|EHCI HCD (USB 2.0) support|USB support|Device Drivers||}}&lt;br /&gt;
:{{kernelconf|CONFIG_USB_UHCI|&amp;lt;M&amp;gt;|UHCI HCD support|USB support|Device Drivers||}}&lt;br /&gt;
:{{kernelconf|CONFIG_USB_OHCI|&amp;lt;M&amp;gt;|OHCI HCD support|USB support|Device Drivers||}}&lt;br /&gt;
&lt;br /&gt;
Enable Bluetooth subsystem and drivers:&lt;br /&gt;
:{{kernelconf|CONFIG_BT|&amp;lt;*&amp;gt;|Bluetooth subsystem support|Networking support|Device Drivers||}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_L2CAP|&amp;lt;*&amp;gt;|L2CAP protocol support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_SCO|&amp;lt;*&amp;gt;|SCO links support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_RFCOMM|&amp;lt;*&amp;gt;|RFCOMM protocol support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_RFCOMM_TTY|[*]|RFCOMM TTY support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_BNEP|&amp;lt;*&amp;gt;|BNEP protocol support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_HID|&amp;lt;*&amp;gt;|HID protocol support|Bluetooth subsystem support|Networking support|Device Drivers|}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_HCIUSB|&amp;lt;M&amp;gt;|HCI USB driver|Bluetooth device drivers|Bluetooth subsystem support|Networking support|Device Drivers}}&lt;br /&gt;
:{{kernelconf|CONFIG_BT_HCIUSB_SCO|[*]|SCO (voice) support|Bluetooth device drivers|Bluetooth subsystem support|Networking support|Device Drivers}}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|&amp;lt;tt&amp;gt;RFCOMM protocols support&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;RFCOMM TTY support&amp;lt;/tt&amp;gt; have to be built into the kernel, and hence &amp;lt;tt&amp;gt;Bluetooth support&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;L2CAP&amp;lt;/tt&amp;gt; as well.}}&lt;br /&gt;
&lt;br /&gt;
Make sure that the according modules are loaded:&lt;br /&gt;
:{{cmdroot|modprobe uhci_hcd ; modprobe ehci_hcd ; modprobe hci_usb}}&lt;br /&gt;
&lt;br /&gt;
==Serial connection over Bluetooth==&lt;br /&gt;
One common application is to connect your mobile phone and use it as a modem to connect to the internet via GPRS or 3G (UMTS). A lot of phones do this through using AT-commands on a serial over Bluetooth connection.&lt;br /&gt;
&lt;br /&gt;
By configuring {{path|/etc/bluetooth/rfcomm.conf}} correctly, you'll get a device {{path|/dev/rfcomm0}}.&lt;br /&gt;
&lt;br /&gt;
Eventually one could use the command:&lt;br /&gt;
:{{cmdroot|rfcomm bind 0 00:15:A0:7A:90:F2 3}}&lt;br /&gt;
&lt;br /&gt;
The hardware address should be replaced with that of your phone. If you don't know the hardware address of your phone yet, you can get it by running:&lt;br /&gt;
:{{cmdroot|hcitool scan}}&lt;br /&gt;
&lt;br /&gt;
The last parameter ('3') is the channel to use. I spent quite some time fighting before I found out of that one; I didn't find it documented anywhere, but by running&lt;br /&gt;
:{{cmdroot|sdptool records 00:15:A0:7A:90:F2}}&lt;br /&gt;
I found channel 3 to be the right one for my phone.  You will have to experiment to find the right one for your phone setup; for T-Mobile GSM/GPRS carrier in USA this is channel 1.&lt;br /&gt;
{{NOTE|By experimenting, the bluetooth stack on the cellphone may crash. Reboot it if that happens.}}&lt;br /&gt;
&lt;br /&gt;
Alternativly one could use the following to find the right channel:&lt;br /&gt;
:{{cmdroot|sdptool search DUN}}&lt;br /&gt;
&lt;br /&gt;
 Inquiring ...&lt;br /&gt;
 Searching for DUN on 00:11:22:33:44:55 ...&lt;br /&gt;
 Service Name: Dial-up Networking&lt;br /&gt;
 Service RecHandle: 0x10001&lt;br /&gt;
 Service Class ID List:&lt;br /&gt;
   &amp;quot;Dialup Networking&amp;quot; (0x1103)&lt;br /&gt;
   &amp;quot;Generic Networking&amp;quot; (0x1201)&lt;br /&gt;
 Protocol Descriptor List:&lt;br /&gt;
   &amp;quot;L2CAP&amp;quot; (0x0100)&lt;br /&gt;
   &amp;quot;RFCOMM&amp;quot; (0x0003)&lt;br /&gt;
     Channel: 4&lt;br /&gt;
&lt;br /&gt;
Now {{path|/dev/rfcomm0}} exists.&lt;br /&gt;
&lt;br /&gt;
At this point you can use an automatic dialing utility such as wvdial, editing the config file to point to the modem at {{path|/dev/rfcomm0}}, and everything should work just like a land line!&lt;br /&gt;
&lt;br /&gt;
You may directly access the modem (i.e. by using minicom:)&lt;br /&gt;
:{{cmduser|minicom -s}}&lt;br /&gt;
set the serial device to be {{path|/dev/rfcomm0}}, choose 'exit' and then the AT-commands can be typed in.&lt;br /&gt;
With my operator (Telenor, Norway) it seemed simple enough, I just entered &lt;br /&gt;
:ATDT *99#&lt;br /&gt;
and lots of cryptic letters started dancing across the screen, indicating a ppp session startup.&lt;br /&gt;
&lt;br /&gt;
To configure pppd create {{path|/etc/ppp/peers/nokia}} with particularly those lines:&lt;br /&gt;
 /dev/rfcomm0&lt;br /&gt;
 connect '/usr/sbin/chat -v -f /etc/ppp/chat-nokia'&lt;br /&gt;
 debug&lt;br /&gt;
 10.0.1.3&lt;br /&gt;
 crtscts&lt;br /&gt;
 noipdefault&lt;br /&gt;
 ipcp-accept-local&lt;br /&gt;
 defaultroute&lt;br /&gt;
 novj&lt;br /&gt;
 nobsdcomp&lt;br /&gt;
 novjccomp&lt;br /&gt;
 nopcomp&lt;br /&gt;
 noaccomp&lt;br /&gt;
 usepeerdns&lt;br /&gt;
&lt;br /&gt;
Furthermore, you need a simple chat script. Create {{path|/etc/ppp/chat-nokia}}:&lt;br /&gt;
 'TIMEOUT' '5'&lt;br /&gt;
 'ABORT' 'BUSY'&lt;br /&gt;
 'ABORT' 'ERROR'&lt;br /&gt;
 'ABORT' 'NO ANSWER'&lt;br /&gt;
 'ABORT' 'NO CARRIER'&lt;br /&gt;
 'ABORT' 'NO DIALTONE'&lt;br /&gt;
 'ABORT' 'Invalid Login'&lt;br /&gt;
 'ABORT' 'Login incorrect'&lt;br /&gt;
 '' 'ATZ'&lt;br /&gt;
 'OK' 'ATDT*99#'&lt;br /&gt;
 '~--' ''&lt;br /&gt;
&lt;br /&gt;
Run pppd with:&lt;br /&gt;
:{{cmduser|pppd call nokia}}&lt;br /&gt;
This should establish the internet connection.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Different network operators may require different call strings. For many carriers (including T-Mobile USA) &amp;quot;*99#&amp;quot; works without additional parameters.}}&lt;br /&gt;
&lt;br /&gt;
For editing phonebook / ringtones / etc., the gammu utils (http://www.gamu.net) has been reported to work well, but this appears to be primarily for Nokia phones.&lt;br /&gt;
&lt;br /&gt;
==File Transfer==&lt;br /&gt;
File transfers are accomplished through OBEX transfer, which I believe is basically an FTP over bluetooth connection.  Once you have bonded with your phone (yes, I know you love your sexy RAZR, but here I mean paired it with your laptop via bluetooth), you can easily use &amp;quot;obexftp&amp;quot; to transfer files.  As an example,&lt;br /&gt;
&lt;br /&gt;
:obexftp -b 00:01:02:03:04:05 -l&lt;br /&gt;
&lt;br /&gt;
will list the root directory of the phone with bluetooth address 00:01:02:03:04:05.  Refer to the man page for more of the unique commands.  What a wonderful interface!  Unfortunately there doesn't seem to be a way to get a standard 'ftp' session using familiar commands (e.g. 'mget').&lt;br /&gt;
&lt;br /&gt;
For a more user-friendly experience, you can use the kde tools, just launch&lt;br /&gt;
:kbtobexclient&lt;br /&gt;
&lt;br /&gt;
for a file browser.  In the Location: option put&lt;br /&gt;
:obex://[00:01:02:03:04:05]&lt;br /&gt;
&lt;br /&gt;
to list the files.  Note that the brackets *are* necessary.  From there, you can list directories easily and batch download files.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*http://gagravarr.org/series-60/&lt;br /&gt;
*http://www.polycon.fi/~laa/biblo/linux_gprs.html&lt;br /&gt;
*[http://www.gentoo.org/doc/en/bluetooth-guide.xml Guide on how to set up Bluetooth in Gentoo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:A30]] [[Category:A30p]] [[Category:A31]] [[Category:A31p]] [[Category:R40]] [[Category:R40e]] [[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:T30]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:X23]] [[Category:X24]] [[Category:X30]] [[Category:X31]] [[Category:X32]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]]&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
		
	</entry>
</feed>