الزامات HCI

رابط کنترل‌کننده میزبان (HCI) برای تعامل با یک کنترل‌کننده بلوتوث استفاده می‌شود.

این سند فهرستی از الزامات HCI بلوتوث (BT) و بلوتوث کم‌مصرف (BLE) را ارائه می‌دهد. هدف این است که فروشندگان پشته BT میزبان و فروشندگان کنترل‌کننده BT، برای استفاده از مجموعه ویژگی‌های شرح داده شده در زیر، این الزامات پلتفرم را رعایت کنند.

این سند به مشخصات بلوتوث Core 5.2 به عنوان «مشخصات» اشاره می‌کند. مشخصات بلوتوث Core 5.2 به همراه سایر اسناد مصوب در وب‌سایت Bluetooth SIG موجود است.

نمای کلی طراحی

قابلیت‌ها و پیکربندی تراشه

اندروید به عنوان یک پلتفرم باز، ماتریسی از نسخه‌های نرم‌افزاری، تولیدکنندگان اصلی تجهیزات (OEM)، فروشندگان و قابلیت‌های پلتفرم و تراشه دارد.

برای مدیریت چشم‌انداز متغیر و مدیریت مهاجرت‌ها، فلسفه طراحی‌ای که به کنترل‌کننده‌های BT اجازه می‌دهد قابلیت‌های خود را (فراتر از مشخصات استاندارد Bluetooth Core 5.2) در معرض نمایش قرار دهند، در این سند شرح داده شده است. سپس پشته BT میزبان می‌تواند از این قابلیت‌ها برای تعیین اینکه کدام ویژگی‌ها را فعال کند، استفاده کند.

پشتیبانی از استانداردهای باز

یکی از اهداف اندروید، پشتیبانی از استانداردهای باز پس از تصویب در مشخصات بلوتوث است. اگر یکی از ویژگی‌های شرح داده شده در زیر در روش‌های استاندارد HCI در مشخصات بلوتوث آینده در دسترس قرار گیرد، ما به سمت پیش‌فرض کردن آن رویکرد متمایل خواهیم شد.

قابلیت‌های خاص فروشنده

Vendor-specific command: LE_Get_Vendor_Capabilities_Command

فیلد فرمان OpCode (OCF): 0x153

پارامتر فرمان اندازه هدف
نه لیست پارامترهای دستور خالی

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
max_advt_instances
(منسوخ شده)
۱ اکتت تعداد نمونه‌های تبلیغاتی پشتیبانی شده

پس از نسخه ۰.۹۸ رزرو شده است.
این پارامتر در مشخصات ویژگی گوگل نسخه ۰.۹۸ و بالاتر به نفع تبلیغات گسترده LE موجود در مشخصات BT نسخه ۵.۰ و بالاتر منسوخ شده است.
offloaded_resolution_of_private-address
(منسوخ شده)
۱ اکتت قابلیت تراشه BT در RPA.
اگر توسط یک تراشه پشتیبانی شود، نیاز به فعال‌سازی توسط میزبان دارد.
۰ = ناتوان
۱ = توانمند

پس از نسخه ۰.۹۸ رزرو شده است.
این پارامتر در مشخصات ویژگی گوگل نسخه ۰.۹۸ و بالاتر به نفع ویژگی حریم خصوصی موجود در مشخصات BT نسخه ۴.۲ و بالاتر منسوخ شده است.
total_scan_results_storage ۲ اکتت ذخیره سازی نتایج اسکن بر حسب بایت
max_irk_list_sz ۱ اکتت تعداد ورودی‌های IRK پشتیبانی‌شده در میان‌افزار
filtering_support ۱ اکتت پشتیبانی از فیلترینگ در کنترلر
0 = پشتیبانی نمی‌شود
۱ = پشتیبانی شده
max_filter ۱ اکتت تعداد فیلترهای پشتیبانی شده
activity_energy_info_support ۱ اکتت پشتیبانی از گزارش فعالیت و اطلاعات انرژی
۰ = ناتوان
۱ = توانمند
version_supported ۲ اکتت نسخه‌ای از مشخصات ویژگی گوگل که پشتیبانی می‌شود را مشخص می‌کند.
بایت[0] = عدد اصلی
بایت[1] = عدد جزئی

نسخه ۱.۰۵
بایت[0] = 0x01
بایت[1] = 0x05

امکانات اضافه شده در نسخه‌های بعدی:
نسخه ۱.۰۵:
  • iso_link_feedback_support
  • BQRv7
  • sniff_offload_support
نسخه ۱.۰۴:
  • BQRv6
total_num_of_advt_tracked ۲ اکتت تعداد کل تبلیغ‌کنندگان ردیابی‌شده برای اهداف OnLost / OnFound
extended_scan_support ۱ اکتت پشتیبانی از پنجره اسکن گسترده و فاصله زمانی
debug_logging_supported ۱ اکتت پشتیبانی از ثبت اطلاعات اشکال‌زدایی دودویی از کنترلر
LE_address_generation_offloading_support
(منسوخ شده)
۱ اکتت 0 = پشتیبانی نمی‌شود
۱ = پشتیبانی شده

پس از نسخه ۰.۹۸ رزرو شده است.
این پارامتر در مشخصات ویژگی گوگل نسخه ۰.۹۸ و بالاتر به نفع ویژگی حریم خصوصی موجود در مشخصات BT نسخه ۴.۲ و بالاتر منسوخ شده است.
A2DP_source_offload_capability_mask ۴ اکتت Bit masks for codec types supported
بیت ۰ - SBC
بیت ۱ - AAC
بیت ۲ - APTX
بیت ۳ - APTX HD
بیت ۴ - LDAC
بیت‌های ۵ تا ۳۱ رزرو شده‌اند
bluetooth_quality_report_support ۱ اکتت پشتیبانی از گزارش رویدادهای کیفیت بلوتوث
۰ = ناتوان
۱ = توانمند
dynamic_audio_buffer_support ۴ اکتت پشتیبانی از بافر صوتی پویا در کنترلر بلوتوث
ماسک‌های بیتی برای انواع کدک پشتیبانی می‌شوند
بیت ۰ - SBC
بیت ۱ - AAC
بیت ۲ - APTX
بیت ۳ - APTX HD
بیت ۴ - LDAC
بیت‌های ۵ تا ۳۱ رزرو شده‌اند
a2dp_offload_v2_support ۱ اکتت پشتیبانی از دستورات A2DP offload v2 در کنترلر بلوتوث (به Start A2DP offload و Stop A2DP offload مراجعه کنید)
0 = پشتیبانی نمی‌شود
۱ = پشتیبانی شده
iso_link_feedback_support ۱ اکتت پشتیبانی از رویداد بازخورد لینک ISO
0 = پشتیبانی نمی‌شود
۱ = پشتیبانی شده
sniff_offload_support ۱ اکتت پشتیبانی از دستورات Sniff Offload در یک کنترلر بلوتوث
0 = پشتیبانی نمی‌شود
۱ = پشتیبانی شده

نتایج اسکن دسته‌ای

هدف از طراحی، بهبود نحوه‌ی ارسال اعلان‌های رویداد Bluetooth LE Scan Response به میزبان است تا در مصرف انرژی میزبان صرفه‌جویی شود.

با کاهش تعداد دفعاتی که کنترلر به پردازنده برنامه میزبان برای اسکن نتایج اطلاع می‌دهد، پردازنده برنامه میزبان می‌تواند مدت بیشتری در حالت بیکاری/خواب بماند. این امر مصرف برق در میزبان را کاهش می‌دهد. پارامتر برگشتی total_scan_results_storage از LE_Get_Vendor_Capabilities_Command نشان‌دهنده قابلیت تراشه برای ذخیره نتایج اسکن است.

این ویژگی بر مدیریت و پیکربندی محل ذخیره‌سازی نتایج اسکن LE در کنترلر بلوتوث تمرکز دارد. این فضای ذخیره‌سازی برای دسته‌بندی موقت داده‌های تبلیغاتی و اسکن داده‌ها و فراداده‌هایی که توسط کنترلر دریافت می‌شوند، برای تحویل بعدی به میزبان استفاده می‌شود.

میان‌افزار باید از دو نوع دسته‌بندی پشتیبانی کند که می‌توانند همزمان فعال شوند:

  • کوتاه شده. شامل عناصر اطلاعاتی زیر است: {MAC، TX Power، RSSI، Timestamp}
  • کامل. شامل عناصر اطلاعاتی زیر است: {MAC، TX Power، RSSI، Timestamp، Adv Data، Scan Response}

دستور اسکن دسته‌ای LE

او سی اف: 0x156

پارامتر فرمان اندازه هدف
Batch_Scan_opcode ۱ اکتت 0x1 - فعال کردن ویژگی خاص مشتری
0x2 - تنظیم پارامترهای ذخیره‌سازی اسکن دسته‌ای
0x3 - تنظیم پارامترهای اسکن دسته‌ای
0x4 - پارامترهای نتیجه اسکن دسته‌ای را بخوانید

یک رویداد Command Complete برای این دستور ایجاد می‌شود. فعال کردن ویژگی مخصوص مشتری، اسکن را شروع نمی‌کند.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Batch_Scan_opcode ۱ اکتت 0x1 - فعال کردن ویژگی خاص مشتری
0x2 - تنظیم پارامترهای ذخیره‌سازی اسکن دسته‌ای
0x3 - تنظیم پارامترهای اسکن دسته‌ای
0x4 - پارامترهای نتیجه اسکن دسته‌ای را بخوانید

LE_Batch_Scan_Command: فعال کردن ویژگی خاص مشتری

زیر OCF: 0x01

پارامتر زیردستور اندازه هدف
enable_customer_specific_feature_set ۱ اکتت 0x01 - فعال کردن قابلیت اسکن دسته‌ای
0x00 - غیرفعال کردن قابلیت اسکن دسته‌ای

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Batch_Scan_opcode ۱ اکتت 0x1 - فعال کردن ویژگی خاص مشتری
0x2 - تنظیم پارامترهای ذخیره‌سازی اسکن دسته‌ای
0x3 - تنظیم پارامترهای اسکن دسته‌ای
0x4 - پارامترهای نتیجه اسکن دسته‌ای را بخوانید

دستور LE_Batch_Scan_Command: تنظیم پارامتر ذخیره‌سازی اسکن دسته‌ای با دستور فرعی

زیر OCF: 0x02

پارامتر زیردستور اندازه هدف
Batch_Scan_Full_Max ۱ اکتت حداکثر فضای ذخیره‌سازی (به درصد) اختصاص داده شده به کل سبک
[محدوده: 0-100]
Batch_Scan_Truncated_Max ۱ اکتت حداکثر فضای ذخیره‌سازی (به درصد) اختصاص داده شده به سبک کوتاه شده
[محدوده: 0-100]
Batch_Scan_Notify_Threshold ۱ اکتت سطح اعلان (به درصد) را برای هر مخزن ذخیره‌سازی جداگانه تنظیم کنید
[محدوده: 0-100]
تنظیم روی ۰، اعلان را غیرفعال می‌کند. رویداد HCI مختص فروشنده ایجاد می‌شود (رویداد فرعی نقض آستانه ذخیره‌سازی)

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Batch_scan_opcode ۱ اکتت 0x02 [تنظیم پارامترهای اسکن دسته‌ای]

دستور LE_Batch_Scan_Command: تنظیم زیردستور پارامتر اسکن دسته‌ای

زیر OCF: 0x03

پارامتر زیردستور اندازه هدف
Batch_Scan_Mode ۱ اکتت 0x00 – اسکن دسته‌ای غیرفعال است
0x01 - حالت کوتاه شده فعال است
0x02 - حالت کامل فعال است
0x03 - حالت‌های کوتاه‌شده و کامل فعال هستند
Duty_cycle_scan_window ۴ اکتت زمان اسکن دسته‌ای (تعداد اسلات‌ها)
Duty_cyle_scan_interval ۴ اکتت دوره زمانی اسکن دسته‌ای (تعداد اسلات)
own_address_type ۱ اکتت 0x00 - آدرس عمومی دستگاه
0x01 - آدرس تصادفی دستگاه
Batch_scan_Discard_Rule ۱ اکتت 0 - قدیمی‌ترین تبلیغ را کنار بگذارید
۱ - تبلیغاتی که RSSI ضعیف‌تری دارند را کنار بگذارید

این زیردستور، در صورت فعال بودن، اسکن دسته‌ای را آغاز می‌کند. در اسکن ناقص، نتایج به صورت ناقص ذخیره می‌شوند که در آن کلید منحصر به فرد برای سبک ناقص = { BD_ADDR, scan_interval} است. این بدان معناست که فقط یک BD_ADDR will . رکوردی که برای حالت ناقص نگه داشته می‌شود به شرح زیر است: { BD_ADDR , Tx Power, RSSI, Timestamp}

وقتی حالت کامل (Full mode) فعال باشد، از اسکن فعال استفاده می‌شود و پاسخ‌های اسکن ثبت می‌شوند. کلید منحصر به فرد در حالت کامل (Full style) = {MAC, Ad packet}، صرف نظر از فاصله اسکن. رکوردی که برای حالت کامل نگه داشته می‌شود { BD_ADDR , Tx Power, RSSI, Timestamp, Ad packet, Scan Response} است. در حالت کامل، یک بسته AD مشابه، وقتی چندین بار در فواصل اسکن مختلف مشاهده شود، فقط یک بار ثبت می‌شود. با این حال، در حالت کوتاه (Truncated mode)، میزان مشاهده BA_ADDR در فواصل اسکن مختلف مورد توجه است (یک بار در هر فاصله اسکن). RSSI مقدار میانگین تمام تکرارهای یک تبلیغ منحصر به فرد در یک فاصله اسکن است.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Batch_scan_opcode ۱ اکتت 0x03 [تنظیم پارامترهای اسکن دسته‌ای]

