Implementation of inquiry in Linux bluez

Source: Internet
Author: User

The author's blog address: http://blog.sina.com.cn/samzhen1977
By Sam (zhufeng)
Sam_code@hotmail.com

 

 

We have discussed how to use IOCTL to send HCI command. But HCI
Protocol also has some commands, such as inquiry, which do not need to be sent using IOCTL. Bluez
Support is provided directly, although they are all implemented in the same way.

In the ApplicationProgramMedium:
Hci_inquiry (dev_id, length, num_rsp, null, & info,
Flags );
The following figure shows how to include the bluez header file:
# Include // btproto_hci
# Include // struct hci_dev_info
# Include // hci_devid ()
# Include // L2CAP
# Include // hidp

Hci_inquiry () is implemented in bluez-Lib-xxx/lib/src/HCI. C.
Haha, I found that it was actually used:
IOCTL (DD, hciinquiry, (unsigned long) BUF );
In this way, it corresponds to the previous article. All HCI commands are finally sent using IOCTL.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.