system.py

Use Case

system.py is used to connect to Bluetooth devices, WIFI, updates, and rebooting the AXIBO. system.py is also used to get the system status, Bluetooth device list, WIFI lists, etc.

Valid Functions

get_system_status()

Returns the system status of AXIBO.

get_bluetooth_status()

Returns the Bluetooth devices found, paired, and connected.

get_wifi_status()

Returns the connected WIFI network.

get_redis_params()

get_wifi_list()

Returns the list of available WIFI networks.

get_update()

get_system_services()

Returns the status of the system services camera, hardware, tracker, and HDMI.

get_websockets()

configure_bluetooth(case, mac)

Scan, connect, and delete Bluetooth devices.

Valid case entries:

  • 1: Scan Bluetooth Device

  • 2: Delete Bluetooth Device

  • 3: Connect to Bluetooth device

Valid mac entries:

  • String formatted Bluetooth MAC address

connect_wifi(ssid, password)

Connects to a WIFI network.

Valid ssid entries:

  • String formatted valid WIFI network name

Valid password entries:

  • String formatted valid WIFI password.

delete_wifi(ssid)

Delete the WIFI network.

Valid ssid entries:

  • String formatted valid WIFI network name

start_stop(camera = 0, hardware = 0, tracker = 0, hdmiManager = 0)

Start and stop system services.

Valid camera / hardware / tracker / hdmiManager entries:

  • 0: Service disabled

  • 1: Service enabled

reboot()

Reboots AXIBO.

Example

from axibo import Axibo
import time

if __name__ == '__main__':    
    #Change for you Axibos IP Address
    x = Axibo("10.0.0.176")

    #x.system.get_wifiList()

    x.system.get_bluetooth_status()

    time.sleep(1)

    #Put device in pairing mode before this program is ran
    x.system.configure_bluetooth(3, "98:CD:E3:23:42:BD")

    #Wait for the visual indicator
    connected_status = input("Enter y when connected: ")

    if connected_status == 'y':
        x.system.get_bluetooth_status()
        
        delete_status = input("Would you like to delete this bluetooth device (y/n): ")

        if delete_status == 'y':
            x.system.configure_bluetooth(2, "98:CD:E3:23:42:BD")

            time.sleep(2)

            x.system.get_bluetooth_status()

Last updated