LE_Batch_Scan_Command: زیردستور خواندن نتایج اسکن دسته‌ای

زیر OCF: 0x04

پارامتر زیردستور اندازه هدف
Batch_Scan_Data_read ۱ اکتت 0x01 - داده‌های حالت کوتاه‌شده
0x02 - داده در حالت کامل

یک رویداد Command Complete برای این دستور ایجاد می‌شود. وقتی میزبان این دستور را صادر می‌کند، ممکن است تمام نتایج در کنترلر در یک رویداد Command Complete جا نشوند. میزبان صدور این دستور را تا زمانی که نتایج مربوطه در رویداد Command Complete تعداد رکوردها را 0 نشان دهند، تکرار می‌کند، که نشان می‌دهد کنترلر رکورد دیگری برای ارتباط با میزبان ندارد. هر رویداد Command Complete می‌تواند شامل چندین رکورد از فقط یک نوع داده (کامل یا ناقص) باشد.

مرجع‌های زمانی کنترلر و میزبان همگام‌سازی نمی‌شوند. واحد مهر زمانی ۵۰ میلی‌ثانیه است. مقدار مهر زمانی بر اساس زمانی است که Read_Batch_Scan_Results_Sub_cmd توسط میزبان داده می‌شود. اگر زمان رسیدن یک دستور در میان‌افزار T_c باشد، زمان واقعی دریافت مهر زمانی در میان‌افزار T_fw است. زمان گزارش‌دهی: ( T_c - T_fw ) خواهد بود. T_c و T_fw در حوزه زمان میان‌افزار هستند. این به میزبان اجازه می‌دهد محاسبه کند که این رویداد چند وقت پیش اتفاق افتاده است.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Batch_scan_opcode ۱ اکتت 0x03 [تنظیم پارامترهای اسکن دسته‌ای]
Batch_Scan_data_read ۱ اکتت قالب (کوتاه یا کامل) را مشخص می‌کند
num_of_records ۱ اکتت تعداد رکوردهای Batch_Scan_data_read
format_of_data متغیر حالت کوتاه شده:
آدرس[0]: 6 اکتت
نوع_آدرس[0]: 1 اکتت
Tx_Pwr[0]: 1 اکتت
RSSI[0] : 1 اکتت
مهر زمان[0]: 2 اکتت
[چندین رکورد ( num_of_records ) با فرمت بالا]

حالت کامل:
آدرس[0]: 6 اکتت
نوع_آدرس[0]: 1 اکتت
Tx_Pwr[0]: 1 اکتت
RSSI[0]: 1 اکتت
مهر زمان[0]: 2 اکتت
بسته پیشرفته_len[0]: 1 اکتت
بسته‌ی پیشرفته[0]: هشت‌تایی‌های بسته‌ی پیشرفته
Scan_data_resp_len[0]: 1 octet
Scan_data_resp[0]: هشت‌تایی‌های Scan_data_resp
[چندین رکورد با فرمت بالا ( num_of_records )]

فیلتر محتوای بسته‌های تبلیغاتی

از این برای فعال/غیرفعال کردن/تنظیم فیلتر محتوای بسته‌های تبلیغاتی (APCF) در کنترلر استفاده کنید. APCF گزارش‌های تبلیغاتی را در کنترلر فیلتر می‌کند اما تبلیغات دوره‌ای را فیلتر نمی‌کند.

دستور LE_APCF

OCF: 0x157

پارامتر فرمان اندازه هدف
APCF_opcode ۱ اکتت 0x00 - فعال کردن APCF
0x01 - تنظیم پارامترهای فیلتر APCF
0x02 - آدرس پخش کننده APCF
0x03 - شناسه کاربری سرویس APCF
0x04 - شناسه کاربری (UUID) درخواست خدمات APCF
0x05 - نام محلی APCF
0x06 - داده‌های سازنده APCF
0x07 - داده‌های سرویس APCF
0x08 - سرویس کشف حمل و نقل APCF
0x09 - فیلتر نوع APCF AD
0x10 ~ 0xAF - برای استفاده‌های بعدی رزرو شده است
0xB0 ~ 0xDF - برای فروشنده رزرو شده است
0xE0 ~ 0xFE - برای استفاده‌های بعدی رزرو شده است
0xFF - ویژگی‌های پیشرفته APCF برای خواندن

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت بازگشت
APCF_opcode ۱ اکتت 0x00 - فعال کردن APCF
0x01 - تنظیم پارامترهای فیلتر APCF
0x02 - آدرس پخش کننده APCF
0x03 - شناسه کاربری سرویس APCF
0x04 - شناسه کاربری (UUID) درخواست خدمات APCF
0x05 - نام محلی APCF
0x06 - داده‌های سازنده APCF
0x07 - داده‌های سرویس APCF
0x08 - سرویس کشف حمل و نقل APCF
0x09 - فیلتر نوع APCF AD
0x10 ~ 0xAF - برای استفاده‌های بعدی رزرو شده است
0xB0 ~ 0xDF - برای فروشنده رزرو شده است
0xE0 ~ 0xFE - برای استفاده‌های بعدی رزرو شده است
0xFF - ویژگی‌های پیشرفته APCF برای خواندن

دستور LE_APCF: فعال‌سازی_sub_cmd

زیر OCF: 0x00

پارامتر زیردستور اندازه هدف
APCF_enable ۱ اکتت 0x01 - فعال کردن ویژگی APCF
0x00 - غیرفعال کردن ویژگی APCF

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x0 - فعال کردن APCF
APCF_Enable ۱ اکتت فعال/غیرفعال کردن از طریق APCF_enable تنظیم می‌شود.

دستور LE_APCF: set_filtering_parameters_sub_cmd

این زیردستور برای اضافه کردن یا حذف مشخصات فیلتر یا پاک کردن لیست فیلتر برای فیلترینگ درون تراشه‌ای استفاده می‌شود.

زیر OCF: 0x01

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
دستور Delete، فیلتر خاص را به همراه ورودی‌های ویژگی مرتبط در جداول دیگر پاک می‌کند.
دستور Clear تمام فیلترها و ورودی‌های مرتبط در جداول دیگر را پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter-1 )
APCF_Feature_Selection ۲ اکتت ماسک‌های بیتی برای ویژگی‌های انتخاب‌شده:
بیت ۰: برای فعال کردن فیلتر آدرس پخش تنظیم کنید
بیت ۱: برای فعال کردن فیلتر تغییر داده‌های سرویس تنظیم کنید.
بیت ۲: تنظیم برای فعال کردن بررسی شناسه کاربری سرویس (Service UUID)
بیت ۳: برای فعال کردن بررسی UUID درخواست خدمات تنظیم کنید.
بیت ۴: تنظیم برای فعال کردن بررسی نام محلی
بیت ۵: برای فعال کردن بررسی داده‌های سازنده تنظیم کنید
بیت ۶: برای فعال کردن بررسی داده‌های سرویس تنظیم کنید
بیت ۷: برای فعال کردن بررسی سرویس کشف انتقال تنظیم کنید
Bit 8: Set to enable AD Type Check
APCF_List_Logic_Type ۲ اکتت عملیات منطقی برای هر انتخاب ویژگی (به ازای هر موقعیت بیت) مشخص شده در APCF_Feature_Selection .
فقط زمانی معتبر است که یک ویژگی فعال باشد.
مقدار موقعیت بیت:
۰: یا
۱: و
اگر منطق "AND" انتخاب شود، یک بسته ADV تنها در صورتی از فیلتر عبور می‌کند که حاوی تمام ورودی‌های موجود در لیست باشد.
اگر منطق "OR" انتخاب شود، یک بسته ADV در صورتی که حاوی هر یک از ورودی‌های موجود در لیست باشد، از فیلتر عبور خواهد کرد.
APCF_Filter_Logic_Type ۱ اکتت 0x00: یا
0x01: و
نکته: نوع منطق برای سه فیلد اول APCF_Feature_Selection ناموجود است، که همیشه منطق "AND" است. آنها فقط برای (بیت 3 - بیت 6) چهار فیلد APCF_Feature_Selection قابل اجرا هستند.
rssi_high_thresh ۱ اکتت [بر حسب دسی‌بل متر]
تبلیغ‌کننده تنها در صورتی دیده شده در نظر گرفته می‌شود که سیگنال بالاتر از آستانه بالای RSSI باشد. در غیر این صورت، سیستم عامل باید طوری رفتار کند که گویی هرگز آن را ندیده است.
delivery_mode ۱ اکتت 0x00 - immediate
0x01 - on_found
0x02 - batched
onfound_timeout ۲ اکتت فقط در صورتی معتبر است که delivery_mode on_found باشد.
[به میلی ثانیه]
وقت آن است که سیستم عامل قبل از گزارش، کمی صبر کند و تبلیغات اضافی را جمع‌آوری کند.
onfound_timeout_cnt ۱ اکتت فقط در صورتی معتبر است که delivery_mode on_found باشد.
[تعداد]
اگر یک تبلیغ در onFound به مدت زمان onfound_timeout در میان‌افزار باقی بماند، چند تبلیغ جمع‌آوری شده و تعداد آنها بررسی می‌شود. اگر تعداد از onfound_timeout_cnt بیشتر شود، بلافاصله پس از آن به OnFound گزارش می‌شود.
rssi_low_thresh ۱ اکتت فقط در صورتی معتبر است که delivery_mode on_found باشد.
[بر حسب دسی‌بل متر]
اگر RSSI بسته دریافتی بالاتر از آستانه پایین RSSI نباشد، بسته تبلیغ‌کننده دیده نشده در نظر گرفته می‌شود.
onlost_timeout ۲ اکتت فقط در صورتی معتبر است که delivery_mode on_found باشد.
[به میلی ثانیه]
اگر یک تبلیغ، پس از پیدا شدن، به طور مداوم در دوره lost_timeout دیده نشود، بلافاصله گزارش گم شدن آن داده می‌شود.
num_of_tracking_entries 2 octets فقط در صورتی معتبر است که delivery_mode on_found باشد.
[تعداد]
تعداد کل تبلیغ‌کنندگان برای ردیابی در هر فیلتر.

مقادیر RSSI باید از مکمل ۲ برای نمایش مقادیر منفی استفاده کنند.

میزبان باید بتواند چندین فیلتر را با تنظیم APCF_Application_Address_type روی 0x02 (برای همه آدرس‌های پخش‌کننده) پیکربندی کند تا ترکیب‌های مختلف فیلتر را مدیریت کند.

فیلتر کردن، دسته بندی و گزارش‌دهی مفاهیم مرتبط با هم هستند. هر تبلیغ و پاسخ اسکن مرتبط باید از تمام فیلترها، یکی پس از دیگری، عبور کند. بنابراین، اقدامات حاصل ( delivery_mode ) ارتباط نزدیکی با فیلتر کردن دارند. حالت‌های تحویل عبارتند از: report_immediately ، batch و onFound . مقدار OnLost به OnFound مرتبط است به این معنا که هنگام گم شدن، بعد از OnFound می‌آید.

این جریان پردازش، مدل مفهومی را نشان می‌دهد:

وقتی یک فریم تبلیغ (یا پاسخ اسکن) دریافت می‌شود، به ترتیب سریال روی همه فیلترها اعمال می‌شود. این امکان وجود دارد که یک تبلیغ بتواند باعث گزارش فوری بر اساس یک فیلتر و دسته‌بندی همان فیلتر به دلیل عملکرد فیلتر متفاوت شود.

آستانه‌های سطح RSSI (بالا و پایین) امکان کنترل زمان قابل مشاهده بودن فریم برای پردازش فیلتر را فراهم می‌کنند، حتی زمانی که یک بسته معتبر توسط کنترل‌کننده دریافت می‌شود. در صورت تنظیم حالت تحویل روی فوری یا دسته‌ای، RSSI یک فریم برای پردازش بیشتر کنترل‌کننده در نظر گرفته می‌شود. برنامه‌های مختلف به رفتار گزارش‌دهی و دسته‌بندی متفاوتی نیاز دارند. این امر به چندین برنامه اجازه می‌دهد تا گزارش‌دهی مستقیم و/یا دسته‌بندی نتایج را در میان‌افزار، به طور همزمان داشته باشند. به عنوان مثال، موردی است که یک اسکن دسته‌ای از یک برنامه فعال است و بعداً یک اسکن LE معمولی توسط برنامه دیگری صادر می‌شود. قبل از صدور اسکن دسته‌ای، چارچوب/برنامه فیلترهای مناسبی را تنظیم می‌کند. بعداً، هنگامی که برنامه دوم یک اسکن معمولی صادر می‌کند، دسته‌بندی قبلی ادامه می‌یابد. با این حال، به دلیل اسکن معمولی، از نظر مفهومی شبیه به اضافه کردن یک فیلتر تهی (همراه با تمام فیلترهای موجود) به همراه دستور اسکن LE است. پارامترهای دستور اسکن LE هنگام فعال بودن اولویت دارند. هنگامی که اسکن معمولی LE غیرفعال است، کنترل‌کننده به اسکن دسته‌ای قبلی، در صورت وجود، برمی‌گردد.

