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
- From a PC, download and unpack the test data tarball from the gitlab test repository:
- Copy the connman-pan-tethering-* folder to the target device:
- Log into the target device:
- After log into the DUT, enter the test directory
- 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.
- Make sure an Internet connection is active on the system.
- When testing on the SDK image, make sure blueman-applet is not running or kill it.
$ wget https://gitlab.apertis.org/tests/connman-pan-tethering/-/archive/apertis/v2024/connman-pan-tethering.tar.gz
$ tar -xvf connman-pan-tethering.tar.gz
$ DUT_IP=<device-ip>
$ scp -r connman-pan-tethering-* user@$DUT_IP:
$ ssh user@$DUT_IP
$ cd connman-pan-tethering-*
Execution Steps
- Enable bluetooth:
- Start Bluetooth tethering:
- 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.
- Execute the test suite inside an environment with dbus:
- There are some options:
- 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!)
$ connmanctl enable bluetooth
$ connmanctl tether bluetooth on
$ ./connman-pan-tethering.sh
-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)
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.