Changes

Jump to navigation Jump to search
Line 275: Line 275:  
This is used by [[BTM_services|btm]], this should not be used by other processes.
 
This is used by [[BTM_services|btm]], this should not be used by other processes.
   −
This first initializes the funcptr table interfaces to the defaults (same as [[#DisableBluetooth]]). [[Settings_services#GetConfigurationId1|GetConfigurationId1]] is used, an error is thrown if the output string is empty, or if it matches "SDEV_00_01_00".
+
[1.0.0-11.0.1] This first initializes the funcptr table interfaces to the defaults (same as [[#DisableBluetooth]]). [[Settings_services#GetConfigurationId1|GetConfigurationId1]] is used, an error is thrown if the output string is empty, or if it matches "SDEV_00_01_00".
   −
If the flag for [[#IsManufacturingMode]] is 0, or if this cmd was already used where that flag was 1, an interface funcptr is called. This is passed a ptr to a table of funcptrs. The ret is converted to a Result and returned if needed.
+
If the flag for [[#IsManufacturingMode]] is 0, or if this cmd was already used where that flag was 1, an interface funcptr is called. This is passed a ptr to a table of funcptrs. The ret is converted to a Result and returned if needed. [12.0.0+] A normal func is called instead, with no params/ret. This cmd always returns 0.
   −
The funcptr does the following:
+
The above called func does the following:
* A func is called, which copies the input funcptr table into global state. These are used for writing events into [[#EventInfo]].
+
* [1.0.0-11.0.1] A func is called, which copies the input funcptr table into global state. These are used for writing events into [[#EventInfo]].
* A func is called 5 times with input param = [1-5]. This initializes the specified nn::bluetooth::CircularBuffer (sharedmem and internal).
+
* A func is called 5 times with input param = [1-5]. This initializes the specified nn::bluetooth::CircularBuffer (sharedmem and internal). [12.0.0+] This functionality is now inlined.
* A func is called for creating the "nn.bluetooth.HidMessageHandler" thread.
+
* A func is called for creating the "nn.bluetooth.HidMessageHandler" thread. [12.0.0+] This functionality is now inlined.
   −
Lastly, the Event is created and returned (which global state the Event is stored in depends on whether the code-path which calls the above funcptr was used).
+
Lastly, the Event is ([1.0.0-11.0.1] created and) returned (which global state the Event is stored in depends on whether the code-path which calls the above funcptr was used).
    
== EnableBluetooth ==
 
== EnableBluetooth ==
Line 291: Line 291:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
This first calls an interface funcptr, on failure 0xCA71 is returned.
+
[1.0.0-11.0.1] This first calls an interface funcptr, on failure 0xCA71 is returned.
   −
A global fixed [[#Address]] is copied to stack, this stack data is then overwritten with the output from [[Settings_services|GetBluetoothBdAddress]]. If GetBluetoothBdAddress fails, this will Abort. Then the same funcptr used by [[#SetAdapterProperty]] is called with this stack data, with [[#BluetoothPropertyType|type2]]. A converted error is returned if needed.
+
[1.0.0-11.0.1] A global fixed [[#Address]] is copied to stack, this stack data is then overwritten with the output from [[Settings_services|GetBluetoothBdAddress]]. If GetBluetoothBdAddress fails, this will Abort. Then the same funcptr used by [[#SetAdapterProperty]] is called with this stack data, with [[#BluetoothPropertyType|type2]]. A converted error is returned if needed.
   −
The last two bytes of the stack [[#Address]] are inverted (byteval = ~byteval), then the above funcptr is called with this for [[#BluetoothPropertyType|type3]]. Error conversion is handled if needed, then this returns 0.
+
[1.0.0-11.0.1] The last two bytes of the stack [[#Address]] are inverted (byteval = ~byteval), then the above funcptr is called with this for [[#BluetoothPropertyType|type3]]. Error conversion is handled if needed, then this returns 0.
   −
The first funcptr called above does the following:
+
The first funcptr called above does the following ([12.0.0+] this code is now inlined):
 
* Calls a GPIO func with param=0, [[SVC|sleeps]] for 10000000 nanoseconds, then calls the GPIO func again with param=1.
 
* Calls a GPIO func with param=0, [[SVC|sleeps]] for 10000000 nanoseconds, then calls the GPIO func again with param=1.
 +
* [12.0.0+] Calls a func to update an interface object ptr to use the enabled-object. A vfunc for various interface objects are called, with Result 0xCA71 being returned if the ret is non-zero (failure after the first interface object will trigger an Abort).
 +
* [12.0.0+] [[Settings_services|GetBluetoothBdAddress]] is used, on failure this will Abort. Then the same vfunc used by [[#SetAdapterProperty]] is called with the output from GetBluetoothBdAddress, with [[#AdapterPropertyType|type0]]. This will Abort on failure.
 +
* [12.0.0+] The last two bytes of the stack [[#Address]] are inverted (byteval = ~byteval), then the above vfunc is called with this for [[#AdapterPropertyType|type3]]. This will Abort on failure, otherwise 0 is returned.
 +
* [12.0.0+] Various code described below was moved into the above vfunc(s), etc.
 
* Calls a func for initializing the paired-devices table (empty).
 
* Calls a func for initializing the paired-devices table (empty).
 
* Calls a modified version of BSA_Boot, which handles BSA server initialization.
 
* Calls a modified version of BSA_Boot, which handles BSA server initialization.
Line 314: Line 318:  
* Uses SetValue with the param which was passed to this func.
 
* Uses SetValue with the param which was passed to this func.
 
* Does cleanup for the session object and exits the service.
 
* Does cleanup for the session object and exits the service.
 +
 +
[12.0.0+] The Enable vfunc called above for Audio does the following:
 +
* Calls a func which does the following:
 +
** Uses BSA to enable AV. Besides the callback, the only field in the passed struct which is set is <code>features</code>. This is set for "remote control target".
 +
** Error handling + state setup is done.
 +
** Uses BSA to register AV twice, with the default input struct.
 +
** Error handling + state setup is done.
 +
* If an error occurred in a certain range, a [[#FatalReason|fatal]] is triggered and 0 is returned.
 +
* Otherwise when successful, state init is done then 0 is returned.
    
== DisableBluetooth ==
 
== DisableBluetooth ==
Line 320: Line 333:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
This calls an interface funcptr. On success, the funcs for updating the interface funcptr tables are called (same as [[#InitializeBluetooth]]). Then the converted ret is returned as needed.
+
[1.0.0-11.0.1] This calls an interface funcptr. On success, the funcs for updating the interface funcptr tables are called (same as [[#InitializeBluetooth]]). Then the converted ret is returned as needed.
 +
 
 +
* [12.0.0+] Vfuncs for various interface objects are called, with failure triggering an Abort in some cases.
 +
* [12.0.0+] Calls funcs to update interfaces object ptrs to use the disabled-object.
 +
* [12.0.0+] Calls the same GPIO func as [[#EnableBluetooth]] with param=0, then 0 is returned.
 +
* [12.0.0+] Various code described below was moved into the above vfunc(s), etc.
    
When bluetooth is already disabled, that funcptr just returns 0. Otherwise when it's already enabled, it does the following:
 
When bluetooth is already disabled, that funcptr just returns 0. Otherwise when it's already enabled, it does the following:
Line 372: Line 390:  
No input/output.
 
No input/output.
   −
[12.0.0+] Takes an input BitFlagSet 32bit [[#ServiceFlag|service_mask]] and s64 nanoseconds_duration, no output.
+
[12.0.0+] Takes an input BitFlagSet 32bit [[#ServiceFlag|services]] and s64 nanoseconds_duration, no output.
    
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
Line 378: Line 396:  
This starts Inquiry, the output data will be available via [[#GetEventInfo]]. Inquiry will automatically stop in 10.24 seconds ([12.0.0+] calculated from the input duration instead).
 
This starts Inquiry, the output data will be available via [[#GetEventInfo]]. Inquiry will automatically stop in 10.24 seconds ([12.0.0+] calculated from the input duration instead).
   −
[12.0.0+] When service_mask is -1 the original defaults from pre-12.0.0 are used (besides duration). Otherwise, service_mask is written into the parameter struct (masked with the all-allowed-BSA-services value), and the EventInfo for discovered devices are triggered when inquiry finishes instead of immediately.
+
[12.0.0+] When services is -1 the original defaults from pre-12.0.0 are used (besides duration). Otherwise, services is written into the parameter struct (masked with the all-allowed-BSA-services value), and the EventInfo for discovered devices are triggered when inquiry finishes instead of immediately.
    
== StopInquiry ==
 
== StopInquiry ==
Line 430: Line 448:     
This copies 0x400-bytes from state to the output buffer, copies the [[#EventType]] from state to output, and signals an event.
 
This copies 0x400-bytes from state to the output buffer, copies the [[#EventType]] from state to output, and signals an event.
 +
 +
[12.0.0+] Mutex locking is now used, with the code prior to the event-signal. If a size field in state is 0, writing the output [[#EventType]]/buffer is skipped. Otherwise, the size field is reset to 0, the [[#EventType]] from state is copied to output, and the original size field is used to memcpy to the output buffer from state.
    
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
Line 507: Line 527:     
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
 +
 +
[12.0.0+] If [[Settings_services#BluetoothDevicesSettings|TrustedServices]] is 0, value 0x100000 is used. When bit20 is set, HID is initialized for this device, otherwise when bitmask 0xC0000 is set (<code>if((TrustedServices & 0xC0000) != 0)</code>) [[#OpenAudioConnection|audio]] is initialized for this device.
    
== GetPairedDeviceInfo ==
 
== GetPairedDeviceInfo ==
Line 522: Line 544:     
This copies 0x480-bytes from state to the output buffer. [[#HidEventType]] is set to: stateval!=0 ? 7 : 0. Once finished, this signals an event.
 
This copies 0x480-bytes from state to the output buffer. [[#HidEventType]] is set to: stateval!=0 ? 7 : 0. Once finished, this signals an event.
 +
 +
[12.0.0+] Mutex locking is now used, with the code prior to the event-signal. If a size field in state is 0, writing the output [[#HidEventType]]/buffer is skipped. Otherwise, the size field is reset to 0, the [[#HidEventType]] from state is copied to output, and the original size field is used to memcpy to the output buffer from state.
    
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
 +
 +
See [[#HidEventInfo]].
    
== SetTsi ==
 
== SetTsi ==
Line 530: Line 556:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
The response will be available via [[#GetHidEventInfo]].
+
The response will be available via [[#GetHidEventInfo]] ([12.0.0+] [[#GetEventInfo]]).
    
This uses a BSA extension.
 
This uses a BSA extension.
Line 545: Line 571:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
The response will be available via [[#GetHidEventInfo]].
+
The response will be available via [[#GetHidEventInfo]] ([12.0.0+] [[#GetEventInfo]]).
    
This uses a BSA extension.
 
This uses a BSA extension.
Line 558: Line 584:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
The response will be available via [[#GetHidEventInfo]].
+
The response will be available via [[#GetHidEventInfo]] ([12.0.0+] [[#GetEventInfo]]).
    
This uses a BSA extension (message 0x8CF).
 
This uses a BSA extension (message 0x8CF).
Line 638: Line 664:  
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
   −
The output data will be available via [[#GetHidEventInfo]].
+
The output data will be available via [[#GetHidEventInfo]] ([12.0.0+] [[#GetEventInfo]]).
    
== GetChannelMap ==
 
== GetChannelMap ==
Line 920: Line 946:  
Takes an input [[#Address]], no output.
 
Takes an input [[#Address]], no output.
   −
The response will be available via [[#GetHidEventInfo]].
+
The response will be available via [[#GetHidEventInfo]] ([12.0.0+] [[#GetEventInfo]]).
    
This uses a BSA extension (message 0x8D0).
 
This uses a BSA extension (message 0x8D0).
Line 931: Line 957:     
sdknso uses an user-specified EventClearMode.
 
sdknso uses an user-specified EventClearMode.
 +
 +
This just gets a previously-initialized Event from global state, [[#IsManufacturingMode]] is used to select which Event to use.
    
== GetAudioEventInfo ==
 
== GetAudioEventInfo ==
 
Takes a type-0xA output buffer, returns an output [[#AudioEventType]].
 
Takes a type-0xA output buffer, returns an output [[#AudioEventType]].
 +
 +
This is essentially the same as the other [12.0.0+] Get*EventInfo cmds, however in this case the output type is set to value 0 when no event is available.
 +
 +
See [[#AudioEventInfo]].
    
== OpenAudioConnection ==
 
== OpenAudioConnection ==
 
Takes an input [[#Address]], no output.
 
Takes an input [[#Address]], no output.
 +
 +
This goes through state and eventually uses BSA to open an AV connection. The input struct has the RC flag set to true. sec_mask is set to require authentication and encryption.
    
== CloseAudioConnection ==
 
== CloseAudioConnection ==
 
Takes an input [[#Address]], no output.
 
Takes an input [[#Address]], no output.
 +
 +
This goes through state and eventually uses BSA to close an AV connection.
    
== OpenAudioOut ==
 
== OpenAudioOut ==
Takes an input [[#Address]], returns an output u32.
+
Takes an input [[#Address]], returns an output u32 audio_handle.
    
== CloseAudioOut ==
 
== CloseAudioOut ==
Takes an input u32, no output.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], no output.
    
== AcquireAudioOutStateChangedEvent ==
 
== AcquireAudioOutStateChangedEvent ==
Takes an input u32, returns an output Event handle.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output Event handle.
    
sdknso uses an user-specified EventClearMode.
 
sdknso uses an user-specified EventClearMode.
    
== StartAudioOut ==
 
== StartAudioOut ==
Takes an input u32, a [[#PcmParameter]], a nn::TimeSpan, returns an output nn::TimeSpan and u64.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], a [[#PcmParameter]], a nn::TimeSpan latency, returns an output nn::TimeSpan latency and u64.
 +
 
 +
This eventually uses BSA to start an AV stream. The codec is "Raw PCM". Synchronous feeding mode is used.
    
== StopAudioOut ==
 
== StopAudioOut ==
Takes an input u32, no output.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], no output.
 +
 
 +
This eventually uses BSA to stop an AV stream. The pause flag is set to false.
    
== GetAudioOutState ==
 
== GetAudioOutState ==
Takes an input u32, returns an output [[#AudioOutState]].
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output [[#AudioOutState]].
    
== GetAudioOutFeedingCodec ==
 
== GetAudioOutFeedingCodec ==
Takes an input u32, returns an output [[#AudioCodec]].
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output [[#AudioCodec]].
    
== GetAudioOutFeedingParameter ==
 
== GetAudioOutFeedingParameter ==
Takes an input u32, returns an output [[#PcmParameter]].
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output [[#PcmParameter]].
    
== AcquireAudioOutBufferAvailableEvent ==
 
== AcquireAudioOutBufferAvailableEvent ==
Takes an input u32, returns an output Event handle.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], returns an output Event handle.
    
sdknso uses an user-specified EventClearMode.
 
sdknso uses an user-specified EventClearMode.
 +
 +
This gets an Event which was previously initialized.
    
== SendAudioData ==
 
== SendAudioData ==
Takes an input u32, a type-0x9 input buffer, returns an output u64.
+
Takes an input u32 [[#OpenAudioOut|audio_handle]], a type-0x9 input buffer, returns an output u64 transferred_size.
 +
 
 +
This eventually uses BSA to send the specified buffer to the required UIPC channel. If transferred_size doesn't match the buffer size, error 0x177A71 is returned. transferred_size is always either 0 (error occured) or the buffer size.
    
== AcquireAudioControlInputStateChangedEvent ==
 
== AcquireAudioControlInputStateChangedEvent ==
Line 979: Line 1,023:     
sdknso uses an user-specified EventClearMode.
 
sdknso uses an user-specified EventClearMode.
 +
 +
This gets an Event which was previously initialized.
    
== GetAudioControlInputState ==
 
== GetAudioControlInputState ==
Takes a type-0xA output buffer containing an array of [[#AudioControlButtonState]], returns an output s32.
+
Takes a type-0xA output buffer containing an array of [[#AudioControlButtonState]], returns an output s32 total_out.
 +
 
 +
A maximum of 0xF entries can be returned.
    
== AcquireAudioConnectionStateChangedEvent ==
 
== AcquireAudioConnectionStateChangedEvent ==
Line 987: Line 1,035:     
sdknso uses an user-specified EventClearMode.
 
sdknso uses an user-specified EventClearMode.
 +
 +
This gets an Event which was previously initialized.
    
== GetConnectedAudioDevice ==
 
== GetConnectedAudioDevice ==
Takes a type-0xA output buffer containing an array of [[#Address]], returns an output s32.
+
Takes a type-0xA output buffer containing an array of [[#Address]], returns an output s32 total_out.
 +
 
 +
A maximum of 0x8 entries can be returned.
    
== IsManufacturingMode ==
 
== IsManufacturingMode ==
Line 996: Line 1,048:  
sdknso will Abort if this fails, the bool is returned instead of a Result. sdknso exposes this under "nn::bluetooth::debug::".
 
sdknso will Abort if this fails, the bool is returned instead of a Result. sdknso exposes this under "nn::bluetooth::debug::".
   −
This calls the same two funcs as various other cmds etc. This writes the bool returned by the second func to output, then returns 0. The second func loads the bool from [[System_Settings|system-setting]] "bluetooth_debug!skip_boot". The first func is the same as the second one, except it writes the bool into global state.
+
This calls the same two funcs as various other cmds etc. This writes the bool returned by the second func to output, then returns 0. The second func loads the bool from [[System_Settings|system-setting]] "bluetooth_debug!skip_boot". The first func is the same as the second one, except it writes the bool into global state. [12.0.0+] These two funcs now additionally load [[System_Settings|system-setting]] "bluetooth_config!skip_boot", which is ORRed with the first setting, then that's used for storing in state / returning the value.
    
This is used by [[BTM_services|btm]].
 
This is used by [[BTM_services|btm]].
Line 1,122: Line 1,174:  
This is u32 enum "nn::bluetooth::hal::AdapterPropertyType".
 
This is u32 enum "nn::bluetooth::hal::AdapterPropertyType".
   −
= TransportType =
+
The sysmodule will Abort if the input type is unavailable / not recognized.
This is u32 enum "nn::bluetooth::TransportType".
+
 
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
!  Data contents
 +
|-
 +
| 0 || Address || [[#Address]]
 +
|-
 +
| 1 || Name || String, max length 0xF8 excluding NUL-terminator.
 +
|-
 +
| 2 || || 3-bytes, Class of Device.
 +
|-
 +
| 3 || || Only available with [[#SetAdapterProperty]]. Same as [[#BluetoothPropertyType]] type3.
 +
|}
 +
 
 +
= TransportType =
 +
This is u32 enum "nn::bluetooth::TransportType".
    
= BluetoothSspVariant =
 
= BluetoothSspVariant =
Line 1,137: Line 1,206:  
!  Description
 
!  Description
 
|-
 
|-
| 0 || || The funcptr which writes the data into state for this event is not called (only checked on [10.0.0]).
+
| [1.0.0-11.0.1] 0 || || The funcptr which writes the data into state for this event is not called (only checked on [10.0.0]).
 
|-
 
|-
| 3 || || New device found during Inquiry.
+
| 0 ([1.0.0-11.0.1] 3) || || New device found during Inquiry.
 
|-
 
|-
| 4 || || Inquiry status changed.
+
| 1 ([1.0.0-11.0.1] 4) || || Inquiry status changed.
 
|-
 
|-
| 5 || || Triggered by BSA_SEC_PIN_REQ_EVT: PIN code request for pairing.
+
| 2 ([1.0.0-11.0.1] 5) || || Triggered by BSA_SEC_PIN_REQ_EVT: PIN code request for pairing.
 
|-
 
|-
| 6 || || Triggered by BSA_SEC_SP_CFM_REQ_EVT/BSA_SEC_SP_KEY_NOTIF_EVT: SSP confirm request / SSP passkey notification.
+
| 3 ([1.0.0-11.0.1] 6) || || Triggered by BSA_SEC_SP_CFM_REQ_EVT/BSA_SEC_SP_KEY_NOTIF_EVT: SSP confirm request / SSP passkey notification.
 
|-
 
|-
| 7 || || Connection
+
| 4 ([1.0.0-11.0.1] 7) || || Connection
 
|-
 
|-
| 13 || || BluetoothCrash. Triggered by [[#EmulateBluetoothCrash]] and BSA_MGT_DISCONNECT_EVT.
+
| 5 || || [12.0.0+] [[#SetTsi|Tsi]]
 +
|-
 +
| 6 || || [12.0.0+] [[#EnableBurstMode|BurstMode]]
 +
|-
 +
| 7 || || [12.0.0+] [[#SetZeroRetransmission]]
 +
|-
 +
| 8 || || [12.0.0+] [[#GetPendingConnections]]
 +
|-
 +
| 9 || || [12.0.0+] [[#MoveToSecondaryPiconet]]
 +
|-
 +
| 10 ([1.0.0-11.0.1] 13) || || BluetoothCrash. Triggered by [[#EmulateBluetoothCrash]] and BSA_MGT_DISCONNECT_EVT.
 
|}
 
|}
    
= ConnectionEventType =
 
= ConnectionEventType =
This is the event value in [[#EventInfo]] when [[#EventType]] is type7.
+
This is the event value in [[#EventInfo]] when [[#EventType]] is type4 ([1.0.0-11.0.1] type7).
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,161: Line 1,240:  
!  Description
 
!  Description
 
|-
 
|-
| 0 || || Connection status.
+
| 0 || || [1.0.0-11.0.1] Connection status.
 
|-
 
|-
| 1 || || Triggered by BSA_SEC_SP_CFM_REQ_EVT: SSP confirm request.
+
| 1 || || [1.0.0-11.0.1] Triggered by BSA_SEC_SP_CFM_REQ_EVT: SSP confirm request.
 
|-
 
|-
| 2 || || Triggered by BSA_SEC_SUSPENDED_EVT: ACL Link is now Suspended.
+
| 2 || || [12.0.0+] Triggered by BSA_SEC_RESUMED_EVT: ACL Link is now Resumed.
 +
|-
 +
| 3 ([1.0.0-11.0.1] 2) || || Triggered by BSA_SEC_SUSPENDED_EVT: ACL Link is now Suspended.
 
|}
 
|}
   Line 1,204: Line 1,285:  
| 3 ([1.0.0-11.0.1] 9) || || Response to GET_REPORT.
 
| 3 ([1.0.0-11.0.1] 9) || || Response to GET_REPORT.
 
|-
 
|-
| 7 || || Response for extensions. Only used with [[#GetHidEventInfo]].
+
| [1.0.0-11.0.1] 7 || || Response for extensions. Only used with [[#GetHidEventInfo]].
 
|}
 
|}
   Line 1,229: Line 1,310:  
|-
 
|-
 
| 7 || Only for [[#EventInfo]]: triggered after enabling bluetooth, when a global state field is value 4 or 2.
 
| 7 || Only for [[#EventInfo]]: triggered after enabling bluetooth, when a global state field is value 4 or 2.
 +
|-
 +
| 9 || [12.0.0+] Only for [[#EventInfo]]: triggered when bluetooth errors occur in a certain range, with various Audio interface vfuncs.
 
|}
 
|}
   Line 1,251: Line 1,334:  
[12.0.0+]:
 
[12.0.0+]:
   −
{...}
+
{| class="wikitable" border="1"
 
+
|-
= AdapterPropertySet =
+
! Offset
This is "nn::bluetooth::hal::AdapterPropertySet". This is a 0x102-byte struct.
+
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || [[#AdapterPropertyType]]
 +
|-
 +
| 0x1 || 0x1 || Data size
 +
|-
 +
| 0x2 || {Above size} || Data, as specified by the type.
 +
|}
 +
 
 +
= AdapterPropertySet =
 +
This is "nn::bluetooth::hal::AdapterPropertySet". This is a 0x102-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x6 || Same as the data for [[#AdapterPropertyType]] type0.
 +
|-
 +
| 0x6 || 0x3 || Same as the data for [[#AdapterPropertyType]] type2.
 +
|-
 +
| 0x9 || 0xF9 || Same as the data for [[#AdapterPropertyType]] type1.
 +
|}
    
= Address =
 
= Address =
Line 1,273: Line 1,380:  
|}
 
|}
   −
[[#EventType|Type3]]:
+
[12.0.0+] [[#EventType|Type0]]:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,281: Line 1,388:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0xF9 || Device name, NUL-terminated string.
+
| 0x0 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0xF9 || 0x6 || Device [[#Address|address]].
+
| 0x6 || 0xF9 || Device name, NUL-terminated string.
 
|-
 
|-
| 0xFF || 0x10 || Reserved
+
| 0xFF || 0x3 || Class of Device.
 
|-
 
|-
| 0x10F || 0x3 || Class of Device.
+
| 0x102 || 0x6 || Reserved
 +
|}
 +
 
 +
[12.0.0+] [[#EventType|Type1]]:
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || Status: 0 = stopped, 1 = started.
 +
|-
 +
| 0x1 || 0x3 || Padding
 +
|-
 +
| 0x4 || 0x4 || services value from [[#StartInquiry]] when starting, otherwise this is value 0.
 +
|}
 +
 
 +
[1.0.0-11.0.1] [[#EventType|Type3]]:
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0xF9 || Device name, NUL-terminated string.
 +
|-
 +
| 0xF9 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0xFF || 0x10 || Reserved
 +
|-
 +
| 0x10F || 0x3 || Class of Device.
 
|-
 
|-
 
| 0x112 || 0x4 || Set to fixed value u32 0x1.
 
| 0x112 || 0x4 || Set to fixed value u32 0x1.
Line 1,304: Line 1,443:  
|}
 
|}
   −
[[#EventType|Type4]]:
+
[1.0.0-11.0.1] [[#EventType|Type4]]:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,315: Line 1,454:  
|}
 
|}
   −
[[#EventType|Type5]]:
+
[[#EventType|Type2]] ([1.0.0-11.0.1] type5):
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,330: Line 1,469:  
|}
 
|}
   −
[[#EventType|Type6]]:
+
[1.0.0-11.0.1] [[#EventType|Type6]]:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,351: Line 1,490:  
|}
 
|}
   −
[[#EventType|Type7]]:
+
[12.0.0+] [[#EventType|Type3]]:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,359: Line 1,498:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x4 || Status, always 0 except with [[#ConnectionEventType|event0]]: 2 = ACL Link is now Resumed (BSA_SEC_RESUMED_EVT), 9 = connection failed (pairing/authentication failed, or opening the hid connection failed).
+
| 0x0 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0x6 || 0xF9 || Device name, NUL-terminated string.
 +
|-
 +
| 0xFF || 0x3 || Class of Device.
 
|-
 
|-
| 0x4 || 0x6 || Device [[#Address|address]].
+
| 0x102 || 0x1 || bool flag for Just Works. With SSP passkey notification this is always 0.
 
|-
 
|-
| 0xA || 0x2 || Padding
+
| 0x103 || 0x1 || Padding
 
|-
 
|-
| 0xC || 0x4 || [[#ConnectionEventType]]
+
| 0x104 || 0x4 || s32 Passkey
 
|}
 
|}
   −
[[#EventType|Type13]]:
+
[1.0.0-8.1.1] [[#EventType|Type7]]:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,375: Line 1,518:  
! Size
 
! Size
 
! Description
 
! Description
 +
 +
|-
 +
| 0x0 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0x0 || 0x2 || [[#FatalReason]]
+
| 0x6 || 0x2 || Padding
 +
|-
 +
| 0x8 || 0x4 || Status, always 0 except with [[#ConnectionEventType|event0]]: 2 = ACL Link is now Resumed (BSA_SEC_RESUMED_EVT), 9 = connection failed (pairing/authentication failed, or opening the hid connection failed).
 +
|-
 +
| 0xC || 0x4 || [[#ConnectionEventType]]
 
|}
 
|}
   −
= BluetoothPinCode =
+
[9.0.0-11.0.1] [[#EventType|Type7]]:
This is "nn::bluetooth::BluetoothPinCode". This is a 0x10-byte struct with 1-byte alignment.
  −
 
  −
= PinCode =
  −
This is "nn::bluetooth::hal::PinCode". This is a 0x11-byte struct with 1-byte alignment.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,391: Line 1,537:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0xF || PinCode
+
| 0x0 || 0x4 || Status, always 0 except with [[#ConnectionEventType|event0]]: 2 = ACL Link is now Resumed (BSA_SEC_RESUMED_EVT), 9 = connection failed (pairing/authentication failed, or opening the hid connection failed).
 +
|-
 +
| 0x4 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0xF || 0x1 || PinCode length, must be 0x1-0xF otherwise the sysmodule will Abort.
+
| 0xA || 0x2 || Padding
|}
+
|-
 +
| 0xC || 0x4 || [[#ConnectionEventType]]
 +
|}
   −
= ServiceFlag =
+
[12.0.0+] [[#EventType|Type4]]:
This is "nn::bluetooth::hal::ServiceFlag". This is the same as the BSA service-mask.
  −
 
  −
= HidData =
  −
This is "nn::bluetooth::HidData". This is a 0x282-byte struct.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,408: Line 1,554:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x2 || Size of the following data.
+
| 0x0 || 0x4 || [[#ConnectionEventType]]
 +
|-
 +
| 0x4 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0x2 || 0x280 || Data
+
| 0xA || 0xFE || Reserved
 
|}
 
|}
   −
= HidReport =
+
[12.0.0+] [[#EventType|Type5]]:
This is "nn::bluetooth::HidReport". This is a 0x2BE-byte struct.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,422: Line 1,569:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x2 || Size of the following data.
+
| 0x0 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0x6 || 0x1 || Status flag: 1 = success, 0 = failure.
 
|-
 
|-
| 0x2 || 0x2BC || Data
+
| 0x7 || 0x1 || Tsi value, when the above indicates success.
 
|}
 
|}
   −
= PlrStatistics =
  −
This is "nn::bluetooth::PlrStatistics". This is a 0x84-byte struct.
     −
= PlrList =
+
[12.0.0+] [[#EventType|Type6]]:
This is "nn::bluetooth::PlrList". This is a 0xA4-byte struct.
     −
= PacketLostRate =
+
{| class="wikitable" border="1"
This is "nn::bluetooth::hal::PacketLostRate".
+
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0x6 || 0x1 || Status flag: 1 = success, 0 = failure.
 +
|-
 +
| 0x7 || 0x1 || Input bool value from [[#EnableBurstMode]], when the above indicates success.
 +
|}
   −
= ChannelMapList =
  −
This is "nn::bluetooth::ChannelMapList". This is a 0x88-byte struct.
     −
= Channel =
+
[12.0.0+] [[#EventType|Type7]]:
This is "nn::bluetooth::hal::Channel".
  −
 
  −
= LeChannel =
  −
This is "nn::bluetooth::hal::LeChannel".
  −
 
  −
= LeConnectionParams =
  −
This is "nn::bluetooth::LeConnectionParams". This is a 0x14-byte struct with 2-byte alignment.
  −
 
  −
= BleConnectionParameter =
  −
This is "nn::bluetooth::BleConnectionParameter". This is a 0xC-byte struct with 2-byte alignment.
  −
 
  −
= BleAdvertisePacketData =
  −
This is "nn::bluetooth::BleAdvertisePacketData" ([5.0.0-8.1.1] "nn::bluetooth::LeAdvertiseData"). This is a 0xCC-byte struct.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,460: Line 1,601:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x4 ||  
+
| 0x0 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0x4 || 0x1 ||  
+
| 0x6 || 0x1 || Status flag: 1 = success, 0 = failure.
 
|-
 
|-
| 0x5 || 0x1 || Size of the data at +0x6.
+
| 0x7 || 0x1 || Bool flag, when the above indicates success.
 +
|}
 +
 
 +
[12.0.0+] [[#EventType|Type8]]:
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x6 || 0x1F ||
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0x25 || 0x3 || Padding
+
| 0x0 || 0x1 || Status flag: 0 = failure, 1 = success.
 
|-
 
|-
| 0x28 || 0x1 || Total array entries for the below array, can be 0.
+
| 0x1 || 0x3 || Padding
 
|-
 
|-
| 0x29 || 0x7 || Padding
+
| 0x4 || 0x4 || Count value.
 +
|}
 +
 
 +
[12.0.0+] [[#EventType|Type9]]:
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x30 || count*0x14 || Array entries, see below.
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0xA4 || 0x1 || Size of the data at +0xA8.
+
| 0x0 || 0x6 || Device [[#Address|address]].
 
|-
 
|-
| 0xA5 || 0x1 ||  
+
| 0x6 || 0x1 || Status flag: 1 = success, 0 = failure.
 +
|}
 +
 
 +
[[#EventType|Type10]] ([1.0.0-11.0.1] type13):
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0xA6 || 0x2 || Padding
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0xA8 || 0x1F ||  
+
| 0x0 || 0x2 || [[#FatalReason]]
|-
  −
| 0xC7 || 0x1 ||
  −
|-
  −
| 0xC8 || 0x1 ||
  −
|-
  −
| 0xC9 || 0x3 || Padding
   
|}
 
|}
   −
Array entry:
+
= HidEventInfo =
 +
This is the output buffer for [[#GetHidEventInfo]] / events in sharedmem. The data stored here depends on the [[#HidEventType]].
 +
 
 +
[[#HidEventType|Type0]], for [[#GetHidEventInfo]]:
    +
[1.0.0-11.0.1]
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,499: Line 1,659:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x2 ||  
+
| 0x0 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0x6 || 0x2 || Padding
 
|-
 
|-
| 0x2 || 0x12 || Unused
+
| 0x8 || 0x4 || Status: 0 = hid connection opened, 2 = hid connection closed, 8 = failed to open hid connection.
 
|}
 
|}
   −
= BleAdvertiseFilter =
+
[12.0.0+]
This is "nn::bluetooth::BleAdvertiseFilter". This is a 0x3E-byte struct.
  −
 
  −
= BleAdvertisePacketParameter =
  −
This is "nn::bluetooth::BleAdvertisePacketParameter". This is a 8-byte struct with 1-byte alignment.
  −
 
  −
= BleScanResult =
  −
This is "nn::bluetooth::BleScanResult". This is a 0x148-byte struct.
  −
 
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,519: Line 1,673:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x1 ||  
+
| 0x0 || 0x4 || Status: 0 = hid connection closed, 1 = hid connection opened, 2 = failed to open hid connection.
 
|-
 
|-
| 0x1 || 0x6 || [[#Address]]
+
| 0x4 || 0x6 || Device [[#Address|address]].
|-
  −
| 0x7 || 0x139 ||
  −
|-
  −
| 0x140 || 0x4 || s32
  −
|-
  −
| 0x144 || 0x4 || s32
   
|}
 
|}
   −
= BleConnectionInfo =
+
= BluetoothPinCode =
This is "nn::bluetooth::BleConnectionInfo". This is a 0xC-byte struct.
+
This is "nn::bluetooth::BluetoothPinCode". This is a 0x10-byte struct with 1-byte alignment.
 +
 
 +
= PinCode =
 +
This is "nn::bluetooth::hal::PinCode". This is a 0x11-byte struct with 1-byte alignment.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,539: Line 1,690:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x4 || ConnectionHandle, 0xFFFFFFFF ([5.0.0-5.0.2] 0xFFFF) is invalid.
+
| 0x0 || 0xF || PinCode
|-
  −
| 0x4 || 0x6 || [[#Address]]
  −
|-
  −
| 0xA || 0x2 || Padding
   
|-
 
|-
 +
| 0xF || 0x1 || PinCode length, must be 0x1-0xF otherwise the sysmodule will Abort.
 
|}
 
|}
   −
= GattAttributeUuid =
+
= ServiceFlag =
This is "nn::bluetooth::GattAttributeUuid". This is a 0x14-byte struct with 4-byte alignment.
+
This is "nn::bluetooth::hal::ServiceFlag". This is the same as the BSA service-mask.
 +
 
 +
= HidData =
 +
This is "nn::bluetooth::HidData". This is a 0x282-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,556: Line 1,707:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x4 || UUID size, must be 0x2, 0x4, or 0x10.
+
| 0x0 || 0x2 || Size of the following data.
 
|-
 
|-
| 0x4 || 0x10 || UUID with the above size.
+
| 0x2 || 0x280 || Data
 
|}
 
|}
   −
= GattId =
+
= HidReport =
This is "nn::bluetooth::GattId". This is a 0x18-byte struct with 4-byte alignment.
+
This is "nn::bluetooth::HidReport". This is a 0x2BE-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,570: Line 1,721:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0x1 || InstanceId
+
| 0x0 || 0x2 || Size of the following data.
 
|-
 
|-
| 0x1 || 0x3 || Padding
+
| 0x2 || 0x2BC || Data
|-
  −
| 0x4 || 0x14 || [[#GattAttributeUuid]]
   
|}
 
|}
   −
= LeEventInfo =
+
= PlrStatistics =
This is a 0x400-byte struct.
+
This is "nn::bluetooth::PlrStatistics". This is a 0x84-byte struct.
 +
 
 +
= PlrList =
 +
This is "nn::bluetooth::PlrList". This is a 0xA4-byte struct.
   −
{| class="wikitable" border="1"
+
= PacketLostRate =
|-
+
This is "nn::bluetooth::hal::PacketLostRate".
! Offset
+
 
 +
= ChannelMapList =
 +
This is "nn::bluetooth::ChannelMapList". This is a 0x88-byte struct.
 +
 
 +
= Channel =
 +
This is "nn::bluetooth::hal::Channel".
 +
 
 +
= LeChannel =
 +
This is "nn::bluetooth::hal::LeChannel".
 +
 
 +
= LeConnectionParams =
 +
This is "nn::bluetooth::LeConnectionParams". This is a 0x14-byte struct with 2-byte alignment.
 +
 
 +
= BleConnectionParameter =
 +
This is "nn::bluetooth::BleConnectionParameter". This is a 0xC-byte struct with 2-byte alignment.
 +
 
 +
= BleAdvertisePacketData =
 +
This is "nn::bluetooth::BleAdvertisePacketData" ([5.0.0-8.1.1] "nn::bluetooth::LeAdvertiseData"). This is a 0xCC-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 
! Size
 
! Size
 
! Description
 
! Description
Line 1,588: Line 1,761:  
| 0x0 || 0x4 ||  
 
| 0x0 || 0x4 ||  
 
|-
 
|-
| 0x4 || 0x4 ||  
+
| 0x4 || 0x1 ||  
 
|-
 
|-
| 0x8 || 0x1 ||  
+
| 0x5 || 0x1 || Size of the data at +0x6.
 
|-
 
|-
| 0x9 || 0x3 || Padding
+
| 0x6 || 0x1F ||  
 
|-
 
|-
| 0xC || 0x14 || [[#GattAttributeUuid]]
+
| 0x25 || 0x3 || Padding
 
|-
 
|-
| 0x20 || 0x14 || [[#GattAttributeUuid]]
+
| 0x28 || 0x1 || Total array entries for the below array, can be 0.
 
|-
 
|-
| 0x34 || 0x14 || [[#GattAttributeUuid]]
+
| 0x29 || 0x7 || Padding
 
|-
 
|-
| 0x48 || 0x2 || Size of the below data.
+
| 0x30 || count*0x14 || Array entries, see below.
 
|-
 
|-
| 0x4A || {above size} || Data.
+
| 0xA4 || 0x1 || Size of the data at +0xA8.
|}
  −
 
  −
= BleClientGattOperationInfo =
  −
This is "nn::bluetooth::BleClientGattOperationInfo". This is converted from [[#LeEventInfo]].
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset
+
| 0xA5 || 0x1 ||
! Size
  −
! Description
   
|-
 
|-
| 0x0 || 0x1 || Converted from [[#LeEventInfo]]+0x0.
+
| 0xA6 || 0x2 || Padding
 
|-
 
|-
| 0x1 || 0x3 || Padding
+
| 0xA8 || 0x1F ||  
 
|-
 
|-
| 0x4 || 0x4 || Same as [[#LeEventInfo]]+0x4.
+
| 0xC7 || 0x1 ||  
 
|-
 
|-
| 0x8 || 0x1 || Same as [[#LeEventInfo]]+0x8.
+
| 0xC8 || 0x1 ||  
 
|-
 
|-
| 0x9 || 0x3 || Padding
+
| 0xC9 || 0x3 || Padding
 +
|}
 +
 
 +
Array entry:
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0xC || 0x14 || Same as [[#LeEventInfo]]+0xC.
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0x20 || 0x14 || Same as [[#LeEventInfo]]+0x20.
+
| 0x0 || 0x2 ||  
 
|-
 
|-
| 0x34 || 0x14 || Same as [[#LeEventInfo]]+0x34.
+
| 0x2 || 0x12 || Unused
|-
  −
| 0x48 || 0x8 || Same as [[#LeEventInfo]]+0x48.
  −
|-
  −
| 0x50 || {above size} || Same as [[#LeEventInfo]]+0x4A.
   
|}
 
|}
   −
= AudioEventType =
+
= BleAdvertiseFilter =
This is "nn::bluetooth::hal::AudioEventType". This is an u32 enum.
+
This is "nn::bluetooth::BleAdvertiseFilter". This is a 0x3E-byte struct.
   −
= PcmParameter =
+
= BleAdvertisePacketParameter =
This is "nn::bluetooth::system::PcmParameter". This is a 0xC-byte struct with 4-byte alignment.
+
This is "nn::bluetooth::BleAdvertisePacketParameter". This is a 8-byte struct with 1-byte alignment.
 +
 
 +
= BleScanResult =
 +
This is "nn::bluetooth::BleScanResult". This is a 0x148-byte struct.
   −
= AudioOutState =
+
{| class="wikitable" border="1"
This is "nn::bluetooth::system::AudioOutState". This is an u32 enum.
+
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 ||
 +
|-
 +
| 0x1 || 0x6 || [[#Address]]
 +
|-
 +
| 0x7 || 0x139 ||
 +
|-
 +
| 0x140 || 0x4 || s32
 +
|-
 +
| 0x144 || 0x4 || s32
 +
|}
   −
= AudioCodec =
+
= BleConnectionInfo =
 +
This is "nn::bluetooth::BleConnectionInfo". This is a 0xC-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || ConnectionHandle, 0xFFFFFFFF ([5.0.0-5.0.2] 0xFFFF) is invalid.
 +
|-
 +
| 0x4 || 0x6 || [[#Address]]
 +
|-
 +
| 0xA || 0x2 || Padding
 +
|-
 +
|}
 +
 
 +
= GattAttributeUuid =
 +
This is "nn::bluetooth::GattAttributeUuid". This is a 0x14-byte struct with 4-byte alignment.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || UUID size, must be 0x2, 0x4, or 0x10.
 +
|-
 +
| 0x4 || 0x10 || UUID with the above size.
 +
|}
 +
 
 +
= GattId =
 +
This is "nn::bluetooth::GattId". This is a 0x18-byte struct with 4-byte alignment.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || InstanceId
 +
|-
 +
| 0x1 || 0x3 || Padding
 +
|-
 +
| 0x4 || 0x14 || [[#GattAttributeUuid]]
 +
|}
 +
 
 +
= LeEventInfo =
 +
This is a 0x400-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 ||
 +
|-
 +
| 0x4 || 0x4 ||
 +
|-
 +
| 0x8 || 0x1 ||
 +
|-
 +
| 0x9 || 0x3 || Padding
 +
|-
 +
| 0xC || 0x14 || [[#GattAttributeUuid]]
 +
|-
 +
| 0x20 || 0x14 || [[#GattAttributeUuid]]
 +
|-
 +
| 0x34 || 0x14 || [[#GattAttributeUuid]]
 +
|-
 +
| 0x48 || 0x2 || Size of the below data.
 +
|-
 +
| 0x4A || {above size} || Data.
 +
|}
 +
 
 +
= BleClientGattOperationInfo =
 +
This is "nn::bluetooth::BleClientGattOperationInfo". This is converted from [[#LeEventInfo]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x1 || Converted from [[#LeEventInfo]]+0x0.
 +
|-
 +
| 0x1 || 0x3 || Padding
 +
|-
 +
| 0x4 || 0x4 || Same as [[#LeEventInfo]]+0x4.
 +
|-
 +
| 0x8 || 0x1 || Same as [[#LeEventInfo]]+0x8.
 +
|-
 +
| 0x9 || 0x3 || Padding
 +
|-
 +
| 0xC || 0x14 || Same as [[#LeEventInfo]]+0xC.
 +
|-
 +
| 0x20 || 0x14 || Same as [[#LeEventInfo]]+0x20.
 +
|-
 +
| 0x34 || 0x14 || Same as [[#LeEventInfo]]+0x34.
 +
|-
 +
| 0x48 || 0x8 || Same as [[#LeEventInfo]]+0x48.
 +
|-
 +
| 0x50 || {above size} || Same as [[#LeEventInfo]]+0x4A.
 +
|}
 +
 
 +
= AudioEventType =
 +
This is "nn::bluetooth::hal::AudioEventType". This is an u32 enum.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Name
 +
!  Description
 +
|-
 +
| 0 || || None
 +
|-
 +
| 1 || || Connection
 +
|}
 +
 
 +
= AudioEventInfo =
 +
This is the output buffer for [[#GetAudioEventInfo]]. The data stored here depends on the [[#AudioEventType]].
 +
 
 +
[[#AudioEventType|Type1]]:
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || Status: 0 = AV connection closed, 1 = AV connection opened, 2 = failed to open AV connection.
 +
|-
 +
| 0x4 || 0x6 || Device [[#Address|address]].
 +
|-
 +
| 0xA || 0x2 || Padding
 +
|}
 +
 
 +
= PcmParameter =
 +
This is "nn::bluetooth::system::PcmParameter". This is a 0xC-byte struct with 4-byte alignment.
 +
 
 +
The sysmodule will Abort if any of these fields are invalid.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || Must be 0-3. Controls number of channels: 0 = mono, non-zero = stereo.
 +
|-
 +
| 0x4 || 0x4 || s32 SampleRate. Must be one of the following: 16000, 32000, 44100, 48000.
 +
|-
 +
| 0x8 || 0x4 || Bits per sample. Must be 8 or 16.
 +
|}
 +
 
 +
= AudioOutState =
 +
This is "nn::bluetooth::system::AudioOutState". This is an u32 enum.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || Stopped
 +
|-
 +
| 1 || Started
 +
|}
 +
 
 +
= AudioCodec =
 
This is "nn::bluetooth::system::AudioCodec". This is an u32 enum.
 
This is "nn::bluetooth::system::AudioCodec". This is an u32 enum.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || Raw PCM
 +
|}
    
= AudioControlButtonState =
 
= AudioControlButtonState =
Line 1,748: Line 2,109:  
| CYW4356A3_001.004.009.0092.0095
 
| CYW4356A3_001.004.009.0092.0095
 
|-
 
|-
| [12.0.0]
+
| [12.0.0-12.0.2]
 
| BSA0106_01.60.00_
 
| BSA0106_01.60.00_
 
| Hayward_T3_RC_20210224
 
| Hayward_T3_RC_20210224
2

edits

Navigation menu