حالت تحویل OnFound مبتنی بر فیلترهای پیکربندی شده است. ترکیبی که باعث موفقیت‌آمیز بودن عملکرد یک فیلتر می‌شود، به عنوان موجودیتی برای ردیابی onLost در نظر گرفته می‌شود. رویداد مربوطه، زیررویداد ردیابی LE Advt است.

گذار OnFound/OnLost برای یک فیلتر (در صورت فعال بودن) به شکل زیر خواهد بود:

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x01 - تنظیم پارامترهای فیلتر APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های موجود در جدول فیلترها

دستور LE_APCF: broadcast_address_sub_cmd

این زیردستور برای اضافه کردن یا حذف یک آدرس تبلیغ‌کننده یا پاک کردن لیست آدرس‌های تبلیغ‌کننده برای فیلترینگ درون تراشه‌ای استفاده می‌شود.

زیر OCF: 0x02

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
حذف، آدرس پخش‌کننده‌ی مشخص‌شده را در فیلتر مشخص‌شده حذف می‌کند.
پاک کردن، تمام آدرس‌های پخش‌کننده را در فیلتر مشخص‌شده پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter-1 )
APCF_Broadcaster_Address ۶ اکتت آدرس دستگاه ۶ بایتی برای اضافه کردن یا حذف کردن از لیست آدرس‌های پخش‌کننده
APCF_Application_Address_type ۱ اکتت 0x00: عمومی
0x01: تصادفی
0x02: NA (نوع آدرس را نادیده بگیرید)
برای فیلتر کردن گزارش‌های تبلیغاتی با انواع آدرس‌های هویت (0x02، 0x03). برای دریافت گزارش‌های تبلیغاتی با انواع آدرس‌های 0x02 و 0x03، این فیلد را روی 0x02:NA تنظیم کنید (نوع آدرس را نادیده بگیرید).

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x02 - آدرس پخش کننده APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول آدرس‌های پخش موجود است

دستور LE_APCF: service_uuid_sub_cmd

این زیردستور برای اضافه کردن یا حذف کردن یک UUID سرویس یا پاک کردن لیست UUID سرویس برای فیلترینگ درون تراشه‌ای استفاده می‌شود.

زیر OCF: 0x03

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
دستور Delete آدرس UUID سرویس مشخص شده را در فیلتر مشخص شده حذف می‌کند.
دستور Clear تمام UUIDهای سرویس موجود در فیلتر مشخص شده را پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_UUID ۲،۴،۱۶ اکتت شناسه کاربری سرویس (UUID) (16 بیتی، 32 بیتی یا 128 بیتی) برای اضافه کردن به لیست یا حذف از آن.
APCF_UUID_MASK ۲،۴،۱۶ اکتت ماسک UUID سرویس (۱۶ بیتی، ۳۲ بیتی یا ۱۲۸ بیتی) که باید به لیست اضافه شود. باید طولی مشابه APCF_UUID.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x03 - شناسه کاربری سرویس APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول Service UUID موجود هستند

دستور LE_APCF: درخواست_uuid_sub_cmd

این زیردستور برای اضافه کردن یا حذف UUID درخواست یا پاک کردن لیست UUID درخواست برای فیلترینگ روی تراشه استفاده می‌شود.

زیر OCF: 0x04

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
حذف، آدرس UUID درخواست را در فیلتر مشخص شده حذف می‌کند.
پاک کردن، تمام UUID های درخواست را در فیلتر مشخص شده پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_UUID ۲،۴،۱۶ اکتت UUID درخواست (۱۶ بیتی، ۳۲ بیتی یا ۱۲۸ بیتی) برای اضافه کردن یا حذف کردن از لیست.
APCF_UUID_MASK ۲،۴،۱۶ اکتت ماسک UUID درخواست (۱۶ بیتی، ۳۲ بیتی یا ۱۲۸ بیتی) برای اضافه شدن به لیست. طول آن باید با APCF_UUID یکسان باشد.

A Command Complete event will be generated for this command.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x04 - شناسه کاربری (UUID) درخواست APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول UUID درخواست موجود است

دستور LE_APCF: local_name_sub_cmd

این زیردستور برای اضافه کردن یا حذف یک رشته نام محلی یا پاک کردن لیست رشته نام محلی برای فیلترینگ درون تراشه استفاده می‌شود.

زیر OCF: 0x05

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
دستور Delete رشته نام محلی مشخص شده را در فیلتر مشخص شده حذف می‌کند.
دستور Clear تمام رشته‌های نام محلی را در فیلتر مشخص شده پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_LocName_Mandata_or_SerData اندازه متغیر یک رشته کاراکتری برای نام محلی.

یادداشت‌ها:
  • در حال حاضر حداکثر تعداد کاراکترهای موجود در یک رشته نام محلی ۲۹ است.
  • وقتی اکشن "پاک" باشد (0x2) قابل اجرا نیست

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x05 - نام محلی APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول نام‌های محلی موجود است

دستور LE_APCF: manf_data_sub_cmd

این زیردستور برای اضافه کردن یا حذف یک رشته داده سازنده یا پاک کردن لیست رشته داده سازنده برای فیلتر کردن روی تراشه استفاده می‌شود.

زیر OCF: 0x06

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
حذف، رشته داده سازنده مشخص شده را در فیلتر مشخص شده حذف می‌کند.
Clear will clear all the manufacturer data strings in the specified filter.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_LocName_Mandata_or_SerData اندازه متغیر یک رشته کاراکتری برای داده‌های سازنده.

یادداشت‌ها:
  • در حال حاضر حداکثر تعداد کاراکترهای موجود در یک رشته نام محلی ۲۹ است.
  • وقتی اکشن "پاک" باشد (0x2) قابل اجرا نیست
APCF_ManData_Mask اندازه متغیر ماسک داده سازنده که باید به لیست اضافه شود. طول آن باید با APCF_LocName_or_ManData_or_SerData یکسان باشد.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x06 - داده‌های سازنده APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول داده‌های تولیدکننده موجود است

دستور LE_APCF: service_data_sub_cmd

این زیردستور برای اضافه کردن یا حذف یک رشته داده سرویس یا پاک کردن لیست رشته داده سرویس برای فیلترینگ درون تراشه استفاده می‌شود.

زیر OCF: 0x07

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
حذف، رشته داده سرویس مشخص شده را در فیلتر مشخص شده حذف می‌کند.
پاک کردن، تمام رشته‌های داده سرویس را در فیلتر مشخص شده پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_LocName_Mandata_or_SerData اندازه متغیر یک رشته کاراکتری برای داده‌های سرویس.

یادداشت‌ها:
  • در حال حاضر حداکثر تعداد کاراکترهای موجود در یک رشته نام محلی ۲۹ است.
  • وقتی اکشن "پاک" باشد (0x2) قابل اجرا نیست
APCF_LocName_Mandata_or_SerData_Mask اندازه متغیر ماسک داده سرویس که قرار است به لیست اضافه شود. طول آن باید با APCF_LocName_or_ManData_or_SerData.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x07 - داده‌های سرویس APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز برای جدول داده‌های خدمات (Service Data) در دسترس هستند

دستور LE_APCF: ad_type_sub_cmd

این زیردستور برای اضافه کردن یا حذف یک نوع AD یا پاک کردن لیست نوع AD برای فیلترینگ درون تراشه استفاده می‌شود. برای بررسی اینکه آیا این دستور پشتیبانی می‌شود یا خیر read_extended_features_sub_cmd استفاده کنید.
وقتی APCF_AD_DATA_Length برابر با ۰ است، APCF_AD_TYPE بدون مقایسه AD Data و AD Data Mask فیلتر کنید. اگر طول داده بسته ADV دریافتی از AD_DATA_LENGTH بیشتر باشد، فقط اولین بایت‌های AD_DATA_LENGTH از AD Data را مقایسه کنید و داده‌های باقی‌مانده را نادیده بگیرید.

زیر OCF: 0x09

پارامتر زیردستور اندازه هدف
APCF_Action ۱ اکتت 0x00 - اضافه کردن
0x01 - حذف
0x02 - پاک کردن
دستور Delete نوع AD مشخص شده را در فیلتر مشخص شده حذف می‌کند.
پاک کردن، تمام انواع AD را در فیلتر مشخص شده پاک می‌کند.
APCF_Filter_Index ۱ اکتت شاخص فیلتر (0، max_filter -1)
APCF_AD_TYPE ۱ اکتت نوع AD برای اضافه کردن یا حذف کردن از لیست. وقتی APCF_Action برابر با 0x02 (پاک) باشد، نادیده گرفته می‌شود.
APCF_AD_DATA_Length ۱ اکتت 0x00 - به معنی فیلتر نکردن محتوای داده‌ها است.
نادیده گرفتن زمانی که APCF_Action برابر با 0x02 است (پاک)
APCF_AD_DATA اندازه متغیر متغیر-اندازه، بر اساس APCF_AD_DATA_Length
نادیده گرفتن زمانی که APCF_Action برابر با 0x02 است (پاک)
APCF_AD_DATA_MASK اندازه متغیر متغیر-اندازه، بر اساس APCF_AD_DATA_Length
نادیده گرفتن زمانی که APCF_Action برابر با 0x02 است (پاک)
باید طولی مشابه APCF_AD_DATA داشته باشد.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0x09 - نوع AD APCF
APCF_Action ۱ اکتت APCF_Action دستور echo back
APCF_AvailableSpaces ۱ اکتت تعداد ورودی‌های رایگانی که هنوز در جدول AD Type موجود است

دستور LE_APCF: read_extended_features_sub_cmd

این زیردستور برای خواندن ویژگی‌های توسعه‌یافته‌ی APCF استفاده می‌شود.

زیر OCF: 0xFF

پارامتر زیردستور اندازه هدف
قابل اجرا نیست پارامتر دستور خالی.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
APCF_opcode ۱ اکتت 0xFF - APCF_Read_Extended_Features
APCF_extended_features ۲ اکتت

ماسک‌های بیتی برای ویژگی‌های پیشرفته پشتیبانی می‌شوند:

  • بیت ۰: پشتیبانی از فیلتر سرویس کشف انتقال
  • بیت ۱: پشتیبانی از فیلتر نوع AD
  • بیت ۲ ~۱۵: برای استفاده‌های بعدی رزرو شده است

مقدار بیت

  • 0 = پشتیبانی نمی‌شود
  • ۱ = پشتیبانی شده

فعالیت کنترل‌کننده و فرمان اطلاعات انرژی

هدف از این اطلاعات این است که توابع سیستم میزبان سطح بالاتر، فعالیت‌های کلی همه اجزا، از جمله کنترل‌کننده BT و وضعیت ماکروی آن را در ارتباط با آنچه در برنامه‌ها و چارچوب اتفاق می‌افتد، تجزیه و تحلیل کنند. برای انجام این کار، اطلاعات زیر از پشته BT و کنترل‌کننده مورد نیاز است:

  • پشته BT: گزارش وضعیت فعلی عملیات کلان کنترلر
  • میان‌افزار: گزارش فعالیت کلی و اطلاعات انرژی

حالت‌های ماکروی پشته میزبان BT، همانطور که در سطح کاربر تعیین می‌شود:

  • بیکار: [اسکن صفحه، LE advt، اسکن استعلام، اسکن LE]
  • اسکن: [پیج کردن/پرس و جو/تلاش برای اتصال]
  • فعال: [لینک ACL روشن، لینک SCO در حال انجام، حالت بو کشیدن]

فعالیت‌هایی که کنترلر در طول عمر خود ثبت می‌کند عبارتند از زمان تراکنش، زمان دریافت، زمان بیکاری و کل انرژی مصرف شده. این فعالیت‌ها هنگام خواندن از میزبان پاک می‌شوند.

اطلاعات انرژی و فعالیت کنترلر LE_Get_Controller

این یک دستور مخصوص فروشنده است.

او سی اف: 0x159

پارامتر زیردستور اندازه هدف
نه پارامترهای فرمان خالی

A Command Complete event will be generated for this command.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
total_tx_time_ms ۴ اکتت کل زمان انجام تراکنش
total_rx_time_ms ۴ اکتت کل زمان انجام Rx
total_idle_time_ms ۴ اکتت کل زمان در حالت بیکاری (حالت‌های کم‌مصرف غیر از حالت خواب)
total_energy_used ۴ اکتت کل انرژی مصرفی [حاصل ضرب جریان (میلی‌آمپر)، ولتاژ (ولت) و زمان (میلی‌ثانیه)]

دستور اسکن پارامترهای تنظیم‌شده‌ی توسعه‌یافته‌ی LE

این دستور می‌تواند برای فعال کردن یک پنجره اسکن و فاصله زمانی بزرگتر در کنترلر استفاده شود. طبق مشخصات BT Core 5.2، یک پنجره اسکن و فاصله زمانی دارای حد بالایی 10.24 ثانیه هستند که فواصل اسکن فراتر از 10.24 ثانیه را برای برنامه‌ها مختل می‌کند.

مرجع پایه: مشخصات BT Core 5.2، صفحه ۲۴۹۳ (دستور تنظیم پارامترهای اسکن LE)

