Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:guides:bluetooth [2010/04/03 18:27] – ernia | en:guides:bluetooth [2010/08/22 15:39] (current) – linea | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Bluetooth ====== | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| This guide will help you to configure bluetooth, e.g. to use your phone as a modem. | This guide will help you to configure bluetooth, e.g. to use your phone as a modem. | ||
| Do following steps as root. | Do following steps as root. | ||
| First of all you must install Slitaz packages related to bluetooth: | First of all you must install Slitaz packages related to bluetooth: | ||
| - | tazpkg get-install bluez | + | |
| - | tazpkg get-install linux-bluetooth | + | |
| The first package contains the Official Linux Bluetooth protocol stack www.bluez.org and the second contains the kernel modules related to bluetooth. | The first package contains the Official Linux Bluetooth protocol stack www.bluez.org and the second contains the kernel modules related to bluetooth. | ||
| Now you can launch the bluetooth daemon: | Now you can launch the bluetooth daemon: | ||
| - | bluetoothd | + | |
| - | and load the module required by your local bluetooth device, this is very likely btusb | + | And load the module required by your local bluetooth device, this is very likely btusb: |
| - | modprobe btusb | + | |
| - | If btusb is the module you need the command " | + | If btusb is the module you need the command " |
| root@slitaz:/ | root@slitaz:/ | ||
| Devices: | Devices: | ||
| hci0 00: | hci0 00: | ||
| - | If the command " | + | If the command " |
| Now that you have hci* you can run the " | Now that you have hci* you can run the " | ||
| - | So if you are searching e.g. your phone remember to put it in discoverable mode. | + | So if you are searching, e.g. your phone, remember to put it in discoverable mode: |
| root@slitaz:/ | root@slitaz:/ | ||
| Scanning ... | Scanning ... | ||
| Line 23: | Line 27: | ||
| If you want to start the pairing from the remote device you need to put your local device in discoverable mode: | If you want to start the pairing from the remote device you need to put your local device in discoverable mode: | ||
| - | hciconfig hci0 piscan | + | |
| - | Now launch bluez-simple-agent, | + | |
| + | Now launch bluez-simple-agent, | ||
| This code will be the same one you typed on the phone. When you are done you need to kill bluez-simple-agent with Ctrl-c: | This code will be the same one you typed on the phone. When you are done you need to kill bluez-simple-agent with Ctrl-c: | ||
| root@slitaz:/ | root@slitaz:/ | ||
| Line 35: | Line 40: | ||
| mainloop.run() | mainloop.run() | ||
| KeyboardInterrupt | KeyboardInterrupt | ||
| - | root@slitaz:/ | + | root@slitaz:/ |
| - | Put your local device back in undiscoverable mode | + | Put your local device back in undiscoverable mode: |
| - | hciconfig hci0 pscan | + | |
| - | If you want to start the pairing from you local device you do it using bluez-simple-agent with the hci* of your local device and the address of the device you discovered with " | + | If you want to start the pairing from your local device you can do it using bluez-simple-agent with the hci* of your local device and the address of the device you discovered with " |
| root@slitaz:/ | root@slitaz:/ | ||
| RequestPinCode (/ | RequestPinCode (/ | ||
| Line 46: | Line 51: | ||
| New device (/ | New device (/ | ||
| root@slitaz:/ | root@slitaz:/ | ||
| - | Be fast because bluez-simple-agent | + | Be fast because bluez-simple-agent |
| - | Now you have your two devices paired, i will go on with the phone as a modem example, | + | ===== Use a phone as a modem ===== |
| - | To use your phone as a modem you need the rfcomm module. | + | |
| + | Now you have your two devices paired, i will go on with the phone as a modem example, | ||
| + | To use your phone as a modem you need the rfcomm module. | ||
| root@slitaz:/ | root@slitaz:/ | ||
| CONFIG_BT_RFCOMM=m | CONFIG_BT_RFCOMM=m | ||
| # CONFIG_BT_RFCOMM_TTY is not set | # CONFIG_BT_RFCOMM_TTY is not set | ||
| root@slitaz:/ | root@slitaz:/ | ||
| - | If CONFIG_BT_RFCOMM_TTY is not =y you must recompile the module with tty support. Install linux-source | + | If CONFIG_BT_RFCOMM_TTY is not =y you must recompile the module with tty support. Install linux-source: |
| - | tazpkg get-install linux-source | + | |
| - | cd in / | + | cd in /usr/src/linux-`uname -r`/ and give this command: |
| - | make CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y M=net/ | + | |
| - | This will build only the rfcomm module with tty support. You will find it in / | + | This will build only the rfcomm module with tty support. You will find it in /usr/src/linux-`uname -r`/ |
| - | Now you can delete the old rfcomm module and change | + | Now you can delete the old rfcomm module and replace |
| - | rm / | + | |
| - | cp / | + | |
| - | depmod -a | + | |
| - | Now that we have a working rfcomm module we must detect the channel where the phone dialup service is listening. | + | Now that we have a working rfcomm module we must detect the channel where the phone dialup service is listening: |
| - | sdptool browse 00: | + | |
| - | where 00: | + | Where 00: |
| Service Name: Dial-up networking | Service Name: Dial-up networking | ||
| Service RecHandle: 0x10000 | Service RecHandle: 0x10000 | ||
| Line 82: | Line 89: | ||
| " | " | ||
| Version: 0x0100 | Version: 0x0100 | ||
| - | As you can see it is listening on channel 1, so you edit / | + | |
| + | ===== rfcomm.conf ===== | ||
| + | |||
| + | As you can see it is listening on channel 1, so you edit /// | ||
| + | < | ||
| # | # | ||
| # RFCOMM configuration file. | # RFCOMM configuration file. | ||
| Line 99: | Line 110: | ||
| # | # | ||
| } | } | ||
| - | now with | + | </ |
| - | modprobe rfcomm | + | Now with: |
| - | rfcomm bind all | + | |
| - | you can use rfcomm0 as you modem in a wvdial script. | + | |
| - | you may want to check this guide http:// | + | You can use /dev/rfcomm0 as a modem in a wvdial script. |
| + | You may want to check this guide http:// | ||
| + | |||
| + | ---- | ||
| + | \\ | ||
| + | ^ Page Review Section | ||
| + | |Quality| Good | | ||
| + | |Review| Minor Updates | ||
| + | |Priority| Medium | | ||
| + | |Problems| add a [[http:// | ||
| + | |::: | OR add a [[http:// | ||
| + | |How to Improve| Add tazhw setup bluetooth ; Please create " | ||
| + | |::: | | | ||
| + | \\ | ||
| + | ---- | ||