Bluetooth Driver services: Difference between revisions

No edit summary
No edit summary
Line 356: Line 356:
== GetAdapterProperties ==
== GetAdapterProperties ==
Takes a type-0x1A output buffer containing an [[#AdapterProperty]].
Takes a type-0x1A output buffer containing an [[#AdapterProperty]].
[12.0.0+] Takes a type-0x1A output buffer containing an [[#AdapterPropertySet]].


This is used by [[BTM_services|btm]].
This is used by [[BTM_services|btm]].
Line 362: Line 364:
Takes an input [[#BluetoothPropertyType]] and a type-0xA output buffer.
Takes an input [[#BluetoothPropertyType]] and a type-0xA output buffer.


[12.0.0+] The buffer is now type-0x1A.
[12.0.0+] Takes an input [[#AdapterPropertyType]] and a type-0x1A output buffer containing an [[#AdapterProperty]].


== SetAdapterProperty ==
== SetAdapterProperty ==
Takes an input [[#BluetoothPropertyType]] and a type-0x9 input buffer.
Takes an input [[#BluetoothPropertyType]] and a type-0x9 input buffer.


[12.0.0+] Takes a type-0x19 input buffer, no output.
[12.0.0+] Takes a type-0x19 input buffer containing an [[#AdapterProperty]], no output.


== StartInquiry ==
== StartInquiry ==
Line 407: Line 409:
Takes an input [[#Address]], a bool, an u8, a [[#BluetoothPinCode]], no output.
Takes an input [[#Address]], a bool, an u8, a [[#BluetoothPinCode]], no output.


[12.0.0+] Now takes a total of 0x17-bytes of input instead of 0x18-bytes.
[12.0.0+] Takes an input [[#Address]], a [[#PinCode]], no output.


sdknso uses an user-specified s32 for the u8.
sdknso uses an user-specified s32 for the u8.
Line 623: Line 625:
Takes a type-0x16 output buffer containing a [[#PlrList]] ([1.0.0-8.1.1] [[#PlrStatistics]]).
Takes a type-0x16 output buffer containing a [[#PlrList]] ([1.0.0-8.1.1] [[#PlrStatistics]]).


[12.0.0+] Takes a type-0xA output buffer, returns 4-bytes of output.
[12.0.0+] Takes a type-0xA output buffer containing an array of [[#PacketLostRate]], returns an output s32.


This calls an interface funcptr then returns 0.
This calls an interface funcptr then returns 0.
Line 639: Line 641:
Takes a type-0x16 output buffer containing a [[#ChannelMapList]].
Takes a type-0x16 output buffer containing a [[#ChannelMapList]].


[12.0.0+] Takes two type-0xA output buffers, returns 4-bytes of output.
[12.0.0+] Takes two type-0xA output buffers, returns an output s32. The first buffer contains an array of [[#Address]], the second buffer contains an array of BitFlagSet with [[#Channel]] and bit-count=79.


This calls an interface funcptr then returns 0.
This calls an interface funcptr then returns 0.
Line 939: Line 941:
Takes a type-0x16 output buffer containing a [[#ChannelMapList]].
Takes a type-0x16 output buffer containing a [[#ChannelMapList]].


[12.0.0+] Takes two type-0xA output buffers, returns 4-bytes of output.
[12.0.0+] Takes two type-0xA output buffers, returns an output s32. The first buffer contains an array of [[#Address]], the second buffer contains an array of BitFlagSet with [[#LeChannel]] and bit-count=40.


= bt =
= bt =
Line 1,174: Line 1,176:
| 0x102 || 0x1 || Set to hard-coded value 0x68 (same as the data for [[#BluetoothPropertyType]] type6).
| 0x102 || 0x1 || Set to hard-coded value 0x68 (same as the data for [[#BluetoothPropertyType]] type6).
|}
|}
= AdapterPropertySet =
This is "nn::bluetooth::hal::AdapterPropertySet".


= Address =
= Address =
Line 1,300: Line 1,305:
= BluetoothPinCode =
= BluetoothPinCode =
This is "nn::bluetooth::BluetoothPinCode". This is a 0x10-byte struct with 1-byte alignment.
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.


= HidData =
= HidData =
Line 1,334: Line 1,342:
= PlrList =
= PlrList =
This is "nn::bluetooth::PlrList". This is a 0xA4-byte struct.
This is "nn::bluetooth::PlrList". This is a 0xA4-byte struct.
= PacketLostRate =
This is "nn::bluetooth::hal::PacketLostRate".


= ChannelMapList =
= ChannelMapList =
This is "nn::bluetooth::ChannelMapList". This is a 0x88-byte struct.
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 =
= LeConnectionParams =