جریان عبوری: 0x15A

پارامتر فرمان اندازه هدف
LE_Ex_Scan_Type ۱ اکتت 0x00 - اسکن غیرفعال. هیچ بسته SCAN_REQ نباید ارسال شود (پیش‌فرض).
0x01 - اسکن فعال. بسته‌های SCAN_REQ ممکن است ارسال شوند.
LE_Ex_Scan_Interval ۴ اکتت به عنوان فاصله زمانی از زمانی که کنترل‌کننده آخرین اسکن LE خود را شروع کرده تا زمانی که اسکن LE بعدی را شروع می‌کند، تعریف می‌شود.
محدوده: 0x0004 تا 0x00FFFFFF
پیش‌فرض: 0x0010 (10 میلی‌ثانیه)
زمان = N * 0.625 میلی‌ثانیه
محدوده زمانی: ۲.۵ میلی‌ثانیه تا ۱۰۴۴۲.۲۵ ثانیه
LE_Ex_Scan_Window ۴ اکتت مدت زمان اسکن LE. LE_Scan_Window باید کمتر یا مساوی LE_Scan_Interval باشد.
محدوده: 0x0004 تا 0xFFFF
پیش‌فرض: 0x0010 (10 میلی‌ثانیه)
زمان = N * 0.625 میلی‌ثانیه
Time Range: 2.5 ms to 40.95 seconds
Own_Address_Type ۱ اکتت 0x00 - آدرس عمومی دستگاه (پیش‌فرض)
0x01 - آدرس تصادفی دستگاه
LE_Ex_Scan_Filter_Policy 0x00 - همه بسته‌های تبلیغاتی را بپذیرید (پیش‌فرض). بسته‌های تبلیغاتی هدایت‌شده که برای این دستگاه آدرس‌دهی نشده‌اند، نادیده گرفته می‌شوند.
0x01 - بسته‌های تبلیغاتی از دستگاه‌هایی که در فهرست فقط فهرست سفید نیستند، نادیده گرفته می‌شوند. بسته‌های تبلیغاتی هدایت‌شده که برای این دستگاه آدرس‌دهی نشده‌اند، نادیده گرفته می‌شوند.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان

دستور دریافت اطلاعات اشکال‌زدایی کنترلر

هدف از این عنصر اطلاعاتی، دریافت اطلاعات اشکال‌زدایی کنترلر توسط یک میزبان، به صورت دودویی، برای پس‌پردازش و تجزیه و تحلیل است. این امر به اشکال‌زدایی مشکلات میدانی کمک می‌کند و ابزاری را در اختیار مهندسان قرار می‌دهد تا اطلاعات را برای تجزیه و تحلیل ثبت کنند. یک کنترلر می‌تواند اطلاعات را در صورت درخواست میزبان از طریق رویداد (زیررویداد اطلاعات اشکال‌زدایی کنترلر) یا به صورت خودکار در صورت تمایل کنترلر ارائه دهد. به عنوان مثال، می‌توان به گزارش اطلاعات وضعیت میان‌افزار، اطلاعات مربوط به خرابی، اطلاعات ثبت وقایع و غیره اشاره کرد.

او سی اف: 0x15B

پارامتر فرمان اندازه هدف
ناموجود لیست پارامترهای دستور خالی

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان

پشتیبانی از تخلیه سخت‌افزاری A2DP

ویژگی A2DP offload از انتقال فرآیند رمزگذاری صوتی A2DP به یک پردازنده صوتی متصل به کنترل‌کننده BT پشتیبانی می‌کند. جریان داده صوتی رمزگذاری شده مستقیماً از پردازنده صوتی به کنترل‌کننده BT بدون دخالت میزبان BT منتقل می‌شود. میزبان BT همچنان مسئول پیکربندی و کنترل جلسه A2DP است. دو نسخه از دستورات موجود است. دستورات قدیمی با Sub OCF 0x01-0x02 فقط از کدک‌های متن‌باز پشتیبانی می‌کنند. نسخه‌های با Sub-OCF 0x03-0x04 با کدک پیکربندی شده سازگار نیستند.

OCF: 0x15D

شروع تخلیه A2DP (قدیمی)

زیر OCF: 0x01

از این دستور هم برای پیکربندی فرآیند تخلیه A2DP و هم برای شروع جریان A2DP استفاده کنید.

پارامتر فرمان اندازه هدف
Codec ۴ اکتت نوع کدک را مشخص می‌کند
0x01 - اس‌بی‌سی
0x02 - AAC
0x04 - APTX
0x08 - APTX HD
0x10 - LDAC
Max_Latency ۲ اکتت حداکثر تأخیر مجاز (بر حسب میلی‌ثانیه). مقدار صفر، قابلیت flush را غیرفعال می‌کند.
SCMS-T_Enable ۲ اکتت اکتت ۰: پرچمی که امکان افزودن هدر SCMS-T را فراهم می‌کند.
  • 0x00 - هدر SCMS-T شامل نمی‌شود.
  • 0x01 - هدر SCMS-T گنجانده شده است.

اکتت ۱: مقدار مربوط به هدر SCMS-T، در صورت فعال بودن.

Sampling_Frequency ۴ اکتت 0x01 - 44100 هرتز
0x02 - 48000 هرتز
0x04 - 88200 هرتز
0x08 - 96000 هرتز
Bits_Per_Sample ۱ اکتت 0x01 - 16 بیت در هر نمونه
0x02 - 24 بیت در هر نمونه
0x04 - 32 بیت در هر نمونه
Channel_Mode ۱ اکتت 0x01 - مونو
0x02 - استریو
Encoded_Audio_Bitrate ۴ اکتت بیت‌ریت صوتی کدگذاری‌شده بر حسب بیت در ثانیه.
0x00000000 - The audio bitrate is not specified / unused.
0x00000001 - 0x00FFFFFF - بیت ریت صدای کدگذاری شده بر حسب بیت در ثانیه.
0x01000000 - 0xFFFFFFFF - رزرو شده.
Connection_Handle ۲ اکتت دسته اتصال اتصال A2DP در حال پیکربندی است
L2CAP_Channel_ID ۲ اکتت شناسه کانال L2CAP که برای این اتصال A2DP استفاده می‌شود
L2CAP_MTU_Size ۲ اکتت حداکثر اندازه MTU مربوط به L2CAP که شامل بسته‌های صوتی کدگذاری شده است
Codec_Information ۳۲ اکتت اطلاعات مربوط به کدک.

کدک SBC:

به عناصر اطلاعاتی خاص کدک SBC در A2DP نسخه ۱.۳ مراجعه کنید.
اکتت ۰: طول بلوک | زیرباندها | روش تخصیص
اکتت ۱: حداقل مقدار بیت‌پول
اکتت ۲: حداکثر مقدار بیت‌پول
اکتت ۳: فرکانس نمونه‌برداری | حالت کانال
اکتت ۴-۳۱: رزرو شده

کدک AAC:

به عناصر اطلاعاتی خاص کدک AAC در A2DP نسخه ۱.۳ مراجعه کنید
اکتت ۰: نوع شیء
اکتت ۱؛ b7: VBR
اکتت ۲-۳۱: رزرو شده

کدک LDAC:

اکتت ۰-۳: شناسه فروشنده
0x0000012D

اکتت ۴-۵: شناسه کدک
0x00AA - LDAC
تمام مقادیر دیگر محفوظ هستند

اکتت ۶: شاخص بیت‌ریت:
0x00 - بالا
0x01 - اواسط
0x02 - پایین
0x03 - 0x7E - رزرو شده
0x7F - ABR (نرخ بیت تطبیقی)
0x80 - 0xFF - رزرو شده

اکتت ۷: حالت کانال LDAC
0x01 - استریو
0x02 - دوگانه
0x04 - مونو
دیگران محفوظ هستند

اکتت ۸-۳۱: رزرو شده

همه کدک‌های دیگر:

اکتت ۰-۳۱: رزرو شده

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Sub_Opcode ۱ اکتت 0x01 - شروع تخلیه A2DP

شروع تخلیه A2DP

زیر OCF: 0x03

از این دستور هم برای پیکربندی فرآیند تخلیه A2DP و هم برای شروع جریان A2DP استفاده کنید.

پارامتر فرمان اندازه هدف
Connection Handle ۲ اکتت دسته اتصال فعال HCI
L2CAP_Channel_ID ۲ اکتت شناسه کانال L2CAP که برای پخش A2DP باز شده است
Data_Path_Direction ۱ اکتت 0x00 - خروجی (منبع/ادغام AVDTP)
0x01 - ورودی (AVDTP Sink/Split)
Peer_MTU ۲ اکتت حداکثر اندازه بسته‌های L2CAP، که با طرف مقابل توافق می‌شود.
CP_Enable_SCMS_T ۱ اکتت 0x00 - غیرفعال کردن هدر حفاظت از محتوای SCMS-T
0x01 - فعال کردن هدر حفاظت از محتوای SCMS-T
CP_Header_SCMS_T ۱ اکتت وقتی هدر حفاظت از محتوای SCMS-T فعال باشد ( CP_SCMS_T_Enable روی 0x01 تنظیم شده باشد)، مقدار هدری را که قبل از محتوای صوتی قرار می‌گیرد (به A2DP، بخش 3.2.1-2 مراجعه کنید) همانطور که در شماره‌های اختصاص داده شده بلوتوث، بخش 6.3.2 تعریف شده است، تعریف می‌کند.
وقتی محافظت از محتوای SCMS-T فعال نباشد، نادیده گرفته می‌شود.
Vendor_Specific_Parameters_Length ۱ اکتت طول پارامترهای خاص فروشنده، در محدوده ۰ تا ۱۲۸.
مقدار ۰ زمانی استفاده می‌شود که هیچ پارامتر اضافی ارائه نشده باشد.
Vendor_Specific_Parameters ۰-۱۲۸ اکتت پارامترهای خاص فروشنده که توسط Bluetooth Audio HAL ارائه می‌شود، CodecParameters.vendorSpecificParameters[] .

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Sub_Opcode ۱ اکتت 0x03 - شروع تخلیه A2DP

توقف تخلیه A2DP (قدیمی)

زیر OCF: 0x02

این دستور برای متوقف کردن جریان تخلیه بار A2DP استفاده می‌شود.

پارامتر فرمان اندازه هدف
ناموجود لیست پارامترهای دستور را خالی کنید.

هیچ پارامتری برای این دستور تعریف نشده است.

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

پارامتر بازگشتی اندازه هدف
Status ۱ اکتت وضعیت تکمیل فرمان
Sub_Opcode ۱ اکتت 0x02 - توقف تخلیه A2DP

توقف تخلیه A2DP

زیر OCF: 0x04

این دستور برای متوقف کردن جریان تخلیه بار A2DP استفاده می‌شود.

پارامتر فرمان اندازه هدف
Connection Handle ۲ اکتت دسته اتصال فعال HCI
L2CAP_Channel_ID ۲ اکتت شناسه کانال L2CAP که برای پخش A2DP باز شده است
Data_Path_Direction ۱ اکتت 0x00 - خروجی (منبع/ادغام AVDTP)
0x01 - ورودی (AVDTP Sink/Split)

یک رویداد Command Complete برای این دستور ایجاد خواهد شد.

Return parameter اندازه هدف
Status ۱ اکتت Command Complete status
Sub_Opcode ۱ اکتت 0x04 - Stop A2DP offload

Bluetooth Quality Report command

The BT Quality Report command feature starts the mechanism in the Bluetooth controller to report Bluetooth Quality events to the host. You can enable four options:

  • Quality Monitoring Mode: The controller periodically sends a Link Quality related BQR subevent to the host.
  • Approaching LSTO: If no packets are received from the connected BT device for longer than half of the Link Supervision TimeOut (LSTO) value, the controller reports an Approaching LSTO event to the host.
  • A2DP Audio Choppy: When the controller detects factors that cause choppy audio, the controller reports an A2DP Audio Choppy event to the host.
  • (e)SCO Voice Choppy: When the controller detects factors that cause choppy voice, the controller reports an (e)SCO Voice Choppy event to the host.
  • Root Inflammation: This event is sent by the controller to the stack when the HAL or the controller encounters a fatal error and needs to restart Bluetooth.
  • LMP/LL message trace: The controller sends the LMP/LL message handshaking with the remote device to the host.
  • Bluetooth Multi-profile/Coex scheduling trace: The controller sends its scheduling information on handling multiple Bluetooth profiles and wireless coexistence in the 2.4 Ghz band to the host.
  • Controller Debug Information mechanism: When enabled, the controller can autonomously report debug logging information through the Controller debug info subevent to the host.
  • LE Audio Choppy: When the controller detects factors that cause choppy audio, the controller reports an LE Audio Choppy event to the host.
  • Advance RF Stats mode: The controller reports its RF stats related information to the host, supporting two report use cases:
    • Periodic reports
    • Event triggers (stream start/stop and link quality event trigger).
  • The controller health monitoring mechanism provides the host with health-related information through two types of events: periodic reports and event-triggered reports.
  • BQR_Report_Action of Bluetooth Quality Report Command: The host can use this HCI command to get a one time query for quality monitoring mode, energy monitor mode, or an advance RF stats mode.

OCF: 0x15E

Command parameter اندازه هدف
BQR_Report_Action ۱ اکتت Action to add / delete reporting of quality event(s) set in BQR_Quality_Event_Mask parameter, or clear all.

0x00 - Add
0x01 - Delete
0x02 - Clear
0x03 - One time query

Delete will clear specific quality event(s) reporting.
Clear will clear all quality events reporting (BQR_Quality_Event_Mask parameter can be ignored).

BQR_Quality_Event_Mask ۴ اکتت Bit masks for the selected quality event reporting.

Bit 0: Set to enable quality monitoring mode.
Bit 1: Set to enable Approaching LSTO event (for ACL/(e)SCO/ISO).
Bit 2: Set to enable A2DP Audio Choppy event.
Bit 3: Set to enable (e)SCO Voice Choppy event.
Bit 4: Set to enable Root inflammation event.
Bit 5: Set to enable energy monitoring mode.
Bit 6: Set to enable LE audio choppy event.
Bit 7: Set to enable connect fail event.
Bit 8: Set to enable Advance RF Stats mode event trigger.
Bit 9: Set to enable Advance RF Stats periodic report.
Bit 10: Set to enable controller health monitoring mechanism event trigger. (added in BQRv7)
Bit 11: Set to enable controller health monitoring mechanism periodically report. (added in BQRv7)
Bit 12 ~ 14: Reserved.
Bit 15: Set to enable vendor-specific quality events.
Bit 16: Set to enable LMP/LL message trace.
Bit 17: Set to enable Bluetooth Multi-link/Coex scheduling trace.
Bit 18: Set to enable the Controller Debug Information mechanism.
Bit 19: Reserved for offload debug information.
Bit 20: UART History Dump Event trigger. (added in BQRv7)
Bit 21 ~ 30: Reserved.
Bit 31: Set to enable vendor-specific trace.

BQR_Minimum_Report_Interval 2 octets Define the minimum time interval of quality event reporting for the selected quality event(s). The controller Firmware should not report the next event within the defined time interval. The interval setting shall be respective and dedicated for the quality event(s) which are being added.

Unit: ms
Default: 0 (No limitation for the interval.)
Range: 0 ~ 65535 ms

BQR_Vendor_Specific_Quality_Event_Mask ۴ اکتت Bit masks for the selected vendor-specific quality event reporting.
This parameter is valid only when bit 15 of BQR_Quality_Event_Mask is set.

Bit 0 ~ 31: Reserved.

BQR_Vendor_Specific_Trace_Mask ۴ اکتت Bit masks for the selected vendor-specific trace reporting.
This parameter is valid only when bit 31 of BQR_Quality_Event_Mask is set.

Bit 0 ~ 31: Reserved.

Report_interval_multiple ۴ اکتت The multiplier for BQR_Minimum_Report_Interval . When this value >= 1, the BQR Report Interval follows the format
BQR Report Interval = BQR_Minimum_Report_Interval x Report_interval_multiple.
The controller Firmware must not report the next event within the defined time interval. The interval setting is specifically dedicated for the added quality event(s).

Unit: ms
Default: 1
Range: 0 ~ 4294967295 (0: is equal set to 1)

Note: if the setting of BQR_Report_Interval is larger than the ability of the controller, the controller must return the maximum BQR_Report_Interval time on the completion of the command.

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status ۱ اکتت Command Complete status
Current_Quality_Event_Mask ۴ اکتت Indicates current bit mask setting.
Bit 0: Quality monitoring mode is enabled.
Bit 1: Approaching LSTO event reporting is enabled.
Bit 2: A2DP Audio Choppy event reporting is enabled.
Bit 3: (e)SCO Voice Choppy event reporting is enabled.
Bit 4: Root inflammation event reporting is enabled.
Bit 5: Energy monitoring mode is enabled.
Bit 6: LE audio choppy event reporting is enabled.
Bit 7: Connect fail event.
Bit 8: Set to enable Advance RF Stats mode event trigger.
Bit 9: Set to enable Advance RF Stats periodically report.
Bit 10: Set to enabled controller health monitoring mechanism event trigger.
Bit 11: Set to enabled controller health monitoring mechanism periodically report.
Bit 12 ~ 14: Reserved.
Bit 15: Vendor-specific quality event reporting is enabled.
Bit 16: LMP/LL message trace is enabled.
Bit 17: Bluetooth Multi-link/Coex scheduling trace is enabled.
Bit 18: Controller Debug Information mechanism is enabled.
Bit 19: Reserved for offload debug information
Bit 20: UART History Dump Event trigger
Bit 21 ~ 30: Reserved.
Bit 31: Vendor-specific trace is enabled.
Current_Vendor_Specific_Quality_Event_Mask ۴ اکتت Indicates current bit mask setting.
Current_Vendor_Specific_Trace_Mask ۴ اکتت Indicates current bit mask setting.
BQR_Report_interval ۴ اکتت Indicates current bit mask setting.
Current_Vendor_Specific_Trace_Mask ۴ اکتت The setting of BQR_Report_interval . It must be the minimum value between BQR_Minimum_Report_Interval * Report_interval_multiple or the maximum support interval of the controller.

Dynamic audio buffer command

The dynamic audio buffer reduces audio glitching by changing the audio buffer size in the Bluetooth controller based on various scenarios.

OCF: 0x15F

Get audio buffer time capability

Sub OCF: 0x01

Use this command to get the audio buffer time capability from the Bluetooth controller.

Command parameter اندازه هدف
ناموجود Empty Command parameter list

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status ۱ اکتت Command Complete status
Dynamic_Audio_Buffer_opcode ۱ اکتت 0x01 - Get audio buffer time
Audio_Codec_Type_Supported ۴ اکتت Bit masks for the supported codec types
Bit 0 - SBC
Bit 1 - AAC
Bit 2 - APTX
Bit 3 - APTX HD
Bit 4 - LDAC
Bit 5-31 are reserved
Audio_Codec_Buffer_Default_Time_For_Bit_0 2 octets Default buffer time of the Bit 0 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 0 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Maximum_Time_For_Bit_0 2 octets Maximum buffer time of the Bit 0 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 0 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Minimum_Time_For_Bit_0 2 octets Minimum buffer time of the Bit 0 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 0 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Default_Time_For_Bit_1 2 octets Default buffer time of the Bit 1 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 1 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Maximum_Time_For_Bit_1 2 octets Maximum buffer time of the Bit 1 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 1 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Minimum_Time_For_Bit_1 2 octets Minimum buffer time of the Bit 1 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 1 codec type is not supported.
Unit: ms
...... ...... ......
Audio_Codec_Buffer_Default_Time_For_Bit_31 2 octets Default buffer time of the Bit 31 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 31 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Maximum_Time_For_Bit_31 2 octets Maximum buffer time of the Bit 31 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 31 codec type is not supported.
Unit: ms
Audio_Codec_Buffer_Minimum_Time_For_Bit_31 2 octets Minimum buffer time of the Bit 31 codec type specified in Audio_Codec_Type_Supported.
This value shall be 0 if the Bit 31 codec type is not supported.
Unit: ms

Set audio buffer time

Sub OCF: 0x02

Use this command to set the audio buffer time to the Bluetooth controller.

Command parameter اندازه هدف
Audio_Codec_Buffer_Time 2 octets Requested audio buffer time for the current used codec.
Unit: ms

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status ۱ اکتت Command Complete status
Dynamic_Audio_Buffer_opcode ۱ اکتت 0x02 - Set audio buffer time
Audio_Codec_Buffer_Time 2 octets Current audio buffer time in the Bluetooth controller.
Unit: ms

HCI event (vendor-specific)

Vendor-specific HCI events are required in some cases. Refer to Figure 5.4 on page 1897 of the BT Core 5.2 Specification. Event parameter 0 will always contain the first subevent code, based on which the rest of the HCI event is decoded.

Event Parameter اندازه هدف
HCI_vendor_specific_event_code ۱ اکتت 0xFF
sub_event_code ۱ اکتت A subevent code will be 1 octet in size, the byte immediately following Parameter Length in the HCI event packet.

Storage threshold breach subevent

This event indicates that the storage threshold has been breached.

Subevent code = 0x54

Subevent Parameter اندازه هدف
هیچکدام

LE multi-advertising state change subevent

This event indicates that an advertising instance has changed its state. At this time, this event is only used to indicate which advertising instance was stopped as a result of a connection.

Subevent code = 0x55

Subevent parameter اندازه هدف
Advertising_instance ۱ اکتت Identifies the specific advertising instance
Valid values are 0 through max_advt_instances -1
State_Change_Reason ۱ اکتت 0x00: Connection received
Connection_handle 2 octets Identifies the connection that caused the advt instance to be disabled (0xFFFF if invalid)

LE advertisement tracking subevent

This event indicates when an advertiser is found or lost.

Sub event code = 0x56

Subevent Parameter اندازه هدف
APCF_Filter_Index ۱ اکتت Filter Index (0, max_filter -1)
Advertiser_State ۱ اکتت 0x00: Advertiser found
0x01: Advertiser lost
Advt_Info_Present ۱ اکتت 0x00: Advertiser information ( Advt_Info ) present
0x01: Advertiser information ( Advt_Info ) not present
Advertiser_Address 6 octets Public or random address
Advertiser_Address_Type ۱ اکتت 0x00: Public address
0x01: Random address
Advt_Info Tx_Pwr[0] : 1 octet
RSSI[0] : 1 octet
Timestamp[0] : 2 octets
Adv packet_len[0] : 1 octet
Adv_packet[0] : Adv_packet_len octets
Scan_data_resp_len[0] : 1 octet
Scan_data_resp[0] : Scan_data_resp octets

Controller debug info subevent

This event is used by a Controller to provide binary debug information to a host.

Subevent code = 0x57

Subevent Parameter اندازه هدف
debug_block_byte_offset_start 2 octets Debug block byte offset from the start
last_block ۱ اکتت 0x00: More debug data present
0x01: Last binary block; no more debug data
cur_pay_load_sz 2 octets Binary block size in a current event
Debug_Data متغیر Debug data of cur_payload_sz

Bluetooth Quality Report subevent

This event indicates one of the following: a Bluetooth quality event occurred, the controller uploaded the LMP/LL message trace and Bluetooth Multi-link/Coex scheduling trace, or the controller dumped debug information data.

Subevent Parameter اندازه هدف
Quality_Report_Id 1 octet 0x01: Quality reporting on the monitoring mode.
0x02: Approaching LSTO.
0x03: A2DP Audio Choppy.
0x04: (e)SCO Voice Choppy.
0x05 ~ 0x06: Reserved.
0x07: LE audio choppy.
0x08: Connect fail.
0x09 ~ 0xFF: Reserved.
Packet_Types 1 octet 0x01: ID
0x02: NULL
0x03: POLL
0x04: FHS
0x05: HV1
0x06: HV2
0x07: HV3
0x08: DV
0x09: EV3
0x0A: EV4
0x0B: EV5
0x0C: 2-EV3
0x0D: 2-EV5
0x0E: 3-EV3
0x0F: 3-EV5
0x10: DM1
0x11: DH1
0x12: DM3
0x13: DH3
0x14: DM5
0x15: DH5
0x16: AUX1
0x17: 2-DH1
0x18: 2-DH3
0x19: 2-DH5
0x1A: 3-DH1
0x1B: 3-DH3
0x1C: 3-DH5
0x1D ~ 0x50: Reserved
0x51: ISO packet
0x52: 1M PHY
0x53: 2M PHY
0x54: Codec PHY S=2
0x55: Codec PHY S=8
0x56 ~ 0xFF: Reserved
Connection_Handle 2 octets ACL/(e)SCO/ISO connection handle.
Connection_Role 1 octet Performing Role for the connection.
0x00: Central
0x01: Peripheral
0x02 ~ 0xFF: Reserved.
TX_Power_Level 1 octet Current transmit power level for the specified Connection_Handle.

This value shall be the same as the controller's responding to the HCI_Read_Transmit_Power_Level HCI command.

RSSI 1 octet [in dBm]

Received Signal Strength Indication (RSSI) value for the specified Connection_Handle.
This value shall be an absolute receiver signal strength value.
Range: -127 to +20

SNR ۱ اکتت [in dB]

Signal-to-Noise Ratio (SNR) value for the specified Connection_Handle.
The controller shall provide the average SNR of all the channels used by the link.

Unused_AFH_Channel_Count 1 octet Indicates the number of unused channels in AFH_channel_map.
0x4F ~ 0xFF: Reserved.
AFH_Select_Unideal_Channel_Count 1 octet Indicates the number of the channels which are interfered and have bad quality, but they are still selected for AFH.
The minimum number of channels allowed by the Bluetooth specification is 20, so even if all 79 channels are interfered and have bad quality, the controller still needs to choose at least 20 channels for AFH.
LSTO 2 octets Current Link Supervision Timeout Setting.
Time = N * 0.625 ms
Time Range: 0.625 ms to 40.9 s
Connection_Piconet_Clock ۴ اکتت Piconet Clock for the specified Connection_Handle.
This value shall be the same as the controller's responding to HCI_Read_Clock HCI command with parameter "Which_Clock" of 0x01 (Piconet Clock).
Unit: N * 0.3125 ms (1 Bluetooth Clock)
Retransmission_Count ۴ اکتت The number of retransmissions since the last event.
This count shall be reset after reporting to the host.
No_RX_Count ۴ اکتت No RX count since the last event.
The count increases when no packet is received at the scheduled time slot or the received packet is corrupted.
This count shall be reset after reporting to the host.
NAK_Count ۴ اکتت NAK (Negative Acknowledge) count since the last event.
This count shall be reset after reporting to the host.
Last_TX_ACK_Timestamp ۴ اکتت Timestamp of last TX ACK. It is based on the Bluetooth Clock of the piconet central (CLK).
Unit: N * 0.3125 ms (1 Bluetooth Clock)
Flow_Off_Count ۴ اکتت The number of times the controller receives Flow-off (STOP) since the last event.
This count shall be reset after reporting to the host.
Last_Flow_On_Timestamp ۴ اکتت Timestamp of last Flow-on (GO). It is based on the Bluetooth Clock of the piconet central (CLK).
Unit: N * 0.3125 ms (1 Bluetooth Clock)
Buffer_Overflow_Bytes ۴ اکتت [in Byte]

