[Bluetooth (SDK)] the status of the Bluetooth protocol stack

Source: Internet
Author: User
At startup, it takes some time to fully load and initialize the Bluetooth protocol stack. You can use bth_namedevent_stack_inited to check the protocol stack initialization, which is defined in % _ winceroot %/public/common/SDK/INC/bt_api.h. To open this naming event, you must use OpeneventFunction.
// Determine whether the Protocol Stack has bool fstackup initialized = false; For (INT I = 0; I <100; ++ I) {handle hbthstackinited = openevent (event_all_access, false, response); If (hbthstackinited) {DWORD dwres = waitforsingleobject (response, infinite); closehandle (hbthstackinited); If (wait_object_0 = dwres) {fstackup = true; break ;}} sleep (1000);} If (! Fstackup) {// error handling}

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.