connman-services-switchover manual

critical

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

Description

Tests Network connection management: ensuring that ConnMan can connect to actual networks even after the device under test is rebooted


Pre Conditions

  1. The device must have wifi (onboard or adapter), otherwise skip this test.
  2. A mobile Hot-Spot must be setup
  3. Please note that connman disables wifi by default on a fresh image. To enable:
  4. $ connmanctl enable wifi
  5. If it's already enabled, connmanctl will give the error "Error wifi: Already enabled" that may be ignored.

Execution Steps

  1. Run the ConnMan CLI Interface:
  2. $ connmanctl
  3. When run without arguments, connmanctl will launch in interactive mode with a "connmanctl>" prompt.
  4. Scan wifi:
  5. $ connmanctl> scan wifi
  6. Wait for "Scan completed for wifi" before continuing (this may take a few seconds and will appear above connmanctl prompt).
  7. Turn on the agent, to manage additional information if required:
  8. $ connmanctl> agent on
  9. connmanctl should return "Agent registered".
  10. List services available:
  11. $ connmanctl> services
  12. Select required service and use the "service ID" (second column) to connect:
  13. $ connmanctl> connect <service ID>
  14. If it's connecting to a Wi-Fi service that needs additional information connmanctl will output an "Agent RequestInput (…)" line followed by a prompt for the required information, such as "Passphrase? ".
  15. Ensure ConnMan returns "Connected <service ID>" before continuing.
  16. Quit from connmanctl interactive mode with:
  17. $ connmanctl> quit
  18. On the terminal enter:
  19. $ busybox wget www.google.com
  20. Wget is successfull and the connection is establised via Wi-Fi
  21. Disconnect from the Wi-Fi network
  22. $ connmanctl
    $ connmanctl> scan wifi
  23. Connect to the mobile hot-spot that you have setup on your phone by entering the right password
  24. Quit from connmanctl interactive mode with:
  25. $ connmanctl> quit
    $ connmanctl
    $ connmanctl> scan wifi
  26. Connect back to the Wi-Fi network

Expected

If success "Connected <service ID>" will be printed by connmanctl, otherwise "Agent ReportError <service ID>" will be printed.

On executing the "busybox wget" command the connection should succeed and you should be able to ping any website

On switching over from the mobile hot-spot to Wi-Fi network connman should not ask the user to re-enter the password for the Wi-Fi network

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.
  • When testing the SDK image in VirtualBox with an Asus USB-N10 Wireless adapter, firmware-realtek needs to be installed on the host.