tree: d574cfd7ffddd59c7308290466da72fb3e299e2c [path history] [tgz]
  1. att/
  2. build/
  3. common/
  4. controllers/
  5. fidl/
  6. gap/
  7. gatt/
  8. hci/
  9. hci-spec/
  10. iso/
  11. l2cap/
  12. meta/
  13. public/
  14. sco/
  15. sdp/
  16. sm/
  17. socket/
  18. testing/
  19. transport/
  20. .clang-tidy
  21. BUILD.bazel
  22. BUILD.gn
  23. host.cc
  24. host.h
  25. host_test.cc
  26. main.cc
  27. README.md
  28. util.cc
  29. util.h
src/connectivity/bluetooth/core/bt-host/README.md

bt-host

Test

$ fx test //src/connectivity/bluetooth/core/bt-host

Fuzz Testing

bt-host contains fuzz tests for several libraries. Make sure to include the desired fuzzing target in your fx set. For example, to include all bt-host fuzzing targets, use:

fx set core.x64 --fuzz-with asan --with //src/connectivity/bluetooth/core/bt-host:fuzzers

Before running the test, ensure QEMU is running.

Run fx fuzz list to see the full list of available fuzzing targets. To run a specific fuzz test, do fx fuzz $package/$fuzzer where $package and $fuzzer match those reported by fx fuzz list.

See the fuzzing documentation for a more in depth guide.

Inspect

bt-host uses the standard driver processes to expose its inspect hierarchy to the Fuchsia system.

Usage

To query the current state of the bt-host driver Inspect hierarchy through ffx tooling, run:

ffx inspect show bootstrap/driver_manager --file class/bt-host/000.inspect

To query the current state of the bt-host component Inspect hierarchy, run:

  1. ffx inspect list | grep bt-host to find the component's <moniker>
  2. ffx inspect show "<moniker>"
    • Note that the full moniker from step 2 should be in quotations
      • e.g., ffx inspect show "core/bluetooth-core/bt-host-collection\:bt-host_000"
    • Wildcards can be passed into the selector as needed
      • e.g., ffx inspect show "core/bluetooth-core/bt-host-collection*"

Hierarchy

adapter:
    adapter_id
    bredr_max_num_packets
    bredr_max_data_length
    hci_version
    le_features
    le_max_data_length
    le_max_num_packets
    lmp_features
    sco_max_data_length
    sco_max_num_packets
    bredr_connection_manager:
        disconnect_acl_link_error_count
        disconnect_interrogation_failed_count
        disconnect_local_api_request_count
        disconnect_pairing_failed_count
        disconnect_peer_disconnection_count
        interrogation_complete_count
        security_mode
        connection_requests:
            request_0x0:
               peer_id
               has_incoming
               callbacks
        connections:
            connection_0x0:
                peer_id
                pairing_state:
                    encryption_status
                    security_properties:
                        encrypted
                        secure_connections
                        authenticated
                        level
                        key_type
        incoming:
            connection_attempts
            failed_connections
            successful_connections
        last_disconnected:
            0:
                peer_id
                duration_s
                @time
        outgoing:
            connection_attempts
            failed_connections
            successful_connections
    bredr_discovery_manager:
        discoverable_sessions
        discoverable_sessions_count
        discovery_sessions
        inquiry_sessions_count
        last_discoverable_length_sec
        last_inquiry_length_sec
        pending_discoverable
    hci:
        command_channel:
            allowed_command_packets
            next_event_handler_id
            next_transaction_id
        acl_data_channel:
            num_queue_packets
            num_overflow_packets
            num_recent_overflow_packets
            bredr:
                num_sent_packets
            le:
                num_sent_packets
                independent_from_bredr
            metrics:
                send_latency:
                    50th_percentile_us
                    95th_percentile_us
                    99th_percentile_us
                send_size:
                    10th_percentile_bytes
                    50th_percentile_bytes
                    90th_percentile_bytes
    l2cap:
        logical_links:
          logical_link_0x0:
            handle
            link_type
            flush_timeout_ms
            channels:
              channel_0x0:
                local_id
                remote_id
                psm
        services:
          service_0x0:
            psm
    low_energy_connection_manager:
        disconnect_explicit_disconnect_count
        disconnect_link_error_count
        disconnect_remote_disconnection_count
        disconnect_zero_ref_count
        incoming_connection_failure_count
        incoming_connection_success_count
        outgoing_connection_failure_count
        outgoing_connection_success_count
        recent_connection_failures
        pending_requests:
            pending_request_0x0:
                peer_id
                callbacks
        outbound_connector:
            peer_id
            is_outbound
            connection_attempt
            state
        connections:
            connection_0x0:
                peer_id
                peer_address
                ref_count
    low_energy_discovery_manager:
        failed_count
        paused
        scan_interval_ms
        scan_window_ms
        state
    metrics:
        bredr:
            open_l2cap_channel_requests
            outgoing_connection_requests
            pair_requests
            request_discoverable_events
            request_discovery_events
            set_connectable_false_events
            set_connectable_true_events
        le:
            outgoing_connection_requests
            pair_requests
            start_advertising_events
            start_discovery_events
            stop_advertising_events
    peer_cache:
        metrics:
            bredr:
                bond_failure_events
                bond_success_events
                connection_events
                disconnection_events
            le:
                bond_failure_events
                bond_success_events
                connection_events
                disconnection_events
        peer_0x0:
            peer_id
            technology
            address
            connectable
            temporary
            features
            hci_version
            manufacturer
            bredr_data:
                connection_state
                services
                link_key:
                    security_properties:
                        encrypted
                        secure_connections
                        authenticated
                        level
                        key_type
            le_data:
                connection_state
                bonded
                features
    sdp_server:
        record_0x2:
            record
            // TODO(https://fxbug.dev/42129247): Migrate this to UIntArray when support is better.
            registered_psms:
                psm_0x0:
                    psm
                psm_0x1:
                    psm
        record_0x3:
            record
            registered_psms:
                (none)