Buffer overflow count since the last event.
The controller counts how many bytes of data are dropped.
This count shall be reset after reporting to host.

Buffer_Underflow_Bytes ۴ اکتت [in Byte]

Buffer underflow count since the last event.
This count shall be reset after reporting to host.

bdaddr 6 octets Remote device address
cal_failed_item_count 1 octet The count of calibration failed items
TX_Total_Packets ۴ اکتت The number of packets that are sent out.
TX_UnAcked_Packets ۴ اکتت The number of packets that don't receive an acknowledgment.
This count is reset after reporting to the host.
TX_Flushed_Packets ۴ اکتت The number of packets that aren't sent out by its flush point.
This count is reset after reporting to the host.
TX_Last_Subevent_Packets ۴ اکتت The number of packets that Link Layer transmits a CIS data PDU in the last subevent of a CIS event.
This count is reset after reporting to the host.
The value is zero if there's no valid value for the link.
CRC_Error_Packets ۴ اکتت The number of received packages with CRC error since the last event.
This count is reset after reporting to the host.
RX_Duplicate_Packets ۴ اکتت The number of duplicate (retransmission) packages received since the last event.
This count is reset after reporting to the host.
RX_Unreceived_Packets ۴ اکتت The number of unreceived packets is the same as the parameter of the LE READ ISO Link Quality command (see Bluetooth core Specification Version 5.4). The associated streams are CIS and BIS.
When this value is incremented, the Link Layer doesn't receive a specific payload by its flush point (on a CIS) or at the end of the event it is associated with (on a BIS; see Bluetooth core Specification Version 5.4 Vol 6 Part B, Section 4.4.6.6).
Coex_Info_Mask 2 octets Bit 0 - CoexInvolvement: Set to indicate coex activities are suspected to be involved when this report is generated (for example, A2DP Chops and Approaching LSTO).
Bit 1 - WL 2G Radio Active: Set to indicate WLAN 2G Radio is active.
Bit 2 - WL 2G Connected: Set to indicate WLAN 2G Radio is active and connected.
Bit 3 - WL 5G/6G Radio Active: Set to indicate WLAN 5G/6G Radio is active.
Bit 4-15 - Reserved
Vendor Specific Parameter (parameter total length - TBD) * octets For the controller vendor to obtain more vendor specific parameters.

Subevent code = 0x58 [Quality_Report_Id = 0x05, Root Inflammation event]

This event indicates that Bluetooth HAL or the controller encountered a fatal error and needs Bluetooth stack to record this situation and restart. The controller must send a Root_Inflammation_Event to Bluetooth stack before sending the first fragment of the debug info events in any case.

The Error_Code parameter contains an error code reported from HAL/Controller, 0 if it is a chipset vendor specific error. The Vendor_Specific_Error_Code contains a chipset vendor specific error code from HAL/Controller. It should set as 0 if the parameter Error_Code is not 0. The parameters Error_Code and Vendor_Specific_Error_Code should not both be 0.

Subevent Parameter اندازه هدف
Quality_Report_Id 1 octet 0x00 ~ 0x04: Reserved.
0x05: Root inflammation.
0x06 ~ 0xFF: Reserved.
Error_Code 1 octet 0x00: Chipset vendor specific error code is included.
0x01 ~ 0xFF: Controller failure occurred. See Bluetooth Spec [Vol 2] Part D, Error Codes for a list of error codes and descriptions.
Vendor_Specific_Error_Code 1 octet 0x00: No chipset vendor specific error code is included.
0x01 ~ 0xFF: Chipset vendor specific error code.
Vendor Specific Parameter (Parameter Total Length - 4) * octets For the controller vendor to obtain more vendor specific parameters.

کد رویداد فرعی = 0x58 [Quality_Report_Id = 0x06، رویداد مانیتور انرژی]

This event provides a snapshot of the Bluetooth controller's power consumption and operational states over a specific time period. This event helps developers and engineers analyze how the controller manages power, identify which activities consume the most energy, and troubleshoot power-related issues.

The parameters in the report track key metrics, including:

  • Average current consumption: The overall current used by the controller.
  • Time spent in different states: The total time (in milliseconds) the controller spends in an idle (sleep/low power) state versus an active state (connecting, transmitting, or receiving data).
  • State transition counts: The number of times the controller switches between idle and active states.
  • Time spent in specific radio states: Separate metrics for time spent transmitting (Tx) and receiving (Rx) for both BR/EDR (Bluetooth Classic) and LE (Bluetooth Low Energy) links.
  • Average transmit power levels: The average power (in dBm) used for transmissions on BR/EDR and LE links.
  • Detailed chain activity: Reports on time spent with active transmit or receive chains, distinguishing between one-chain and two-chain operations, and between internal (iPA) and external (ePA) power amplifiers.
  • Scan activity time: The time the controller spends actively scanning for BR/EDR and LE devices.

By examining these parameters, engineers can gain insight into the controller's power efficiency and optimize its performance.

Subevent Parameter اندازه هدف
Quality_Report_Id 1 octet 0x06: Energy Monitoring
Average_Current_Consumption 2 octets [in mA] Average current consumption of all activities consumed by the controller
Idle_Total_Time (sleep) ۴ اکتت [in ms] Total time in the idle (low power states, sleep) state.
Idle_Sate_Enter_Count ۴ اکتت Indicates how many times the controller enters the idle state.
Active_Total_Time ۴ اکتت [in ms] Total time in the active (inquiring, paging, ACL/SCO/eSCO/BIS/CIS traffic, processing any task) state.
Active_State_Enter_Count ۴ اکتت Indicates how many times the controller enters the active states.
BR_RDR_Tx_Total_Time ۴ اکتت [in ms] Total time in the BR/EDR specific Tx(Transmitting for ACL/SCO/eSCO traffic)state.
BR_RDR_Tx_State_Enter_Count ۴ اکتت Indicates how many times the controller enters the BR/EDR specific Tx state.
BR_RDR_Tx_Average_Power_Level 1 octets [in dBm] Average Tx power level of all the BR/EDR link(s)
BR_RDR_Rx_Total_Time ۴ اکتت [in ms] Total time in the BR/EDR specific Rx (Receiving from ACL/SCO/eSCO traffic) state.
BR_RDR_Rx_State_Enter_Count ۴ اکتت [in ms] Indicates how many times the controller enters the BR/EDR specific Rx state.
LE_Tx_Total_Time ۴ اکتت [in ms] Total time in the LE specific Tx (Transmitting for either ACL/BIS/CIS or LE advertising traffic) state.
LE_Tx_State_Enter_Count ۴ اکتت Indicates how many times the controller enters the BR/EDR specific Rx state.
LE_Tx_Average_Power_Level 1 octets [in dBm] Average Tx power level of all the LE link(s).
LE_Rx_Total_Time ۴ اکتت [in ms] Total time in the LE specific Rx (Receiving from either ACL/BIS/CIS or LE scanning traffic) state.
LE_Rx_State_Enter_Count ۴ اکتت [in ms] Indicates how many times the controller enters the LE specific Rx state
Report_Time_Duration (Total time) ۴ اکتت [in ms] The total time duration to collect power related information.
RX_Active_One_Chain_Time ۴ اکتت [in ms] The time duration of RX active in one chain
RX_Active_Two_Chain_Time ۴ اکتت [in ms] The time duration of RX active in two chain
TX_iPA_Active_One_Chain_Time ۴ اکتت [in ms] The time duration of internal TX active in one chain
TX_iPA_Active_Two_Chain_Time ۴ اکتت [in ms] The time duration of internal TX active in two chain
TX_ePA_Active_One_Chain_Time ۴ اکتت [in ms] The time duration of external TX active in one chain
TX_ePA_Active_Two_Chain_Time ۴ اکتت [in ms] The time duration of external TX active in two chain
BREDR_RX_Active_Scan_total_Time ۴ اکتت [in ms] Time period (ms) on BR/EDR scan RX active time
LE_RX_Active_Scan_total_Time ۴ اکتت [in ms] Time period (ms) on LE scan RX active time

کد رویداد فرعی = 0x58 [شناسه گزارش کیفیت = 0x09~0x0A، رویداد آمار پیشرفته RF]

The Bluetooth Advanced RF (Radio Frequency) Stats event provides detailed performance metrics about the Bluetooth controller's radio behavior. The event can be triggered in two ways:

  • By Trigger (0x09): A one-time report is sent in response to a specific command.
  • By Monitor (0x0A): The controller periodically sends reports at a specified interval.

The event's parameters are essentially packet counters that track various radio behaviors over a specified time period.

Key metrics and their purpose
  • Transmit power statistics: These counters track packets sent using different power configurations, distinguishing between internal (iPA) and external (ePA) power amplifiers and various antenna diversity (Div) or beamforming (BF) modes. This helps determine which power and antenna settings are being used most frequently.
  • Received signal strength indicator (RSSI) bins: These parameters categorize received packets based on their signal strength. By providing a count of packets within specific RSSI ranges (eg, less than -90 dBm, -70 to -75 dBm), the report gives a clear picture of the link quality. A high count in the "weak" signal bins (for example, < -90 dBm) indicates a poor connection.
  • RSSI delta: This metric measures the difference in signal strength between the two receive antennas (if applicable). Counters track how many packets have an RSSI delta within different ranges. A large delta (eg, >11 dBm) can suggest interference or a physical obstruction, as one antenna is receiving a much stronger signal than the other.
  • Antenna switching and re-transmissions: The report counts how often the controller switches between antennas and tracks re-transmitted (ReTX) packets. A high number of re-transmissions often points to a weak or unreliable connection, requiring packets to be resent.
  • Channel quality: These parameters provide a high-level summary of the health of different communication channels, categorizing them as "Good," "OK," "Bad," or "Very Bad" based on their RSSI. This gives an immediate overview of the RF environment.
  • TX buffer queue: This section monitors the number of packets waiting in the controller's transmit buffer for different link types, such as ACL (Asynchronous Connection-oriented Logical link), LECONN (LE Connection), and LEISOC (LE Isochronous). High buffer counts can indicate a bottleneck or a problem with data flowing from the host to the controller.
Subevent parameter اندازه هدف
Quality_Report_Id 1 octet 0x09: Advance RF Stats By Trigger
0x0A: Advance RF Stats By Monitor
Extension_info 1 octet BQR version information.
0x01 for BQRv6
0x02 for BQRv7
Report_Time_Period ۴ اکتت The time period to collect performance information. Unit: ms
TX_Power_iPA_BF ۴ اکتت Packet counter of iPA BF
TX_Power_ePA_BF ۴ اکتت Packet counter of ePA BF
TX_Power_iPA_Div ۴ اکتت Packet counter of ePA Div
TX_Power_ePA_Div ۴ اکتت Packet counter of ePA Div
RSSI_chain_50 ۴ اکتت Packet counter of RSSI chain > -50 dBm
RSSI_chain_50_55 ۴ اکتت Packet counter of RSSI chain between -50 dBm ~ >-55 dBm
RSSI_chain_55_60 ۴ اکتت Packet counter of RSSI chain between -55 dBm ~ >-60 dBm
RSSI_chain_60_65 ۴ اکتت Packet counter of RSSI chain between -60 dBm ~ >-65 dBm
RSSI_chain_65_70 ۴ اکتت Packet counter of RSSI chain between -65 dBm ~ >-70 dBm
RSSI_chain_70_75 ۴ اکتت Packet counter of RSSI chain between -70 dBm ~ >-75 dBm
RSSI_chain_75_80 ۴ اکتت Packet counter of RSSI chain between -75 dBm ~ >-80 dBm
RSSI_chain_80_85 ۴ اکتت Packet counter of RSSI chain between -80 dBm ~ >-85 dBm
RSSI_chain_85_90 ۴ اکتت Packet counter of RSSI chain between -85 dBm ~ >-90 dBm
RSSI_chain_90 ۴ اکتت Packet counter of RSSI chain < -90 dBm
RSSI_delta_2 ۴ اکتت Packet counter of RSSI delta < 2 dBm
RSSI_delta_2_5 ۴ اکتت Packet counter of RSSI delta between 2 dBm ~ 5 dBm
RSSI_delta_5_8 ۴ اکتت Packet counter of RSSI delta between 5 dBm ~ 8 dBm
RSSI_delta_8_11 ۴ اکتت Packet counter of RSSI delta between 8 dBm ~ 11 dBm
RSSI_delta_11 ۴ اکتت Packet counter of RSSI delta > 11 dBm
Antenna_Switch_Count ۴ اکتت Packet counter of antenna switching event
ReTX_iPA_BF ۴ اکتت Packet counter of ReTX_iPA_BF in the latest time period
ReTX_ePA_BF ۴ اکتت Packet counter of ReTX_ePA_BF in the latest time period
ReTX_iPA_Div ۴ اکتت Packet counter of ReTX_iPA_Div in the latest time period
ReTX_ePA_Div ۴ اکتت Packet counter of ReTX_ePA_Div in the latest time period
Channel_count_Good 1 octets Number of channels whose RSSI falls within Bin-1 (<-90)
Channel_count_OK 1 octets Number of channels whose RSSI falls within Bin-2 (-90~-76)
Channel_count_Bad 1 octets Number of channels whose RSSI falls within Bin-3 (-76~-50)
Channel_count_VeryBad 1 octets Number of channels whose RSSI falls within Bin-4 (>-50)
TX_buffer_Queue_Count ۴ اکتت Counter of buffer queue status-controller TX buffer in the latest time period [0:3] ACL_1 [4:7] ACL_2 [8:11] LECONN_1 [12:15] LECONN_2 [16:19] LEISOC_1 [20:23] LEISOC_2 [24:27] LEBroadcast [28:31] rsvd

