connman-pan-network-access manual


Image Types:
basesdk-amd64 / sdk-amd64 / target-armhf-internal / target-amd64
Image Deployment:


Test ConnMan support for bluetooth PAN Network Access Profile. This test will test internet access from Apertis to a bluetooth device sharing its internet connection. The underlying connection makes use of Bluetooth Network Access Profile with connman. First the two devices will be paired, then connection will be established. It will then be possible to verify that internet is usable from Apertis.


  • A USB Bluetooth adapter.
  • A phone supporting PAN NAP. A computer can also be used to share its internet connection.

Pre Conditions

  1. Ensure Rootfs is remounted as read/write.
  2. $ sudo mount -o remount,rw /

  3. Install dependencies
  4. $ sudo apt install apertis-tests chaiwala-tests python3-dbus python3-gi

  5. Restart the system to restore the filesystem state to read-only before running the test.
  6. $ sudo reboot

  7. Make sure an Internet connection is active on the phone and can be shared. The steps are phone specific.
  8. Ensure the bluetooth adapter is detected in Apertis: In VirtualBox menu, select "Devices > USB" and check the entry corresponding to the selected bluetooth adapter.
  9. 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:
  10. $ connmanctl enable bluetooth

  11. Start simple agent:
  12. $ /usr/lib/chaiwala-tests/bluez/simple-agent -y

  13. Pair both devices initiating from the phone side
  14. Pay attention to the simple-agent window as it requires input during the pairing process.

Execution Steps

  1. To ensure effective usage of bluetooth and not ethernet, one can use:
  2. $ connmanctl disable ethernet

  3. List connman services and Check no other network technologies is in use with:
  4. $ connmanctl services

  5. From the result select the bluetooth service which matches both the adapter and phone addresses. If connections succeeds, connmanctl will display Connected bluetooth_aabbccddeeff_feedbeefcafe:
  6. $ connmanctl connect bluetooth_aabbccddeeff_feedbeefcafe

    Connected bluetooth_aabbccddeeff_feedbeefcafe

  7. Control ip routing goes through PAN interface. IP addresses can vary, but the default gateway should be bnepX or enXaabbccddeeff:
  8. $ ip route

    default via dev bnep0 dev bnep0 proto kernel scope link src dev bnep0 scope link


At this point, you should be able to navigate on the internet from Apertis. For example:

user@apertis:~$ ping

PING ( 56(84) bytes of data.

64 bytes from ( icmp_seq=1 ttl=50 time=62.0 ms

Start the web browser from the Applications menu and display a web page.

Specifying a DNS should not be necessary, it can be done as follow:

$ connmanctl config bluetooth_aabbccddeeff_feedbeefcafe --nameservers

Post Conditions

  1. Disconnect using connmanctl:
  2. $ connmanctl disconnect bluetooth_aabbccddeeff_feedbeefcafe

  3. Enable ethernet again if it was disabled
  4. $ connmanctl enable ethernet


  • 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.