bluez-setup manual

critical

Image Types:
hmi-armhf / hmi-amd64 / sdk-amd64
Image Deployment:
APT, OSTree
Type:
functional

Description

Test setup of Bluetooth stack by running basic tests using hciconfig. Check if the interface can be brought up/down, can be changed of mode and can discover devices. Strategic component: Bluetooth setup and basic functionality is part of smartphone interaction functionality.


Resources

  • A Bluetooth adapter.
  • A Bluetooth device.

Pre Conditions

  1. From a PC, download and unpack the test data tarball from the gitlab test repository:
  2. $ wget https://gitlab.apertis.org/tests/bluez-setup/-/archive/apertis/v2024dev0/bluez-setup.tar.gz
    $ tar -xvf bluez-setup.tar.gz
  3. Copy the bluez-setup-* folder to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r bluez-setup-* user@$DUT_IP:
  5. Log into the target device:
  6. $ ssh user@$DUT_IP
  7. After log into the DUT, enter the test directory
  8. $ cd bluez-setup-*
  9. Note that the tarball may change depending on the release/branch being tested, please make sure to download the correct tarball for the release in question.
  10. Please note that connman disables bluetooth by default on a fresh image. If it's already enabled, connmanctl will give an "In progress" error that may be ignored. To enable the device:
  11. $ connmanctl enable bluetooth

Execution Steps

  1. Execute the test suite:
  2. $ ./check-setup.sh

Expected

The output should be similar to that:

hci0:   Type: BR/EDR  Bus: USB

         BD Address: 00:1B:DC:06:05:D4  ACL MTU: 310:10  SCO MTU: 64:8

         UP RUNNING PSCAN

         RX bytes:16617 acl:0 sco:0 events:630 errors:0

         TX bytes:7102 acl:0 sco:0 commands:629 errors:8

         Features: 0xff 0xff 0x8f 0x7e 0xd8 0x1f 0x5b 0x87

         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3

         Link policy: RSWITCH HOLD SNIFF PARK

         Link mode: SLAVE ACCEPT

         Name: 'sac-target-0'

         Class: 0x620100

         Service Classes: Networking, Audio, Telephony

         Device Class: Computer, Uncategorized

         HCI Version: 4.0 (0x6)  Revision: 0x2031

         LMP Version: 4.0 (0x6)  Subversion: 0x2031

         Manufacturer: Cambridge Silicon Radio (10)

Put some devices around in discoverable mode and press ENTER

Scanning ...

       78:47:1D:B3:6E:80       jasmin-0

Check if the devices you enabled are in the list above