Subevent code = 0x58 [Quality_Report_Id = 0x0B~0x0C, Controller Health Monitoring event]

The Bluetooth Controller Health Monitoring event provides a summary of the controller's operational status. The event can be triggered in two ways:

  • By Trigger (0x09): A one-time report is sent in response to a specific command.
  • By Monitor (0x0A): The controller periodically sends reports at a specified interval.

The Bluetooth Controller Health Monitoring event is a diagnostic tool that provides a summary of the controller's operational status. This event is part of the Bluetooth Quality Report (BQR) framework and is used for debugging connectivity, power management, and timing issues. It can be sent as a one-time report or periodically to provide continuous monitoring.

Key metrics and their purpose
  • HCI Packet Counters: The event tracks the total number of packets sent from the Host to the Controller and vice versa. These counters are essential for debugging issues with the Host Controller Interface (HCI) transport, which is the communication channel between the software stack and the Bluetooth controller chip.
  • Packet Lengths: The event reports the length of the last HCI packet sent and received. This helps verify that data is being transmitted correctly and that there are no unexpected size issues.
  • Wake-up Signal Counts: The report includes the total number of times the BT_Wake and HOST_Wake pins have been asserted. These physical signals are critical for power management, as they are used to wake the respective entities from low-power states. Monitoring these counts helps debug power-related problems, such as unexpected wake-ups or failures to enter sleep mode.
  • Timestamps: The event provides several timestamps, including the time of the last wake-up signal and the last HCI reset. These timestamps help troubleshoot timing-related issues and provide a reference point for when certain events occurred.
  • Watchdog Timer: A specific flag indicates if the event was generated as an early warning that the controller's watchdog timer is about to expire. This is a critical alert for potential controller freezes or malfunctions.
  • Link Status: The report summarizes the current state of active connections, including the total count of BR/EDR , LE , and CIS (Connected Isochronous Stream) links. It also indicates if any SCO (Synchronous Connection-Oriented) links are active. This information provides a snapshot of the controller's current connection load.
Subevent parameter اندازه هدف
Quality_Report_Id 1 Octet 0xB~0xC
0x0B: one-time or event-triggered reports
0x0C: periodic reports.
Packet_Count_Host_to_Controller 4 Octets Total count of packets sent from Host to Controller over HCI transport. This field is employed for the purpose of debugging HCI (for example, UART) issues. Behavior: the counters reset when the controller received HCI reset.
Packet_Count_Controller_to_Host 4 Octets Total count of HCI Event packets sent to Host. This field is employed for the purpose of debugging HCI (eg, UART) issues. Behavior: the counters reset when the controller received HCI reset.
Last_Packet_Length_Host_to_Controller 2 Octets Length of the last HCI packet sent to Host UART. Note: HCI Packet Length max 2 octet (Include HCI, ACL, SCO, ISO)
Last_Packet_Length_Controller_To_host 2 Octets Length of the last HCI packet received from Host UART. Note: HCI Packet Length max 2 octet (Include HCI, ACL, SCO, ISO)
Total_BT_Wake_Count 4 Octets The aggregate tally of BT_Wake pin assertions by the Host entity. This field serves as a diagnostic tool for debugging power-related issues. Behavior: the counters reset when the controller received HCI reset.
Total_HOST_Wake_Count 4 Octets Aggregate calculation of Host_Wake pin assertions initiated by the Controller. This field serves as a diagnostic tool for debugging power-related issues. Behavior: the counters reset when the controller received HCI reset.
Last_BT_Wake_TimeStamp 4 Octets Last Timestamp when Host Asserted BT_Wake Pin.This field is implemented for the purpose of debugging Power issues.
Last_HOST_Wake_TimeStamp 4 Octets The most recent timestamp when the controller asserted the Host_Wake pin. This field is used for debugging power issues.
Reset_Timestamp 4 Octets Timestamp indicating the completion of the most recent HCI Reset. This field is utilized for the express purpose of facilitating the resolution of timing-related issues. It should serve as the initial recording point against which all other items are referenced.
Current_Timestamp 4 Octets The present time when this event is generated. This field is utilized for the purpose of troubleshooting timing discrepancies. It should serve as the trigger recording point that all other elements reference.
Is_WatchDog_Timer_About_To_Expire 4 Octets Flag to denote that this health status event is generated by the controller as an early warning of watch dog expiration. The current timestamp serves to indicate the time of occurrence.
Coex_Status_Mask 2 Octets Bit 0 - Reserved
Total_Links_BR_EDR_LE_Active 1 Octet Total link count of BR/EDR/LE in Active state.
Total_Links_BR_EDR_Sniff 1 Octet Total link count of BR/EDR in Sniff/Idle state.
Total_Links_CIS 1 Octet Total link count of ISO.
Is_SCO_Active 1 Octet Indicator to check if the SCO link is currently activated.
Subevent Parameter اندازه هدف
Quality_Report_Id 1 octet 0x00 ~ 0x10: Reserved.
0x11: LMP/LL message trace.
0x12: Bluetooth Multi-link/Coex scheduling trace.
0x13: Controller Debug Information data dump.
0x14 ~ 0xFF: Reserved.
Connection_Handle 2 octets Connection Handle.
Vendor Specific Parameter (Parameter Total Length - 4) * octets Vendor Specific format of LMP message trace, Bluetooth Multi-link/Coex scheduling trace and Controller Debug Information data dump.

Sub event code = 0x5C

When activated, this event must be generated during each ISO interval.

فعال‌سازی
The activation is performed by selecting the vendor Data_Path_ID code 0x19 in the HCI_LE_Setup_ISO_Data_Path standard command. The HCI_Configure_Data_Path command with the Data_Path_ID set to 0x19 and Vendor_Specific_Config_Length set to 0 , must be accepted, even if no action is expected from the controller upon reception of this command.
Dispatching time point
The event is emitted from the start of an ISO interval (CIG or BIG anchor point), to the following ISO interval. The controller indicates the delay with the effective start of the ISO interval using Anchor_Point_Delay .
Controller synchronization
At the start of an ISO interval, the controller computes Stream SN by incrementing the current value by the configured ISO_Interval ÷ SDU_Interval ; on the first interval, it's initialized to 0.
Then, for each packet in the ISO FIFO, the following applies:
  • The controller calculates the wrapping difference SN diff between the two sequence numbers:
    SN diff = (SDU SN - Stream SN + 0x10000) mod 0x10000
  • When (SN diff + (FT-1) × ISO_Interval ÷ SDU_Interval) mod 0x10000 <= (FT-1) × ISO_Interval ÷ SDU_Interval :
    The packet is in the re-transmission window. It should have been scheduled for transmission at previous intervals and is now available for re-transmission. If this isn't the case (it hasn't been scheduled for transmission), it has been late received . This must be signaled to the host using the In_Status . Such packets can be discarded or scheduled for transmission; the choice is implementation-defined.
  • Or when SN diff < ISO_Interval ÷ SDU_Interval :
    The packet is scheduled for transmission from this event until the flush timeout occurs.
  • Or when SN diff >= ISO_Interval ÷ SDU_Interval and SN diff <= Max_Forward_Buffers :
    The packet is in the future; it will be transmitted with a subsequent event. As the packets are sent in order, this condition ends the search for packets for this interval.
    The buffers used by the host isn't communicated to the controller, but is limited to Max_Forward_Buffers = 16 .
  • Or when none of the above conditions are met:
    The packet is discarded, the flush timeout limit is reached, or a malformed packet has been received.

Subevent parameter اندازه هدف
Connection_Handle 2 octets Connection handle of the CIS or BIS
Range: 0x0000 to 0x0EFF
Sequence_Number 2 octets Sequence number of the stream, managed by the controller.

Initialized to 0 when the CIS or BIS is created, and incremented by the number of SDUs by ISO Isochronous interval, defined as ISO_interval ÷ SDU_Interval , at each ISO interval.
Anchor_Point_Delay 2 octets Delay in microseconds between the generation of the event and the effective BIG or CIG anchor point or start of the ISO interval. The effective anchor point timestamp is defined by:
Event generation time - Anchor_Point_Delay

Range: 0 to ISO interval in microseconds
In_Status 2 octets Controller ISO buffer status

At the start of an ISO interval, each bit b i is set when the SDU (Sequence_Number + i) mod 0x10000 is available. When not available, the SDU is identified as Not received from the host .

The value i ranges from 0 to ISO_Interval ÷ SDU_Interval - 1 . For other values of i , the bits are set to 0.
Tx_Status 2 octets Transmission status, relative to the SDUs with sequence numbers:
(Sequence_Number - Flush_Timeout × ISO_Interval ÷ SDU_Interval + i + 0x10000) mod 0x10000

Each bit b i is set when all the PDUs of the identified SDU, by its sequence number, have been successfully transmitted, and acknowledged.

The value i ranges from 0 to ISO_Interval ÷ SDU_Interval - 1 . For other values of i , the bits are set to 0.
On a broadcast group, the transmission is always supposed to be acknowledged.

Multi-advertiser support

The objectives of multi-advertiser support are the following:

  • Ability to support multiple advertisements ( max_advt_instances )
  • Different transmit powers to allow for a varying range
  • Different advertising content
  • An individualized response for each advertiser
  • Privacy (non-trackable) for each advertiser
  • Connectable

To keep this specification close to existing standards, the following vendor-specific commands are provided. They are derived from the Bluetooth Core 4.1 Specification.

LE_Multi_Advt_Command

OCF: 0x154

Command parameter اندازه هدف
Multi_advt_opcode 1 octet 0x01 - Set_Advt_Param_Multi_Sub_Cmd
0x02 - Set_Advt_Data_Multi_Sub_Cmd
0x03 - Set_Scan_Resp_Data_Multi_Sub_Cmd
0x04 - Set_Random_Addr_Multi_Sub_Cmd
0x05 - Set_Advt_Enable_Multi_Sub_Cmd

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Multi_advt_opcode 1 octet 0x01 - Set_Advt_Param_Multi_Command
0x02 - Set_Advt_Data_Multi_Command
0x03 - Set_Scan_Resp_Data_Multi_Command
0x04 - Set_Random_Addr_Multi_Command
0x05 - Set_Advt_Enable_Multi_Command

LE_Multi_Advt_Command: Set_Advt_Param_Multi_Sub_Cmd

Base reference: Bluetooth Core 4.1 Specification, page 964 (LE Set Advertising Parameter Command)

Sub OCF: 0x01

Subcommand parameter اندازه هدف
Advertising_Interval_Min Per spec Per spec
Advertising_Interval_Max Per spec Per spec
Advertising_Type Per spec Per spec
Own_Address_Type Per spec Per spec
Own_Address Per spec Per spec
Direct_Address_Type Per spec Per spec
Direct_Address Per spec Per spec
Advertising_Channel_Map Per spec Per spec
Adverstising_Filter_Policy Per spec Per spec
Advertising_Instance ۱ اکتت Specifies the applicability of the above parameters to an instance
Tx_power 1 octet Transmit_Power
Unit - in dBm (signed integer)
Range (-70 to +20)

The Own_Address parameter could be a host-configured address at the time of setting up this multi-advertisement instance. This provides the ability to have a resolvable private address at the time of the transmit of the first beacon. Advertisement on an instance will continue irrespective of the connection. The host BT stack could issue a command to start advertisement on an instance, post connection.

A Command Complete event will be generated for this command as specified in the Bluetooth Core 4.1 Specification, per the above command. The controller will respond with a non-success (invalid parameter) code if the advertising instance or Tx_Power parameters are invalid.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Multi_advt_opcode 1 octet 0x01 [ Set_Advt_Param_Multi_Sub_Cmd]

LE_Multi_Advt_Command: Set_Advt_Data_Multi_Sub_Cmd

Base reference: Bluetooth Core 4.1 Specification, page 969 (LE Set Advertising Data Command)

Sub OCF: 0x02

Subcommand parameter اندازه هدف
Advertising_Data_Length Per spec Per spec
Advertising_Data Per spec Per spec
Advertising_Instance 1 octet Specifies the applicability of the above parameters to an instance

