connman-pan-tethering manual

medium

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

Description

Test ConnMan support for PAN connectivity.


Resources

  • A Bluetooth adapter.
  • A device supporting PAN PANU.

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/connman-pan-tethering/-/archive/apertis/v2025dev0/connman-pan-tethering.tar.gz
    $ tar -xvf connman-pan-tethering.tar.gz
  3. Copy the connman-pan-tethering-* folder to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r connman-pan-tethering-* 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 connman-pan-tethering-*
  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. Make sure an Internet connection is active on the system.
  11. When testing on the SDK image, make sure blueman-applet is not running or kill it.

Execution Steps

  1. Enable bluetooth:
  2. $ connmanctl enable bluetooth
  3. Start Bluetooth tethering:
  4. $ connmanctl tether bluetooth on
  5. The phone must be in discoverable mode for starting this test. Look for the phone in this list, and save the BT address. It will be used while running the test.
  6. Execute the test suite inside an environment with dbus:
  7. $ ./connman-pan-tethering.sh
  8. There are some options:
  9. -a select which device you want to pair with (specify the address)

    -s skip pairing because the device is already paired. -a must be present when using this.

    -x enables test debugging (only useful if a test fails)

  10. On the other device, scan for the Bluetooth device and pair with, then connect to the Bluetooth PAN. Most phones(?) don't actually support tethering to another device (as they, by definition, already have an internet connection) but connecting a computer and asking, say, NetworkManager to connect to the newly paired bluetooth device should work just fine (when testing in this case, ensure all other connections are disabled!)

Expected

If connections succeeds and you are able to navigate on the internet then it works. The output should be similar to that:

select_adapter

Selected /org/bluez/hci0

select_device: Discovering...

Device found: F0:39:42:86:2E:1B Charge 2

Device found: 88:83:22:2F:56:2A Galaxy A5 2016

Input device address: 88:83:22:2F:56:2A

Selected address: 88:83:22:2F:56:2A

start_agent

test_pairing_initiator

Scanning in progress...

Pairing request to 88:83:22:2F:56:2A in progress...

Device found: /org/bluez/hci0/dev_88_83_22_2F_56_2A

Device 88_83_22_2F_56_2A is paired

test_pairing_responder

Start a pairing from the phone! was it successful (y/n):

y

Device found: /org/bluez/hci0/dev_88_83_22_2F_56_2A

Device 88_83_22_2F_56_2A is paired

Notes

  • Warning: Connman changes are persistent (over reboot!). After finishing testing, it might be wise to perform the dhcp test to ensure that the network is in a sensible state.
  • For ALL tests the enable step will give an "In progress" error if the device is already enabled. This is to be expected.