-
Notifications
You must be signed in to change notification settings - Fork 119
08 Aero Network and System Administration
Please refer to the module C2 - Lab Setup - Network and ssh
of the course for more details. Here are the basic facts:
By default, Intel's Yocto for Aero is broadcasting a WiFi access point called 'Aero-' and Wi-Fi password is 1234567890.
The IP of Aero is 192.168.8.1. Login is root, no password.
Launch a terminal and connect to aero via ssh.
On macOS and Linux it's possible to use the link-local name rather than fixed IP. Refer to the documentation of your distro on how to enable it; it's enabled by default on Fedora and Archlinux's documentation works on several Linux distributions and macOS:
Please refer to the module C2 - Lab Setup - Network and ssh
of the course for more details. Here are the basic facts:
In order to have internet access on Aero board it's possible to switch it to client mode so it connects to your Access Point instead of being an Access Point itself. We'll use the standard connman.
Here's the procedure (make sure you flashed your drone with the 1.4 release or newer):
- Log in as the default root user on the drone;
- Run the application
connmanctl
, you will enter the connmanctl CLI which will be presented with theconnmanctl>
prompt; - If you run the command
technologies
, it should display WiFi as being Powered and Tethering (AP mode) as True; - Disable AP mode by running:
tether wifi off
- Enable the agent to allow typing a password:
agent on
- Scan for existing WiFi connections by running:
scan wifi
- After it shows scan as completed, list the connections found by running:
services
- Choose which connection you want to use and take a look at the second field there, the connection id, you will use it on the next command (and remember you can use tab completion so you don't have to type everything, or better just to copy and paste the connection id on the command below);
- Run the command:
connect wifi_< connection id >
, in which < connection id > should be replaced by the id of the network you found above. - If everything went ok, you should be connected now and can exit connmanctl (
ctrl-d
, orquit
). Test your connection by pinging a known web page:ping www.google.com
Please refer to the module D3 - Software - Docker containers
of the course for more details. Here are the basic facts:
Intel Aero is shipped with a Yocto Linux build: Yocto is great as an embedded build system for professionals, including in the aeronautics sector where it is widely used. But it is not very friendly for rapid prototyping: Some may prefer an OS like Ubuntu Linux https://www.ubuntu.com (Copyright 2017 Canonical) or Debian.
There’s several possible mechanisms to create this separation and choice of OS for deployment. On Intel Aero we support containers. A container is a set of resources (cpu, memory ...) allocated to a set of processes. It’s a lot like a virtual machine but much lighter and efficient as it works at the process level and not the OS level. It is very popular in the server world, where the toolbox Docker is allowing you to create development environments on your station (Linux, Mac, Windows) and migrate them to servers seamlessly. To summarize, containers behave like a virtual machine but also like a way to package and deploy apps.
Here's how to get started:
The docker command line tool allow the management of containers. The run command with parameters --interactive (-i) and --tty (-t) opens a console session within the container environment. The run command requires a docker image name in order to create a new container. The following example shows the execution of a container based on Ubuntu 16.04:
$ docker run --privileged -it ubuntu:16.04
The parameter --privileged grants full access to host devices. Notice the first execution of run will download a docker image to satisfy the request for a new container. After that, an Ubuntu 16.04 environment will be available, providing commands such as apt for package management, etc. To exit a container, simply use Ctrl+d or execute the exit command. When you exit a container, all of the modifications you have done inside will be lost unless you explicitly save the state (more info below). To find a list of docker images available, check https://hub.docker.com/search/. Useful commands:
-
docker images
will list existing docker images; -
docker ps
will list the containers currently in execution. The values in column “CONTAINER ID” can be used to execute other docker commands -
docker commit <CONTAINER ID>
will save the existing state of a running container into a new image, this needs to be run outside of a docker instance, so if you are already inside of one you can ssh back into the drone by running: ssh 172.17.0.1. You can also have multiple ssh connections to aero, leaving one inside the docker container and another on the host. The screen command on the host also works, so you can multiplex a single connection -
docker exec -it <CONTAINER ID> bash
can be used to have multiple terminals inside the container - or you can install screen inside the container and multiplex a single terminal. Note the screen shortcuts for screen will conflict if you use both on host and container
Please refer to the module D3 - Software - Docker containers
of the course for more details. Here are the basic facts:
As seen in the previous example, you can instantiate a live image from a downloaded image and modify it on the fly. But you can also define one programmatically. In this example, I'll build an image based on Ubuntu 16.04, will add openssh-server and set a default password. I will then instantiate this image with the right settings to listen to a network port on Intel Aero. Users will then be able to access the docker running on Intel Aero from the network with ssh. Check the course to understand the details.
First, create a file called Dockerfile
:
FROM ubuntu:16.04
MAINTAINER Paul Guermonprez <[email protected]>
RUN apt-get update && apt-get install -y openssh-server iputils-ping net-tools
RUN mkdir /var/run/sshd
RUN echo 'root:password' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
CMD ["/usr/sbin/sshd", "-D"]
Then launch the creation process:
docker build -t "guermonprez/aero-demo" .
It will download the Ubuntu docker, if needed. Then run apt-get install
and all the commands.
Instantiate the container, listening on port 2222:
docker run -d --name aero-demo -h aero-demo -p 2222:22 guermonprez/aero-demo
Open a direct shell on the image:
docker exec -i -t aero-demo bash
Or a ssh connection from your station, first to the Yocto layer:
(change the IP to reflect the drone's IP on YOUR NETWORK)
ssh [email protected]
Then to the docker instance (here ubuntu):
ssh [email protected] -p 2222
To list container instances, and stop ours:
docker ps
docker stop aero-demo
List images, and delete our instance and image created:
docker images
docker rm aero-demo
docker rmi guermonprez/aero-demo
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Latest Software (BIOS & OS image) BSP Released: v1.6.1 on 2017-12-18
Important: This repository is no longer being maintained
- About Intel Aero
- Initial Setup
- First Flight
- Ubuntu* installation
- Video Course - Autonomous Drone Engineer
- Intel Aero Ecosystem