ALConnectionManager

NAOqi Core - Overview | API | NetworkInfo | NetworkInfo-IPInfo


What it does

ALConnectionManager provides methods to manage the network connectivity. It contains commands allowing you to configure or connect a network, but also to get the network properties or to create a network.

ALConnectionManager supports several technologies such as Ethernet, WiFi and Bluetooth.

The main features are:

  • List available network services.
  • Connect to a network service.
  • Create a network service (supports WiFi Access Point and Bluetooth PAN).
  • List available network technologies.
  • Configure a network service.

This module gives access to useful information about the different network services, such as the strength of a WiFi service, its current state or its security requirement.

This module notifies through events the changes about the network connectivity.

How it works

ALConnectionManager is based on the open source software ConnMan to get information about all networks services and connecting to them.

Aldebaran Robotics is a contributor to the ConnMan project, our ConnMan sources are hosted on github http://github.com/aldebaran, only a few patches differs from the official ConnMan version, our goal is to limit as much as possible the differences between the two versions.

The WiFi services are handled by WPA Supplicant. The Bluetooth services are handled by BlueZ.

Performance and Limitations

Limitation

  • ALConnectionManager is only available on the robot.
  • ALConnectionManager currently doesn’t support WPA entreprise security.
  • The list of WiFi services are not available when the tethering mode is enabled.
  • ALConnectionManager does not handle bluetooth devices pairing.

Warning about tethering and security issue

The Tethering mode makes the robot acting as an Access Point, but it also shares your Internet connectivity. If the robot is connected to a corporate network, you have to verify if this mode is compatible with your network security policy.

Getting Started

Essential information to deal with ALConnectionManager:

Services objects from ConnectionManager are represented as NetworkInfo.

Getting the global state of the network connectivity


# -*- encoding: UTF-8 -*- 
#!/usr/bin/env python
from naoqi import ALProxy

NAO_IP = "127.0.0.1"

alconnman = ALProxy("ALConnectionManager", NAO_IP, 9559)

print "network state: " + alconnman.state()

Getting the network services list


# -*- encoding: UTF-8 -*- 
#!/usr/bin/env python
from naoqi       import ALProxy

NAO_IP = "127.0.0.1"

alconnman = ALProxy("ALConnectionManager", NAO_IP, 9559)

#Scanning is required to update the services list
alconnman.scan()
services = alconnman.services()

for service in services:
    network = dict(service)
    if network["Name"] == "":
        print "{hidden} " + network["ServiceId"]
    else:
        print network["Name"] + " " + network["ServiceId"]