1, download header filethe latest Android uses the Bluedroid Bluetooth library. The research Androhid uses the BlueZ Bluetooth library. To BlueZ downloaded a, inside the directory structure and files are different. Search for half a day, search the Android BlueZ.git clone Https://android.googlesource.com/platform/external/bluetooth/bluez2, copy to NDKCopy the downloaded
go out of the mountains.
The function of transferring data between a computer and a Bluetooth mobile phone is realized (thanks to TX Telecom and another student for providing a Bluetooth mobile phone ). Unfortunately, at present, only mobile phones are allowed to connect to the computer, but no methods have been found to connect the computer to the mobile phone.
You only need to download a few software for the specific configuration. Install the following software with the new version.
Or
$ Sud
The author's blog address: http://blog.sina.com.cn/samzhen1977
By Sam (zhufeng) sam_code@hotmail.com
Sam wants to port the Controller Library to the hith hi3100 EV 100 platform. The evaluation is as follows:
1. hi3100 EV 100 is an ARM platform.2. hi3100 EV 100 uses uclibc.These two differences determine the need to start porting from the underlying Bluetooth library.
I:Sam compiled Bluetooth. Ko, hci_usb.ko, L2CAP. Ko from Linux kernel,Hidp. Ko.
II:Download the new version of bluez.Http://www.
use, as shown in.
Kdebluetooth Tool
With the continuous development and improvement of the open-source community project kdebluetooth, apatite uses the project as a prototype to provide Bluetooth communication support for the system, and fixes the stability of the project.. Kdebluetooth is a Bluetooth application framework built on the bluez protocol stack. It uses the KDE/Qt library to provide a series of graphical Bluetoot
The Linux static library ends with. A. There are two methods to connect to the static library. One is to add the library path/Library name directly at the end of the compilation command. For example, your library is under the absolute directory/lib/libtest..You can compile$ (CC) $ (cflags) $ ^-o $ @/lib/libtest.
Another method is to use-L to specify the database name.For example, if the library name is libtest. A,-ltest is used.
Cross_compile = arm-Linux-uclibc-Cc = $ (cross_compile) GCCExec =
keywords: bluetooth bluez A2DP, SINK, Sink_connect, Sink_disconnect, Sink_suspend, Sink_resume ,sink_is_connected, Sink_get_properties, AUDIO, DBUSversion: Based on android4.2 previous version BlueZKernel: linux/linux3.08System: android/android4.1.3.4xubin341719 (Welcome reprint, please specify the author, please respect copyright thank you)Welcome to correct mistakes, common learning, common progress!!Android Bluetooth Introduction (a): Basic concept
software part of the knowledge1.Android Bluetooth Architecture bluetooth® Code Architecture1.1 Serial Port DriverLinux kernel bluetooth driver, Linux kernel's Bluetooth protocol layerAdapter for 1.2BlueZ(1) Kernel code: consists of driver and BlueZ core protocolDrivers: implemented in the kernel source code Kernel/driver/bluetooth (including Linuxkernel for various interfaces) include: Usbdriver, USB driver and Otherdriver.Bluetooth protocol: Impleme
Linux side Bluetooth debugging
@ (embedded) [BLE, BLE]
Graduated for most of the year has been engaged in BLE peripherals development, found that Linux can use BlueZ bluetooth development, more convenient is, there is a Python module on the BlueZ interface encapsulation, called BLUEPY, to develop testing to bring more convenience. Get Install
Development platform Ubunt 14.04
$ sudo apt-get install git bui
Linux, a bluetooth device driver is a network device that uses network interfaces.
Android's Bluetooth protocol stack uses bluez to support application specifications such as gap, SDP, and RFCOMM, and has obtained sig certification. Since bluez uses GPL authorization, the android framework uses D-BUS IPC to interact with bluez's user space code to avoid unauthorized code.
Some Bluetooth header files:Includ
Taking hci_ldisc.c as an example, we will sort out the line procedure registration process in the kernel. Our n_hci registration process is as follows: Bluetooth/hci_ldisc.c module_init (hci_uart_init) // callback a series of callback Drivers/tty/commandid (INT disc, struct tty_ldisc_ops * new_ldisc) tty_ldiscs [Disc] = new_ldisc; // operation of the line procedure, save to Global Array
New_ldisc-> num = disc;New_ldisc-> refcount = 0; in this way, you can set this procedure by calling the ioctl
Http://source.android.com/projects/bluetooth-featuresBluetooth features by release
Android 2.0
2.1 release (eclair)
Java API features
Bluetooth on/off
Device discovery
RFCOMM server and client sockets
Automatic RFCOMM channel lookup and SDP record advertisement via SDPUUID
Supports most RFCOMM use-cases, including peer-to-peer communicationAnd Gaming
See http://developer.android.com/reference/android/bluetooth/package-summary.html For the latest javadoc.
Platform features
Based on
bluetooth/sys/class/rfkill/rfkill0/state # rfkill file has bluetooth permission
Chown bluetooth/sys/class/rfkill/rfkill0/type
# BCM # bccmd is mainly used to initialize Bluetooth, such as power-on, set the baud rate, and download firmware ......
# For details, refer to the brcm_patchram_plus.c file for detailed instructions.
Service hciattach/system/bin/brcm_patchram_plus -- enable_hci -- scopcm = \
-- Baudrate 3000000 -- patchram/etc/firmware/bcm4330.hcd -- enable_lpm -- tosleep = 5000 -- cre
) Power part: Power control.Third, the software part of the knowledge1.Android Bluetooth Architecture bluetooth® Code Architecture1.1 Serial Port DriverLinux kernel bluetooth driver, Linux kernel's Bluetooth protocol layerAdapter for 1.2BlueZ(1) Kernel code: consists of driver and BlueZ core protocolDrivers: In fact, the kernel source code Kernel/driver/bluetooth (including Linuxkernel for various interfaces) includes: Usbdriver, USB driver and Otherd
Recently engaged in Bluetooth, oneself find the example on the Internet to try to compile, encountered some pits in the middle, recorded a bit:#include Header file:#include You need to download two files from the following URLs:http://www.bluez.org/download/650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7E/86/wKiom1cDYCCQMGSDAACnUakPPUU328.png "title=" Untitled. png "alt=" Wkiom1cdyccqmgsdaacnuakppuu328.png "/>Where the header file is in the Blue
1. Activating the device
The first thing to have is a Bluetooth adapter, which, needless to say, is typically a USB interface type.
Lsusb View the Bluetooth devices connected in the system
hciconfig View the details of the device
Hciconfig hci0 up to activate the device
2. Configure BlueZ
Configuration file is located in directory/etc/bluetooth 3. Bluetooth Services
/etc/rc.d/init.d/bluetooth Stop
/etc/rc.d/init.d/bluetoot
subtraction and logical operations. Its declaration is as follows:The difference between these two sets of functions is that the first group returns the value before the update, and the second group returns the updated value. Note: type can be an int of type 1,2,4 or 8 byte length, i.e.:int8_t/uint8_tint16_t/uint16_tint32_t/uint32_tint64_t/uint64_tthese two sets of functions are followed by an extensible parameter (...). Used to indicate which variables require memory barrier, because the curre
Linux does not recognize Bluetooth adapter solutions
Bluetooth adapter (USB): Wins for UDC-321Linux 2.6.29First check to see if USB is recognized:#lsusbBus 005 Device 004:id 0402:5602 ALi Corp., Camera ControllerBus 005 Device 003:id 05e3:0718 Genesys Logic, Inc.Bus 005 Device 001:id 1d6b:0002 Linux Foundation 2.0 root HubBus 001 Device 015:id 0a12:0001 Cambridge Silicon Radio, Ltd. Bluetooth dongle (HCI mode)Bus 001 Device 001:id 1d6b:0001 Linux Foundation 1.1 root HubBus 002 Device 002:id 046d
http://blog.csdn.net/gotowu/article/details/46687633
1, the first to do BlueZ protocol stack transplant, so in the Development Board can be used Hciconfig, Hcitool and other commands. About the BlueZ protocol stack porting steps online a lot.
2, the drive is USB Bluetooth device driver, analysis according to the sequence of Bluetooth-driven write. Because only to do the transmission of data, so speak for
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.