BTM services: Difference between revisions

No edit summary
(2 intermediate revisions by the same user not shown)
Line 188: Line 188:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || GetCore
| 0 || [[#GetCore]]
|}
|}
== GetCore ==
No input, returns an output [[#IBtmSystemCore]].


== IBtmSystemCore ==
== IBtmSystemCore ==
Line 198: Line 201:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || StartGamepadPairing
| 0 || [[#StartGamepadPairing]]
|-
|-
| 1 || CancelGamepadPairing
| 1 || [[#CancelGamepadPairing]]
|-
|-
| 2 || ClearGamepadPairingDatabase
| 2 || [[#ClearGamepadPairingDatabase]]
|-
|-
| 3 || GetPairedGamepadCount
| 3 || [[#GetPairedGamepadCount]]
|-
|-
| 4 || EnableRadio
| 4 || [[#EnableRadio]]
|-
|-
| 5 || DisableRadio
| 5 || [[#DisableRadio]]
|-
|-
| 6 || GetRadioOnOff
| 6 || [[#GetRadioOnOff]]
|-
|-
| 7 || [3.0.0+] AcquireRadioEvent
| 7 || [3.0.0+] [[#AcquireRadioEvent]]
|-
|-
| 8 || [3.0.0+] AcquireGamepadPairingEvent
| 8 || [3.0.0+] [[#AcquireGamepadPairingEvent]]
|-
|-
| 9 || [3.0.0+] IsGamepadPairingStarted
| 9 || [3.0.0+] [[#IsGamepadPairingStarted]]
|}
|}
=== StartGamepadPairing ===
No input/output.
=== CancelGamepadPairing ===
No input/output.
=== ClearGamepadPairingDatabase ===
No input/output.
=== GetPairedGamepadCount ===
No input, returns an output u8.
=== EnableRadio ===
No input/output.
=== DisableRadio ===
No input/output.
=== GetRadioOnOff ===
No input, returns an output bool.
=== AcquireRadioEvent ===
No input, returns an output bool and handle.
=== AcquireGamepadPairingEvent ===
No input, returns an output bool and handle.
=== IsGamepadPairingStarted ===
No input, returns an output bool.


= btm:u =
= btm:u =
Line 307: Line 340:


=== AcquireBleScanEvent ===
=== AcquireBleScanEvent ===
No input, returns an output Event handle with EventClearMode=1.
No input, returns an output u8 and an Event handle with EventClearMode=1.
 
sdknso will Abort if the output u8 is value 0.


=== GetBleScanFilterParameter ===
=== GetBleScanFilterParameter ===
Takes an input u16, returns a [[#BleAdvertisePacketParameter]].
Takes an input u16, returns a [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]].


=== GetBleScanFilterParameter2 ===
=== GetBleScanFilterParameter2 ===
Takes an input u16, returns a [[#GattAttributeUuid]].
Takes an input u16, returns a [[Bluetooth_Driver_services#GattAttributeUuid|GattAttributeUuid]].


=== StartBleScanForGeneral ===
=== StartBleScanForGeneral ===
Takes a PID, a [[#BleAdvertisePacketParameter]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
Takes a PID, a [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.


=== StopBleScanForGeneral ===
=== StopBleScanForGeneral ===
Line 322: Line 357:


=== GetBleScanResultsForGeneral ===
=== GetBleScanResultsForGeneral ===
Takes a PID, a type-0x6 output buffer containing an array of [[#BleScanResult]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
Takes a PID, a type-0x6 output buffer containing an array of [[Bluetooth_Driver_services#BleScanResult|BleScanResult]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.


=== StartBleScanForPaired ===
=== StartBleScanForPaired ===
Takes a PID, a [[#BleAdvertisePacketParameter]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
Takes a PID, a [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.


=== StopBleScanForPaired ===
=== StopBleScanForPaired ===
Line 331: Line 366:


=== StartBleScanForSmartDevice ===
=== StartBleScanForSmartDevice ===
Takes a PID, a [[#GattAttributeUuid]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
Takes a PID, a [[Bluetooth_Driver_services#GattAttributeUuid|GattAttributeUuid]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.


=== StopBleScanForSmartDevice ===
=== StopBleScanForSmartDevice ===
Line 337: Line 372:


=== GetBleScanResultsForSmartDevice ===
=== GetBleScanResultsForSmartDevice ===
Takes a PID, a type-0x6 output buffer containing an array of [[#BleScanResult]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
Takes a PID, a type-0x6 output buffer containing an array of [[Bluetooth_Driver_services#BleScanResult|BleScanResult]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.


=== AcquireBleConnectionEvent ===
=== AcquireBleConnectionEvent ===
Line 345: Line 380:


=== BleConnect ===
=== BleConnect ===
Takes a PID, an [[#Bluetooth_Driver_services#Address|Address]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
Takes a PID, an [[Bluetooth_Driver_services#Address|Address]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.


=== BleDisconnect ===
=== BleDisconnect ===
Line 351: Line 386:


=== BleGetConnectionState ===
=== BleGetConnectionState ===
Takes a PID, a type-0xA output buffer containing an array of [[#BleConnectionInfo]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
Takes a PID, a type-0xA output buffer containing an array of [[Bluetooth_Driver_services#BleConnectionInfo|BleConnectionInfo]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.


=== AcquireBlePairingEvent ===
=== AcquireBlePairingEvent ===
Line 359: Line 394:


=== BlePairDevice ===
=== BlePairDevice ===
Takes an input [[#BleAdvertisePacketParameter]] and an u32, no output.
Takes an input [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]] and an u32, no output.


=== BleUnPairDevice ===
=== BleUnPairDevice ===
Takes an input [[#BleAdvertisePacketParameter]] and an u32, no output.
Takes an input [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]] and an u32, no output.


=== BleUnPairDevice2 ===
=== BleUnPairDevice2 ===
Takes an input [[#Bluetooth_Driver_services#Address|Address]] and a [[#BleAdvertisePacketParameter]], no output.
Takes an input [[Bluetooth_Driver_services#Address|Address]] and a [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]], no output.


=== BleGetPairedDevices ===
=== BleGetPairedDevices ===
Takes a type-0xA output buffer containing an array of [[#Bluetooth_Driver_services#Address|Address]], a [[#BleAdvertisePacketParameter]], returns an output u8.
Takes a type-0xA output buffer containing an array of [[Bluetooth_Driver_services#Address|Address]], a [[Bluetooth_Driver_services#BleAdvertisePacketParameter|BleAdvertisePacketParameter]], returns an output u8.


=== AcquireBleServiceDiscoveryEvent ===
=== AcquireBleServiceDiscoveryEvent ===
Line 379: Line 414:


=== GetGattService ===
=== GetGattService ===
Takes a PID, a type-0x1A output buffer containing a [[#GattService]], an u32, a [[#GattAttributeUuid]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.
Takes a PID, a type-0x1A output buffer containing a [[#GattService]], an u32, a [[Bluetooth_Driver_services#GattAttributeUuid|GattAttributeUuid]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], returns an output u8.


=== GetGattIncludedServices ===
=== GetGattIncludedServices ===
Line 411: Line 446:
=== UnregisterBleGattDataPath ===
=== UnregisterBleGattDataPath ===
Takes a PID, a [[#BleDataPath]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
Takes a PID, a [[#BleDataPath]], an [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]], no output.
= BleAdvertisePacketParameter =
This is "nn::bluetooth::BleAdvertisePacketParameter". This is a 8-byte struct with 1-byte alignment.
= GattAttributeUuid =
This is "nn::bluetooth::GattAttributeUuid". This is a 0x14-byte struct with 4-byte alignment.
= BleScanResult =
This is "nn::bluetooth::BleScanResult". This is a 0x148-byte struct.
= BleConnectionInfo =
This is "nn::bluetooth::BleConnectionInfo". This is a 0xC-byte struct.


= GattService =
= GattService =