A Command Complete event will be generated for this command as specified in the Bluetooth Core 4.1 Specification, per the above command. The controller will respond with a non-success code if the advertising instance or Tx_Power parameters are invalid.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Multi_advt_opcode 1 octet 0x02 [ Set_Advt_Data_Multi_Sub_Cmd]

LE_Multi_Advt_Command: Set_Scan_Resp_Data_Multi_Sub_Cmd

Base reference: Bluetooth Core 4.1 Specification, page 970 (LE Set Scan Response Data Command)

Sub OCF: 0x03

Subcommand parameter اندازه هدف
Scan_Response_Data_Length Per spec Per spec
Scan_Response_Data Per spec Per spec
Advertising_Instance 1 octet Specifies the applicability of the above parameters to an instance

A Command Complete event will be generated for this command as specified in the Bluetooth Core 4.1 Specification, per the above command. The controller will respond with a non-success code (invalid parameter) if the advertising instance or Tx_Power parameters are invalid.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Multi_advt_opcode 1 octet 0x03 [ Set_Scan_Resp_Data_Multi_Sub_Cmd]

LE_Multi_Advt_Command: Set_Random_Addr_Multi_Sub_Cmd

Base reference: Bluetooth Core 4.1 Specification, page 963 (LE Set Random Address Command)

Sub OCF: 0x04

Subcommand parameter اندازه هدف
Random Address Per spec Per spec
Advertising_Instance 1 octet Specifies the applicability of the above parameters to an instance

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status ۱ اکتت Command Complete status
Multi_advt_opcode ۱ اکتت 0x04 [ Set_Random_Addr_Multi_Sub_Cmd]

LE_Multi_Advt_Command: Set_Advt_Enable_Multi_Sub_Cmd

Base reference: Bluetooth Core 4.1 Specification, page 971 (LE Set Advertise Enable Command in that core specification)

OCF: 0x05

Subcommand parameter اندازه هدف
Advertising_Enable 1 octet A value of 1 means enable. Any other value means disable.
Advertising_Instance 1 octet Specifies the applicability of the above parameters to an instance. Instance 0 means a standard HCI instance.

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Multi_advt_opcode 1 octet 0x05 [ Set_Advt_Enable_Multi_Sub_Cmd]

Offloaded resolution of private address

This feature resolves a private address in the controller firmware or hardware, which provides the following benefits:

  • Latency involved with the host in resolving a private address
  • Saving power by refraining from waking up the host

LE_Set_RPA_Timeout

OCF: 0x15C

Command parameter اندازه هدف
LE_local_IRK 16 octet The local device IRK used to generate the random resolvable address(es).
tRPA_min 2 octets The minimum RPA generation timeout in seconds. The controller must generate new resolvable addresses for any advertising/scanning/connection events on or after this timeout.
Valid range: 300-1800
tRPA_max 2 octets The maximum RPA generation timeout in seconds. The controller must generate new resolvable addresses for any advertising/scanning/connection events on or before this timeout.
Valid range: tRPA_min -1800
Return parameter اندازه هدف
Status 1 octet The status of the command.

Suggested HCI status values:
0x00 Success
0x01 Unknown command (if not supported)
0x12 Invalid command parameters (if any parameters are outside the given range)

LE_RPA_offload_Command

OCF: 0x155

Command parameter اندازه هدف
RPA_offload_opcode 1 octet 0x1 - Enable customer specific feature
0x2 - Add IRK to the list
0x3 - Remove IRK from the list
0x4 - Clear IRK list
0x5 - Read IRK list entry

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_RPA_offload_opcode 1 octet 0x1 - Enable customer specific feature
0x2 - Add IRK to the list
0x3 - Remove IRK from the list
0x4 - Clear IRK list
0x5 - Read IRK list entry

LE_RPA_offload: Enable_cust_specific_sub_Command

Sub OCF: 0x01

Subcommand parameter اندازه هدف
enable_customer_specific_feature_set 1 octet 0x01 - Enable offloaded RPA feature
0x00 - Disable offloaded RPA feature

RPA offload is required to be enabled by the host, based on the chip capability. Refer to the LE_Get_Vendor_Capabilities_Command . Each chip can have a varying max_irk_list_sz in the firmware.

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_cust_specific_feature_opcode 1 octet 0x01 [Enable customer-specific feature]

LE_RPA_offload: Add_IRK_to_list_sub_Command

Sub OCF: 0x02

Subcommand parameter اندازه هدف
LE_IRK 16 octets LE IRK (1st byte LSB)
Address_Type 1 octet 0: Public address
1: Random address
LE_Device_Address 6 octets Public or random address associated to the IRK (1st byte LSB)

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_cust_specific_feature_opcode 1 octet 0x02 [Add IRK to the list]
LE_IrkList_AvailableSpaces 1 octet Available IRL list entries after current operation

LE_RPA_offload: Remove_IRK_to_list_sub_Command

Sub OCF: 0x03

Subcommand parameter اندازه هدف
Address_Type 1 octet 0: Public address
1: Random address
LE_Device_Address 6 octets Public or random address that associates to the IRK

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_cust_specific_feature_opcode 1 octet 0x03 [Remove IRK from the list]
LE_IrkList_AvailableSpaces 1 octet Available IRL list entries after current operation

LE_RPA_offload: Clear_IRK_list_sub_Command

Sub OCF: 0x04

Subcommand parameter اندازه هدف
هیچکدام

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_cust_specific_feature_opcode 1 octet 0x04 [Clear IRK List]
LE_IrkList_AvailableSpaces 1 octet Available IRL list entries after current operation [ max_irk_list_sz]

LE_RPA_offload: Read_IRK_list_sub_Command

Sub OCF: 0x05

Subcommand parameter اندازه هدف
LE_read_IRK_list_entry-index 1 octet Index of the IRK list [0, max_irk_list_sz-1]

A Command Complete event will be generated for this command.

Return parameter اندازه هدف
Status 1 octet Command Complete status
Event_cust_specific_feature_opcode 1 octet 0x05 [Read IRK List Entry]
LE_Read_IRK_List_entry 1 octet Index of the IRK that the host wants to read back (maximum IRK list size is 32)
LE_IRK 16 octets IRK value
Address_Type 1 octet 0: Public address
1: Random address
LE_Device_Address 6 octets Public or random address associated to the IRK
LE_Resolved_Private_Address 6 octets Current resolved resolvable private address of this IRK

اسنیف آفلود

The Sniff Offload feature offloads Sniff mode management from the Bluetooth host stack to the Bluetooth controller. This allows the controller to manage the timing of entering/exiting Sniff mode and applying configurable Sniff and Sniff sub-rating parameters, while the host retains control over parameter selection based on Bluetooth profile activity changes.

استشمام وضعیت‌های تخلیه بار

This section defines the states within a Bluetooth controller with respect to the Sniff Offload function. Two global states have been defined to identify a Bluetooth controller's status with respect to Sniff Offload enablement. Two connection specific states have been defined to identify a BR/EDR connection's status when the Bluetooth controller is in Sniff Offload Enabled state.

کشورهای جهانی

Two global states have been defined to identify a Bluetooth controller's status with respect to Sniff Offload enablement.

حالت غیرفعال Sniff Offload

A Bluetooth controller is considered to be in a 'Sniff Offload Disabled' state by default. It is expected that the Bluetooth controller shall handle the HCI_Sniff_Mode, HCI_Exit_Sniff_Mode and HCI_Sniff_Subrating commands issued from a Bluetooth host. The Bluetooth controller shall also forward the HCI_Mode_Change and HCI_Sniff_Subrating events to a Bluetooth host as per the event mask set by the Bluetooth host.

Sniff Offload Enabled State

A Bluetooth controller is considered to be in a 'Sniff Offload Enabled' state after it has successfully handled a 'WriteSniffOffloadEnable' to enable Sniff Offload. In this state the Bluetooth controller is expected to forward the HCI_Mode_Change and HCI_Sniff_Subrating events to a Bluetooth host as decided by a logical-AND function of the event mask set by the Bluetooth host and the Event Suppression Flags.

حالت‌های خاص اتصال

When a Bluetooth controller is in a 'Sniff Offload Enabled' state, each active ACL can be in one of the two described below states.

Pending-Parameter State

An ACL is considered to be in a 'Pending-Parameters' state when the Bluetooth controller is in 'Sniff Offload Enabled' state, but a 'WriteSniffOffloadParameters' vendor specific command has not been issued at least once by the Bluetooth host for the present ACL.

حالت شروع کنترل

An ACL is considered to be in a 'Control-Started'' state when the Bluetooth controller is in 'Sniff Offload Enabled' state, and a 'WriteSniffOffloadParameters' vendor specific command has been issued at least once by the Bluetooth host for the present ACL.

فعال کردن نوشتن/خاموش کردن

OCF: 0x310

Command parameter اندازه هدف
Enable_Sniff_Offload 1 octet 0x00 : Disable
0x01 : Enable
Subrating_Max_Latency 2 octets The Maximum Latency parameter shall be used to calculate the maximum sniff subrate that the remote device may use. Default: T*sniff* Latency = N × 0.625 ms (1 Baseband slot) Range: 0x0002 to 0xFFFE Time Range: 1.25 ms to 40.9 s
Subrating_Min_Remote_Timeout 2 octets Minimum sniff mode timeout (T*sniff_mode_timeout*) that the remote device may use Default: 0x0000 Timeout = N × 0.625 ms (1 Baseband slot) Range: 0x0000 to 0xFFFE Time Range: 0 s to 40.9 s
Subrating_Min_Local_Timeout 2 octets Minimum sniff mode timeout (T*sniff_mode_timeout*) that the local device may use. Default: 0x0000 Timeout = N × 0.625 ms (1 Baseband slot) Range: 0x0000 to 0xFFFE Time Range: 0 s to 40.9 s
Suppress_Mode_Change_Event 1 octet 0x00 : The Bluetooth controller shall report the HCI Mode_Change event to the host subject to the configuration set in HCI_Set_Event_Mask command.
0x01 : The Bluetooth controller shall not report the HCI Mode_Change event to the host.
Suppress_Sniff_Subrating_Event 1 octet 0x00 : The Bluetooth controller shall report the HCI Sniff_Subrating event to the host subject to the configuration set in HCI_Set_Event_Mask command.
0x01 : The Bluetooth controller shall not report the HCI Sniff_Subrating event to the host.

WriteSniffOffloadParameters

OCF: 0x311

Command parameter اندازه هدف
Connection_Handle 2 octets 16-bit BR/EDR ACL connection handle. Range: 0x0000 to 0x0EFF
Sniff_Max_Interval 2 octets –Bluetooth SIG Defined range, ordinarily used for entry to Sniff mode. Range: 0x0002 to 0xFFFE; only even values are valid Mandatory Range: 0x0006 to 0x0540 Time = N × 0.625 ms Time Range: 1.25 ms to 40.9 s –Special Cases 0x0000 : Used to select “Push-Active” Sniff-Offload Mode. 0x0001 : Used to select “Prefer-Active” Sniff-Offload Mode.
Sniff_Min_Interval 2 octets Range: 0x0002 to 0xFFFE; only even values are valid Mandatory Range: 0x0006 to 0x0540 Time = N × 0.625 ms Time Range: 1.25 ms to 40.9 s
Sniff_Attempts 2 octets Number of Baseband receive slots for sniff attempt. Length = N × 1.25 ms Range: 0x0001 to 0x7FFF Time Range: 1.25 ms to 40.9 s Mandatory Range for Controller: 1 to T*sniff* ÷ 2
Sniff_Timeout 2 octets Number of Baseband receive slots for sniff timeout. Length = N × 1.25 ms Range: 0x0000 to 0x7FFF Time Range: 0 ms to 40.9 s Mandatory Range for Controller: 0 to 0x0028
Link_Inactivity_Timeout 2 octets Timeout value in milliseconds. Link_Inactivity Timer started/reset at every HCI-ACL transaction. At the expiry of this timer, the controller shall initiate entry to Sniff mode.
Subrating_Max_Latency 2 octets The Maximum Latency parameter shall be used to calculate the maximum sniff subrate that the remote device may use. Default: T*sniff* Latency = N × 0.625 ms (1 Baseband slot) Range: 0x0002 to 0xFFFE Time Range: 1.25 ms to 40.9 s
Subrating_Min_Remote_Timeout 2 octets Minimum sniff mode timeout (T*sniff_mode_timeout*) that the remote device may use Default: 0x0000 Timeout = N × 0.625 ms (1 Baseband slot) Range: 0x0000 to 0xFFFE Time Range: 0 s to 40.9 s
Subrating_Min_Local_Timeout 2 octets Minimum sniff mode timeout (T*sniff_mode_timeout*) that the local device may use. Default: 0x0000 Timeout = N × 0.625 ms (1 Baseband slot) Range: 0x0000 to 0xFFFE Time Range: 0 s to 40.9 s
Allow_Exit_Sniff_On_Rx 1 octet Flag to control exit of Sniff mode on receive-direction HCI-ACL transaction. 0x00 : Do not exit sniff on Rx. 0x01 : Exit Sniff on Rx Receive-direction HCI-ACL is defined as ACL packet transmission from controller to host over HCI.
Allow_Exit_Sniff_On_Tx 1 octet Flag to control exit of Sniff mode on transmit-direction HCI-ACL transaction. 0x00 : Do not exit sniff on Tx. 0x01 : Exit Sniff on Tx Transmit-direction HCI-ACL is defined as ACL packet transmission from host to controller over HCI.