Changes

1,036 bytes added ,  02:09, 3 August 2020
no edit summary
Line 452: Line 452:  
=== GetGattIncludedServices ===
 
=== GetGattIncludedServices ===
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattService]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattService]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
 +
 +
The u32 is handled the same as [[#BleDisconnect]]. The max array entries is 100.
 +
 +
Same as [[#GetGattServices]] except this only returns [[#GattService]] entries where various checks pass with u16 fields.
    
The param for the output u8 is unused by the sysmodule, hence the output is always 0. However, a sdknso func which calls the nn::btm::* func for this expects this u8 to be set.
 
The param for the output u8 is unused by the sysmodule, hence the output is always 0. However, a sdknso func which calls the nn::btm::* func for this expects this u8 to be set.
Line 457: Line 461:  
=== GetBelongingGattService ===
 
=== GetBelongingGattService ===
 
Takes a PID, a type-0x1A output buffer containing a [[#GattService]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 
Takes a PID, a type-0x1A output buffer containing a [[#GattService]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 +
 +
The u32 is handled the same as [[#BleDisconnect]].
 +
 +
This is similar to [[#GetGattIncludedServices]] except this only returns 1 [[#GattService]].
    
=== GetGattCharacteristics ===
 
=== GetGattCharacteristics ===
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattCharacteristic]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattCharacteristic]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 +
 +
The u32 is handled the same as [[#BleDisconnect]]. The max array entries is 100.
 +
 +
The u16 controls which [[#GattCharacteristic]] entries to return.
    
=== GetGattDescriptors ===
 
=== GetGattDescriptors ===
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattDescriptor]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 
Takes a PID, a type-0x6 output buffer containing an array of [[#GattDescriptor]], an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8 total_out.
 +
 +
The u32 is handled the same as [[#BleDisconnect]]. The max array entries is 100.
 +
 +
The u16 controls which [[#GattDescriptor]] entries to return.
    
=== AcquireBleMtuConfigEvent ===
 
=== AcquireBleMtuConfigEvent ===
Line 471: Line 487:  
=== ConfigureBleMtu ===
 
=== ConfigureBleMtu ===
 
Takes a PID, an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
 
Takes a PID, an u16, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
 +
 +
The u32 is handled the same as [[#BleDisconnect]].
    
sdknso will Abort if the user-specified u16 is <0x18 or >0x200.
 
sdknso will Abort if the user-specified u16 is <0x18 or >0x200.
Line 476: Line 494:  
=== GetBleMtu ===
 
=== GetBleMtu ===
 
Takes a PID, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u16.
 
Takes a PID, an u32, an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u16.
 +
 +
The u32 is handled the same as [[#BleDisconnect]].
    
=== RegisterBleGattDataPath ===
 
=== RegisterBleGattDataPath ===
Line 485: Line 505:  
= GattService =
 
= GattService =
 
This is "nn::btm::user::GattService". This is a 0x24-byte struct.
 
This is "nn::btm::user::GattService". This is a 0x24-byte struct.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 ||
 +
|-
 +
| 0x4 || 0x14 || [[Bluetooth_Driver_services#GattAttributeUuid|GattAttributeUuid]]
 +
|-
 +
| 0x18 || 0x2 ||
 +
|-
 +
| 0x1A || 0x4 ||
 +
|-
 +
| 0x1E || 0x2 ||
 +
|-
 +
| 0x20 || 0x1 ||
 +
|-
 +
| 0x21 || 0x3 || Padding
 +
|}
    
= GattCharacteristic =
 
= GattCharacteristic =