diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md new file mode 100644 index 0000000000..a536186ac2 --- /dev/null +++ b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/adb.md @@ -0,0 +1,80 @@ +--- +title: Connect to UNO Q via ADB +description: Learn how to connect to the UNO Q's shell via ADB. +author: Karl Söderby +tags: [UNO Q, ADB, Linux] +--- + +The Linux OS running on the [Arduino UNO Q](https://store.arduino.cc/products/uno-q) can be accessed over USB, using a tool called Android Debug Bridge (ADB). + +ADB is a tool that you install on your computer, where you can access the board's shell and run operations on the system. + +## Requirements + +The following hardware is required: +- [Arduino UNO Q](https://store.arduino.cc/products/uno-q) +- [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c) + +You will also need to have the following software installed on your OS: +- [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools) + +## Installing ADB (Host Computer) + +The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below. + +***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.*** + +### MacOS + +To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command: + +```bash +brew install android-platform-tools +``` + +To verify the tool is installed, run `adb version`. + +### Windows + +To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions. + +Open a terminal and run the following: + +```bash +winget install Google.PlatformTools +``` + +To verify the tool is installed, run `adb version`. + +### Linux + +To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command: + +```bash +sudo apt-get install android-sdk-platform-tools +``` + +To verify the tool is installed, run `adb version`. + +## Connect via ADB + +1. Connect the UNO Q board to your computer via USB-C®. +2. Run `adb devices` in the terminal. This should list the connected devices. + + ![Connected devices](assets/connected-devices.png) + +>Note that it may take up to a minute for the device to appear after connecting it. + +3. Run `adb shell`. If you have not set up your board prior to this via the Arduino App Lab, you may be required to provide a password, which is `arduino`. +4. You should now be inside your board's terminal. + + ![Terminal on the board.](assets/board-terminal.png) + +5. You are now able to run commands via the terminal on your board! To exit from the terminal, simply type `exit`. + +## Summary + +Connecting via ADB is an easy way to gain access to your board's shell, allowing you to perform actions such as installing packages, editing files and running scripts. + +The `arduino-app-cli` can also be used directly via the shell, allowing you to launch Apps directly from the command line. You can read more about that in the link below: +- [Arduino App CLI: Manage Apps from the Command Line](/software/app-lab/tutorials/cli/) \ No newline at end of file diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png new file mode 100644 index 0000000000..3a83ffa5ee Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/board-terminal.png differ diff --git a/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png new file mode 100644 index 0000000000..ed27cffab4 Binary files /dev/null and b/content/hardware/02.uno/boards/uno-q/tutorials/06.adb/assets/connected-devices.png differ diff --git a/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md b/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md index 8ce9ded84c..32167054ee 100644 --- a/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md +++ b/content/software/app-lab/tutorials/03.cli/apps-lab-cli.md @@ -15,51 +15,15 @@ The following hardware is required: - [Arduino UNO Q](https://store.arduino.cc/products/uno-q) - [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c) -You will also need to have the following software installed: +To access the board via `adb` (over USB), you will also need to have the following software installed: - [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools) -## Installing ADB (Host Computer) - -***Note: if you are using the board as a Single Board Computer (SBC Mode (Preview) without a host computer), you do not need to install ADB. You can run `arduino-app-cli` directly from the terminal.*** - -The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below. - -***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.*** - -### MacOS - -To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command: - -```sh -brew install android-platform-tools -``` - -To verify the tool is installed, run `adb version`. - -### Windows - -To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions. - -Open a terminal and run the following: - -```sh -winget install Google.PlatformTools -``` - -To verify the tool is installed, run `adb version`. - -### Linux - -To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command: - -```sh -sudo apt-get install android-sdk-platform-tools -``` - -To verify the tool is installed, run `adb version`. +You can also access the board via SSH, which is typically installed on your system by default. ## Connect via ADB +***To learn more about setting up `adb`, check out the [Connect to UNO Q via ADB](/tutorials/uno-q/adb/) tutorial. This guide will walk you through the installation steps.*** + 1. Connect the UNO Q board to your computer via USB-C. 2. Run `adb devices` in the terminal. This should list the connected devices. @@ -76,7 +40,7 @@ To verify the tool is installed, run `adb version`. ## Connect via SSH -***Note: to use SSH, the [first setup]() needs to be completed. This is done by connecting your board via USB, open the Arduino App Lab, and select the USB option. Here you will need to give your board a name, a new password as well as providing Wi-Fi® credentials. SSH will be automatically configured during this setup.*** +***Note: to use SSH, the [first setup](/software/app-lab/tutorials/getting-started#install--set-up-arduino-app-lab) needs to be completed. This is done by connecting your board via USB, open the Arduino App Lab, and select the USB option. Here you will need to give your board a name, a new password as well as providing Wi-Fi® credentials. SSH will be automatically configured during this setup.*** 1. Open a terminal on your machine. 2. Run `ssh arduino@.local` @@ -183,15 +147,6 @@ This will list all available Apps (including examples), and their status: ![List Apps.](assets/list-apps.png) -## Set Board Name - -To set a board name using the `arduino-app-cli`, we can use the `set-name` command. - -```sh -arduino-app-cli board set-name "my-board" -``` - -This will change the name of the board, which will take effect after resetting the board. ## System Configuration and Updates @@ -204,6 +159,13 @@ arduino-app-cli system update ``` This will prompt you to install any available updates. +To set the board name, use: + +```sh +arduino-app-cli system set-name "my-board" +``` +This will change the name of the board, which will take effect after resetting the board. + To enable or disable the network mode, use: ```sh