libnx  v4.8.0
Data Fields
BtdrvBleEventInfo Struct Reference

Data for btdrvGetBleManagedEventInfo and btdrvGetLeHidEventInfo. The data stored here depends on the BtdrvBleEventType. More...

#include <btdrv.h>

Data Fields

union {
   u8   data [0x400]
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u8   client_if
 Client interface handle.
 
      u8   status
 Registration status. 0 = Unregistered, 1 = Registered.
 
      u8   pad [2]
 Padding.
 
   }   client_registration
 BtdrvBleEventType_ClientRegistration
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u8   server_if
 Server interface handle. Unused.
 
      u8   status
 Registration status. 0 = Unregistered, 1 = Registered.
 
      u8   pad [2]
 Padding.
 
   }   server_registration
 BtdrvBleEventType_ServerRegistration
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   conn_id
 Connection ID.
 
      u16   conn_interval
 Connection interval.
 
      u16   conn_latency
 Connection latency.
 
      u16   supervision_tout
 Connection supervision timeout multiplier.
 
      u8   pad [2]
 Padding.
 
   }   connection_update
 BtdrvBleEventType_ConnectionUpdate
 
   struct {
      u32   conn_id
 Connection ID.
 
      u16   min_conn_interval
 Minimum connection interval.
 
      u16   max_conn_interval
 Maximum connection interval.
 
      u16   slave_latency
 Slave latency.
 
      u16   supervision_tout
 Connection supervision timeout multiplier.
 
   }   preferred_connection_parameters
 BtdrvBleEventType_PreferredConnectionParameters
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u8   status
 Connection status. 0 = Connected, 2 = Disconnected.
 
      u8   client_if
 Client interface handle.
 
      u8   pad [2]
 Padding.
 
      u32   conn_id
 Connection ID.
 
      BtdrvAddress   address
 Device address.
 
      u16   reason
 Disconnection reason.
 
   }   client_connection
 BtdrvBleEventType_ClientConnection
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u8   status
 Connection status. 0 = Connected, 2 = Disconnected.
 
      u16   server_if
 Server interface handle.
 
      u8   pad
 Padding.
 
      u32   conn_id
 Connection ID.
 
      BtdrvAddress   address
 Device address.
 
      u16   reason
 Disconnection reason.
 
   }   server_connection
 BtdrvBleEventType_ServerConnection
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u8   status
 BLE scan status. 1 = Scan complete, 2 = New device found, 0xFF = Scan started.
 
      u8   device_type
 Device type. 0 = BD/EDR, 1 = BLE, 2 = Dual Mode.
 
      u8   ble_addr_type
 BLE address type. 0 = Public, 1 = Random, 2 = Public ID, 3 = Random ID.
 
      BtdrvAddress   address
 Device address.
 
      BtdrvBleAdvertisement   ad_list [10]
 BLE Advertisement list BtdrvBleAdvertisement.
 
      u8   count
 Number of entries above.
 
      s32   rssi
 RSSI value.
 
   }   scan_result
 BtdrvBleEventType_ScanResult
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   action
 Scan filter action. 0 = Add, 1 = Delete, 2 = Clear, 3 = Enable, 4 = Disable.
 
   }   scan_filter
 BtdrvBleEventType_ScanFilter
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   conn_id
 Connection ID.
 
      u8   type
 Notification type. 4 = Notification, 5 = Indication.
 
      u8   pad [3]
 Padding.
 
      BtdrvGattAttributeUuid   serv_uuid
 GATT Service UUID BtdrvGattAttributeUuid.
 
      BtdrvGattAttributeUuid   char_uuid
 GATT Characteristic UUID BtdrvGattAttributeUuid.
 
      BtdrvGattAttributeUuid   desc_uuid
 GATT Descriptor UUID BtdrvGattAttributeUuid.
 
      u16   size
 Size of the below data.
 
      u8   data [0x200]
 Notification data.
 
      u8   pad2 [2]
 Padding.
 
   }   client_notify
 BtdrvBleEventType_ClientNotify
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   conn_id
 Connection ID.
 
      u32   count
 Number of attributes below.
 
      BtdrvGattAttribute   attr_list [10]
 List of Gatt attributes BtdrvGattAttribute.
 
   }   client_cache_save
 BtdrvBleEventType_ClientCacheSave
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   conn_id
 Connection ID.
 
      u16   unk_x8
 Unknown. Always 0.
 
      u8   unused [0x142]
 Unused.
 
   }   client_cache_load
 BtdrvBleEventType_ClientCacheLoad
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   conn_id
 Connection ID.
 
      u16   mtu
 MTU value.
 
      u8   pad [2]
 Padding.
 
   }   client_configure_mtu
 BtdrvBleEventType_ClientConfigureMtu
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u32   server_if
 Server interface handle.
 
      BtdrvGattAttributeUuid   uuid
 BtdrvGattAttributeUuid
 
      u16   service_id
 Service ID.
 
      u16   attr_id
 Attribute ID.
 
      u8   attr_type
 Attribute type BtdrvGattAttributeType.
 
      u8   property
 Characteristic properties. Only set if attr_type is 1 BtdrvGattCharacteristicProperty.
 
      u8   is_primary
 Is a primary service or not.
 
      u8   pad
 Padding.
 
   }   server_add_characteristic
 BtdrvBleEventType_ServerAddCharacteristic
 
   struct {
      u32   result
 0 for success, non-zero for error.
 
      u16   conn_id
 Connection ID.
 
      u8   unk_x6
 Unknown. Always 1.
 
      u8   pad
 Padding.
 
      u16   service_id
 Service ID.
 
      u16   attr_id
 Attribute ID.
 
      u8   attr_type
 Attribute type BtdrvGattAttributeType.
 
      u8   data [0x200]
 Data.
 
      u16   size
 Size of the above data.
 
      u16   offset
 Offset.
 
      u8   pad2 [2]
 Padding.
 
   }   server_write
 BtdrvBleEventType_ServerWrite
 
}; 
 

Detailed Description

Data for btdrvGetBleManagedEventInfo and btdrvGetLeHidEventInfo. The data stored here depends on the BtdrvBleEventType.

Field Documentation

◆ data

u8 BtdrvBleEventInfo::data[0x200]

Notification data.

Data.

◆ size

u16 BtdrvBleEventInfo::size

Size of the below data.

Size of the above data.

◆ status

u8 BtdrvBleEventInfo::status

Registration status. 0 = Unregistered, 1 = Registered.

BLE scan status. 1 = Scan complete, 2 = New device found, 0xFF = Scan started.

Connection status. 0 = Connected, 2 = Disconnected.


The documentation for this struct was generated from the following file: