.. _opennao-advanced: OpenNAO - NAO OS ================ What is OpenNAO --------------- **OpenNAO** is a GNU/Linux distribution based on **Gentoo**. It's an embedded GNU/Linux distribution specifically developed to fit the NAO robot needs. **OpenNAO** provides numbers of programs and libraries, among these, all the required one by **NAOqi**, the piece of software giving life to the robot. This page presents miscellaneous tips about the OpenNAO embedded OS. .. _opennao-user-account: User accounts ------------- The main user is *nao*, and like any GNU/Linux system, there is the super-user *root*. By default, passwords are usernames. So, changing user to *root* using the ``su`` command will request the password ``root`` Logging in as *root* over ssh is now disabled. However the ``su`` command remains available. We recommend to change the *nao*'s password using the web page. +--------------+-------------+-------------------------+ | User | Password | Description | +==============+=============+=========================+ | nao | nao | default account | +--------------+-------------+-------------------------+ | root | root | administrator account | +--------------+-------------+-------------------------+ What does it run? ----------------- *OpenNAO* OS provides and runs numerous programs, among these: * ``connman``: the network manager; * ``NAOqi``: the software that allows the robot to move, an so on. .. _opennao-ssh: Accessing NAO over ssh ----------------------- To login on your NAO, get its IP address pushing its torse button, then connect to your NAO over ssh: * using putty: .. image:: /medias/opennao/ssh_putty.png * in a Linux terminal, run: .. code-block:: sh ssh nao@192.168.1.10 .. note:: Refer to :ref:`OpenNAO user account ` section for logins and passwords. .. _opennao-shell: Shell ----- The default shell is ``bash`` with a custom profile. When logging in as *nao*, the prompt now looks like: .. code-block:: sh [] $ When logging in as *root*: .. code-block:: sh root@ [] $ Example: .. image:: /medias/opennao/prompt.png Base commands and programs -------------------------- +--------------+---------------------------------------+ | Program | Description | +==============+=======================================+ | htop | monitor process activity | | | (many options are available use F1) | +--------------+---------------------------------------+ | iftop | monitor network activity | +--------------+---------------------------------------+ | ldd | list library dependencies | +--------------+---------------------------------------+ | gdb-remote | start a remote gdb server | +--------------+---------------------------------------+ Sudo and root permissions ------------------------- ``sudo`` is available on OpenNAO. Its usage is limited for shuting down NAO. .. code-block:: sh sudo shutdown -h now This will ask you for the *nao* user password. For any others commands requiring root permissions, you will have to use ``su`` and authenticate using the *root* user password. .. _opennao-texteditor: Text editor ----------- Now, the available text editors in OpenNAO are: * ``nano`` * ``qemacs`` (alias as ``e`` and ``emacs``) * ``vim`` (alias as ``vi``) .. _opennao-ftp-access: FTP Access ---------- #. Start a FTP client on the PC side. We recommend `Filezilla `_. #. Fill in the different fields * Host: your "BonjourName.local" or your IP address * Username: with "nao" * Password: with your nao password * Port: 21 .. image:: /medias/opennao/filezilla_ftp.png .. System organization .. ------------------- .. Python .. ++++++ .. On the robot, we use Python 2.6. .. Python usage follows the standard defined by the Python specification. .. Please refer to the :ref:`Python usage ` section. .. .. _opennao-system-organization-naoqi: .. NAOqi .. +++++ .. This section reminds and completes the :ref:`NAOqi changes `. .. From the 1.12 release, NAOqi (the software allowing to use the robot) is now .. packaged and installed like any others programs. .. Thus, libraries are located in ``/usr/lib``, executables in ``/usr/bin`` and .. configuration files in ``/etc/naoqi``. .. Therefore standard provided NAOqi's modules are located in ``/usr/lib/naoqi``. .. Please refer to the :ref:`NAOqi users' modules ` section .. to add your own modules. .. As usual, it is possible to *start* / *stop* / *restart* / *get the status* of .. NAOqi using the following commands: .. .. code-block:: sh .. nao start .. nao stop .. nao restart .. nao status .. .. todo :: This part should be rewritten or removed: .. As said in the :ref:`dcm` page, the way of dealing with the hardware has .. changed from the *old* DCM implemenatation as a NAOqi module to the HAL. .. We try hard to keep the compatibility of all interfaces. In case it is not .. sufficient, it is possible to get back the DCM instead of the HAL though .. (refer to :ref:`dcm` page).