Article Title: how to use Bluetooth in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. Bluetooth storage device
Bluetooth adapter: ISSC chip, USB interface (there are other brands on the market, most of which are OK)
Bluetooth mobile phone: Sony Ericsson T628
Bluetooth headset: Jabra BT250 (the Chinese mainland model is FS258, which takes care of the special Chinese understanding of BT and 258 Geely numbers)
1. Load the Bluetooth adapter
After the USB port is inserted, you can use the lsusb command to see:
Bus 004 Device 003: ID 1131: 1001 Integrated System Solution Corp.
Can activate the excuse (this step is not done, hcitool scan cannot run)
3. Configure bluez
Put the default configuration file in the/etc/bluetooth directory
Hcid. conf and pin do not need to be modified. The security mode has been set to auto to facilitate the connection. You can modify them by yourself. We recommend that you do not modify them to prevent some devices from being connected.
4. Restart the bluetooth service.
/Etc/rc. d/init. d/bluetooth stop
/Etc/rc. d/init. d/bluetooth start
5. Scan Devices
Run hcitool scan to obtain:
Scanning...
00: 01: EC: 0C: D2: 00 Tree's T628
6. modify the configuration file:
Modify/etc/bluetooth/rfcomm. conf
Replace the following:
Device 11: 22: 33: 44: 55: 66;
The result of hcitool scan:
Device 00: 01: EC: 0C: D2: 00
Save and exit.
7. Create a device:
Run
Rfcomm_create_dev.
8. Add a channel:
Sdptool add -- channel = 1 did sp dun lan fax opush ftp hs hf sap nap gn panu hid cip ctp A2SRC A2SNK syncml nokid pcsuite SR1
The following parameters are not necessarily supported, but in case some services are not opened, they are all opened.
Rfcomm bind/dev/rfcomm0 address channel (configured in rfcomm. conf)
The command here should be written:
Rfcomm bind/dev/rfcomm0 00: 01: EC: 0C: D2: 00 1
9. Connect to the mobile phone:
Hcitool cc phone address
That is
Hcitool cc 00: 01: EC: 0C: D2: 00
At this time, we can see that the Bluetooth connection on the mobile phone is in the China Unicom status.
10. Send files from the computer:
Obex-send abc.jpg
The operating system prompts you to select the target to be sent.
At the same time, a prompt box is displayed on the mobile phone asking whether to accept the file.
11. Mobile phone Configuration:
You need to perform the following configuration on your mobile phone:
If you need to fill in the identification code, enter 123. It has been set above.
At this time, we can see that the mobile phone has successfully added a bluetooth device.
12. Send a file from your mobile phone.
Start obex-server on a PC and a small icon appears on the system tray.
After completing the above work, you can enter the mobile phone:
Multimedia> my album
Select an image.
Then, "send"-> "via Bluetooth"
We can see the Bluetooth adapter we just scanned.
Then, you can send the file.
13. use software to manage mobile phone information.
Refer to the gnokii software documentation
Ii. Bluetooth headsets.
1. At the same time, press the "phone key" and "volume increase key" on jabra 250. The blue light is always on for about 8 seconds.
1. Scan the headset to get the bdaddress
Hcitool scan
3. Configuration:
Modprobe snd_bt_sco
Hciconfig hci0 void 0x0060
Btsco bdaddress (the bdaddress here is the result of the scan)
After btsco runs, a dialog box is displayed, asking you to enter the pin of the headset. The value of jabra 250 is 0000, which can be found in the instruction manual.
4. After the connection is established, the device is mapped to/dev/dsp1.
Taking beep as an example,
Plug-in-> output, select the alsa driver and click "Preferences". In the audio settings section, you can see information such as btsco: hw0 and 1. Select this one.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service