2024年2月11日日曜日

WinRTのBLEの個人的メモ①

 BluetoothLEAdvertisementPublisherとGattServiceProvider のどちらでもアドバタイズができるのだが?

 

たぶん違いはAdvertiseに設定できる内容。なんでこうなのかはよくわからん。

・BluetoothLEAdvertisementPublisherはAdvertiseのDataSectionが設定できる。

・GattServiceProviderはAdvertiseのDataSectionが設定できない。

BluetoothLEAdvertisementPublisherで設定できるDataSectionはDataType=0xFFだけ。ほかは設定しようとするとアクセス違反で例外を吐く。

 

 

DataSectionとmanufacturerData

DataSectionの種類にmanufacturerDataがある感じ。

DataTypeが0xFFのDataSectionがmanufacturerData。BluetoothLEAdvertisementクラスにはDataSectionsとManufacturerDataがそれぞれプロパティであるから別のものと勘違いしていたんだけどDataSectionsがすべて。

0x01 :Flagsプロパティ

0x03 :ServiceUuidsプロパティ

0x08/0x09:LocalNameプロパティ

0xFF:ManufacturerDataプロパティ

になっている。

0 件のコメント:

コメントを投稿