Line 1,839: |
Line 1,839: |
| = BleAdvertiseFilter = | | = BleAdvertiseFilter = |
| This is "nn::bluetooth::BleAdvertiseFilter". This is a 0x3E-byte struct. | | This is "nn::bluetooth::BleAdvertiseFilter". This is a 0x3E-byte struct. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x1 || FilterId |
| + | |- |
| + | | 0x1 || 0x1 || CondDataSize. Only used with CondType Manu. |
| + | |- |
| + | | 0x2 || 0x1 || CondType |
| + | |- |
| + | | 0x3 || 0x1D || CondData, content depends on CondType. |
| + | |- |
| + | | 0x20 || 0x1D || Mask. Only used with CondType Manu. +0 = u16 CompanyIdMask, then {pattern mask}. |
| + | |- |
| + | | 0x3D || 0x1 || MaskSize. Only used with CondType Manu. |
| + | |} |
| + | |
| + | CondType: |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value |
| + | ! Name |
| + | ! Description |
| + | |- |
| + | | 2-3 || || ServiceUuid16. CondData = 16bit UUID which is byteswapped. |
| + | |- |
| + | | 4-5 || || ServiceUuid32. CondData = 32bit UUID which is byteswapped. |
| + | |- |
| + | | 6-7 || || ServiceUuid128. CondData = 128bit UUID which is copied raw into the param struct. |
| + | |- |
| + | | 255 || || Manu. CondData: u16 CompanyId, then {pattern data}. |
| + | |} |
| | | |
| = BleAdvertisePacketParameter = | | = BleAdvertisePacketParameter = |
| This is "nn::bluetooth::BleAdvertisePacketParameter". This is a 8-byte struct with 1-byte alignment. | | This is "nn::bluetooth::BleAdvertisePacketParameter". This is a 8-byte struct with 1-byte alignment. |
| + | |
| + | [[BTM_services#StartBleScanForGeneral|StartBleScanForGeneral]] generates a [[#BleAdvertiseFilter]] from this. CondType = Manu, CondDataSize = 0xA. CondData: +0 = u16 CompanyId, u8 +2 = 0x1, +3 = {data copied from PatternData, then an u8 with value 0x0}. MaskSize = 0x9, Mask = {all 0xFF}. |
| + | |
| + | [[BTM_services#StartBleScanForPaired|StartBleScanForPaired]] generates a [[#BleAdvertiseFilter]] from this, similar to the above. CondType = Manu, CondDataSize = 0x11. CondData: +0 = u16 CompanyId, u8 +2 = 0x1, +3 = {data copied from PatternData, then an u8 with value 0x0, then {6-byte system btaddr}}. MaskSize = 0x10, Mask = {all 0xFF except u8 +0x9 which is 0x0}. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x2 || CompanyId |
| + | |- |
| + | | 0x2 || 0x6 || PatternData |
| + | |} |
| | | |
| = BleScanResult = | | = BleScanResult = |