Loading packets/smp.pdl→system/gd/smp/smp_packets.pdl +168 −0 Original line number Diff line number Diff line enum CodeT : 8 { little_endian_packets custom_field Address : 48 "hci/" enum Code : 8 { PAIRING_REQUEST = 0x01, PAIRING_RESPONSE = 0x02, PAIRING_CONFIRM = 0x03, Loading @@ -16,11 +20,11 @@ enum CodeT : 8 { } packet Command { Code : CodeT, payload, code : Code, _payload_, } enum IoCapabilityT : 8 { enum IoCapability : 8 { DISPLAY_ONLY = 0x00, DISPLAY_YES_NO = 0x01, KEYBOARD_ONLY = 0x02, Loading @@ -28,62 +32,64 @@ enum IoCapabilityT : 8 { KEYBOARD_DISPLAY = 0x04, } enum OobDataFlagT : 8 { enum OobDataFlag : 8 { NOT_PRESENT = 0x00, PRESENT = 0x01, } enum BondingFlagsT : 2 { enum BondingFlags : 2 { NO_BONDING = 0, BONDING = 1, } group AuthReqT { BondingFlags : BondingFlagsT, Mitm : 1, // Man-in-the-middle protection required SC : 1, // Secure Connections Keypress : 1, // Only used in Passkey Entry Ct2 : 1, // Support for the h7 function. reserved : 2, group AuthReq { bonding_flags : BondingFlags, mitm : 1, // Man-in-the-middle protection required sc : 1, // Secure Connections keypress : 1, // Only used in Passkey Entry ct2 : 1, // Support for the h7 function. _reserved_ : 2, } group PairingInfoT { IoCapability : IoCapabilityT, OobDataFlag : OobDataFlagT, AuthReqT, MaximumEncryptionKeySize : 5, // 7 - 16 reserved : 3, group PairingInfo { io_capability : IoCapability, oob_data_flag : OobDataFlag, AuthReq, maximum_encryption_key_size : 5, // 7 - 16 _reserved_ : 3, // InitiatorKeyDistribution InitiatorEncKey : 1, InitiatorIdKey : 1, InitiatorSignKey : 1, InitiatorLinkKey : 1, reserved : 4, initiator_enc_key : 1, initiator_id_key : 1, initiator_sign_key : 1, initiator_link_key : 1, _reserved_ : 4, // ResponderKeyDistribution ResponderEncKey : 1, ResponderIdKey : 1, ResponderSignKey : 1, ResponderLinkKey : 1, reserved : 4, responder_enc_key : 1, responder_id_key : 1, responder_sign_key : 1, responder_link_key : 1, _reserved_ : 4, } packet PairingRequest : Command (Code = PAIRING_REQUEST) { PairingInfoT, packet PairingRequest : Command (code = PAIRING_REQUEST) { PairingInfo, } packet PairingResponse : Command (Code = PAIRING_RESPONSE) { PairingInfoT, packet PairingResponse : Command (code = PAIRING_RESPONSE) { PairingInfo, } packet PairingConfirm : Command (Code = PAIRING_CONFIRM) { ConfirmValue : 8[16], // Initiating device sends Mconfirm, responding device sends Sconfirm packet PairingConfirm : Command (code = PAIRING_CONFIRM) { // confirm_value : 8[16], // Initiating device sends Mconfirm, responding device sends Sconfirm _payload_, } packet PairingRandom : Command (Code = PAIRING_RANDOM) { RandomValue : 8[16], // Initiating device sends Mrand, responding device sends Srand packet PairingRandom : Command (code = PAIRING_RANDOM) { // random_value : 8[16], // Initiating device sends Mrand, responding device sends Srand _payload_, } enum PairingFailedReasonT : 8 { enum PairingFailedReason : 8 { PASSKEY_ENTRY_FAILED = 0x01, OOB_NOT_AVAILABLE = 0x02, AUTHENTICATION_REQUIREMENTS = 0x03, Loading @@ -100,51 +106,56 @@ enum PairingFailedReasonT : 8 { CROSS_TRANSPORT_KEY_DERIVATION_NOT_ALLOWED = 0x0E, } packet PairingFailed : Command (Code = PAIRING_FAILED) { Reason : PairingFailedReasonT, packet PairingFailed : Command (code = PAIRING_FAILED) { reason : PairingFailedReason, } packet EncryptionInformation : Command (Code = ENCRYPTION_INFORMATION) { LongTermKey : 8[16], packet EncryptionInformation : Command (code = ENCRYPTION_INFORMATION) { // long_term_key : 8[16], _payload_, } packet MasterIdentification : Command (Code = MASTER_IDENTIFICATION) { Ediv : 16, Rand : 64, packet MasterIdentification : Command (code = MASTER_IDENTIFICATION) { ediv : 16, rand : 64, } packet IdentityInformation : Command (Code = IDENTITY_INFORMATION) { IdentityResolvingKey : 8[16], packet IdentityInformation : Command (code = IDENTITY_INFORMATION) { // identity_resolving_key : 8[16], _payload_, } enum AddrTypeT : 8 { enum AddrType : 8 { PUBLIC = 0x00, STATIC_RANDOM = 0x01, } packet IdentityAddressInformation : Command (Code = IDENTITY_ADDRESS_INFORMATION) { AddrType : AddrTypeT, BdAddr : 8[6], packet IdentityAddressInformation : Command (code = IDENTITY_ADDRESS_INFORMATION) { addr_type : AddrType, bd_addr : Address, } packet SigningInformation : Command (Code = SIGNING_INFORMATION) { SignatureKey : 8[16], packet SigningInformation : Command (code = SIGNING_INFORMATION) { // signature_key : 8[16], _payload_, } packet SecurityRequest : Command (Code = SECURITY_REQUEST) { AuthReqT, packet SecurityRequest : Command (code = SECURITY_REQUEST) { AuthReq, } packet PairingPublicKey : Command (Code = PAIRING_PUBLIC_KEY) { PublicKeyX : 8[32], PublicKeyY : 8[32], packet PairingPublicKey : Command (code = PAIRING_PUBLIC_KEY) { // public_key_x : 8[32], // public_key_y : 8[32], _payload_, } packet PairingDhKeyCheck : Command (Code = PAIRING_DH_KEY_CHECK) { DhKeyCheck : 8[16], packet PairingDhKeyCheck : Command (code = PAIRING_DH_KEY_CHECK) { // dh_key_check : 8[16], _payload_, } enum KeypressNotificationTypeT : 8 { enum KeypressNotificationType : 8 { ENTRY_STARTED = 0, DIGIT_ENTERED = 1, DIGIT_ERASED = 2, Loading @@ -152,7 +163,6 @@ enum KeypressNotificationTypeT : 8 { ENTRY_COMPLETED = 4, } packet PairingKeypressNotification : Command (Code = PAIRING_KEYPRESS_NOTIFICATION) { NotificationType : KeypressNotificationTypeT, packet PairingKeypressNotification : Command (code = PAIRING_KEYPRESS_NOTIFICATION) { notification_type : KeypressNotificationType, } Loading
packets/smp.pdl→system/gd/smp/smp_packets.pdl +168 −0 Original line number Diff line number Diff line enum CodeT : 8 { little_endian_packets custom_field Address : 48 "hci/" enum Code : 8 { PAIRING_REQUEST = 0x01, PAIRING_RESPONSE = 0x02, PAIRING_CONFIRM = 0x03, Loading @@ -16,11 +20,11 @@ enum CodeT : 8 { } packet Command { Code : CodeT, payload, code : Code, _payload_, } enum IoCapabilityT : 8 { enum IoCapability : 8 { DISPLAY_ONLY = 0x00, DISPLAY_YES_NO = 0x01, KEYBOARD_ONLY = 0x02, Loading @@ -28,62 +32,64 @@ enum IoCapabilityT : 8 { KEYBOARD_DISPLAY = 0x04, } enum OobDataFlagT : 8 { enum OobDataFlag : 8 { NOT_PRESENT = 0x00, PRESENT = 0x01, } enum BondingFlagsT : 2 { enum BondingFlags : 2 { NO_BONDING = 0, BONDING = 1, } group AuthReqT { BondingFlags : BondingFlagsT, Mitm : 1, // Man-in-the-middle protection required SC : 1, // Secure Connections Keypress : 1, // Only used in Passkey Entry Ct2 : 1, // Support for the h7 function. reserved : 2, group AuthReq { bonding_flags : BondingFlags, mitm : 1, // Man-in-the-middle protection required sc : 1, // Secure Connections keypress : 1, // Only used in Passkey Entry ct2 : 1, // Support for the h7 function. _reserved_ : 2, } group PairingInfoT { IoCapability : IoCapabilityT, OobDataFlag : OobDataFlagT, AuthReqT, MaximumEncryptionKeySize : 5, // 7 - 16 reserved : 3, group PairingInfo { io_capability : IoCapability, oob_data_flag : OobDataFlag, AuthReq, maximum_encryption_key_size : 5, // 7 - 16 _reserved_ : 3, // InitiatorKeyDistribution InitiatorEncKey : 1, InitiatorIdKey : 1, InitiatorSignKey : 1, InitiatorLinkKey : 1, reserved : 4, initiator_enc_key : 1, initiator_id_key : 1, initiator_sign_key : 1, initiator_link_key : 1, _reserved_ : 4, // ResponderKeyDistribution ResponderEncKey : 1, ResponderIdKey : 1, ResponderSignKey : 1, ResponderLinkKey : 1, reserved : 4, responder_enc_key : 1, responder_id_key : 1, responder_sign_key : 1, responder_link_key : 1, _reserved_ : 4, } packet PairingRequest : Command (Code = PAIRING_REQUEST) { PairingInfoT, packet PairingRequest : Command (code = PAIRING_REQUEST) { PairingInfo, } packet PairingResponse : Command (Code = PAIRING_RESPONSE) { PairingInfoT, packet PairingResponse : Command (code = PAIRING_RESPONSE) { PairingInfo, } packet PairingConfirm : Command (Code = PAIRING_CONFIRM) { ConfirmValue : 8[16], // Initiating device sends Mconfirm, responding device sends Sconfirm packet PairingConfirm : Command (code = PAIRING_CONFIRM) { // confirm_value : 8[16], // Initiating device sends Mconfirm, responding device sends Sconfirm _payload_, } packet PairingRandom : Command (Code = PAIRING_RANDOM) { RandomValue : 8[16], // Initiating device sends Mrand, responding device sends Srand packet PairingRandom : Command (code = PAIRING_RANDOM) { // random_value : 8[16], // Initiating device sends Mrand, responding device sends Srand _payload_, } enum PairingFailedReasonT : 8 { enum PairingFailedReason : 8 { PASSKEY_ENTRY_FAILED = 0x01, OOB_NOT_AVAILABLE = 0x02, AUTHENTICATION_REQUIREMENTS = 0x03, Loading @@ -100,51 +106,56 @@ enum PairingFailedReasonT : 8 { CROSS_TRANSPORT_KEY_DERIVATION_NOT_ALLOWED = 0x0E, } packet PairingFailed : Command (Code = PAIRING_FAILED) { Reason : PairingFailedReasonT, packet PairingFailed : Command (code = PAIRING_FAILED) { reason : PairingFailedReason, } packet EncryptionInformation : Command (Code = ENCRYPTION_INFORMATION) { LongTermKey : 8[16], packet EncryptionInformation : Command (code = ENCRYPTION_INFORMATION) { // long_term_key : 8[16], _payload_, } packet MasterIdentification : Command (Code = MASTER_IDENTIFICATION) { Ediv : 16, Rand : 64, packet MasterIdentification : Command (code = MASTER_IDENTIFICATION) { ediv : 16, rand : 64, } packet IdentityInformation : Command (Code = IDENTITY_INFORMATION) { IdentityResolvingKey : 8[16], packet IdentityInformation : Command (code = IDENTITY_INFORMATION) { // identity_resolving_key : 8[16], _payload_, } enum AddrTypeT : 8 { enum AddrType : 8 { PUBLIC = 0x00, STATIC_RANDOM = 0x01, } packet IdentityAddressInformation : Command (Code = IDENTITY_ADDRESS_INFORMATION) { AddrType : AddrTypeT, BdAddr : 8[6], packet IdentityAddressInformation : Command (code = IDENTITY_ADDRESS_INFORMATION) { addr_type : AddrType, bd_addr : Address, } packet SigningInformation : Command (Code = SIGNING_INFORMATION) { SignatureKey : 8[16], packet SigningInformation : Command (code = SIGNING_INFORMATION) { // signature_key : 8[16], _payload_, } packet SecurityRequest : Command (Code = SECURITY_REQUEST) { AuthReqT, packet SecurityRequest : Command (code = SECURITY_REQUEST) { AuthReq, } packet PairingPublicKey : Command (Code = PAIRING_PUBLIC_KEY) { PublicKeyX : 8[32], PublicKeyY : 8[32], packet PairingPublicKey : Command (code = PAIRING_PUBLIC_KEY) { // public_key_x : 8[32], // public_key_y : 8[32], _payload_, } packet PairingDhKeyCheck : Command (Code = PAIRING_DH_KEY_CHECK) { DhKeyCheck : 8[16], packet PairingDhKeyCheck : Command (code = PAIRING_DH_KEY_CHECK) { // dh_key_check : 8[16], _payload_, } enum KeypressNotificationTypeT : 8 { enum KeypressNotificationType : 8 { ENTRY_STARTED = 0, DIGIT_ENTERED = 1, DIGIT_ERASED = 2, Loading @@ -152,7 +163,6 @@ enum KeypressNotificationTypeT : 8 { ENTRY_COMPLETED = 4, } packet PairingKeypressNotification : Command (Code = PAIRING_KEYPRESS_NOTIFICATION) { NotificationType : KeypressNotificationTypeT, packet PairingKeypressNotification : Command (code = PAIRING_KEYPRESS_NOTIFICATION) { notification_type : KeypressNotificationType, }