diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/IDE-boards.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/IDE-boards.png deleted file mode 100644 index cdbf11449e..0000000000 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/IDE-boards.png and /dev/null differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/adb-connection.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/adb-connection.png new file mode 100644 index 0000000000..7dfb9345b7 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/adb-connection.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-device-page.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-device-page.png new file mode 100644 index 0000000000..c7f5f9eb69 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-device-page.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-prompt.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-prompt.png new file mode 100644 index 0000000000..c4a596114b Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-prompt.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-success.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-success.png new file mode 100644 index 0000000000..4f12c185d1 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-success.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-token.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-token.png new file mode 100644 index 0000000000..24921c3bc3 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-activation-token.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-create-factory.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-create-factory.png new file mode 100644 index 0000000000..cbe25d16ff Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-create-factory.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factories.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factories.png new file mode 100644 index 0000000000..bf63d97701 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factories.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-dashboard.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-dashboard.png new file mode 100644 index 0000000000..3a68352d0d Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-dashboard.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-devices.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-devices.png new file mode 100644 index 0000000000..38e92b4f07 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/foundries-factory-devices.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-name.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-name.png index b1efc66e08..79d6416b14 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-name.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-name.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-register.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-register.png index af522a2262..e1aebda952 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-register.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-register.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-success.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-success.png new file mode 100644 index 0000000000..53f785cdb7 Binary files /dev/null and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-factory-success.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-factory.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-factory.png index 56281ef9c4..cc6909c764 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-factory.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-factory.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-wifi.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-wifi.png index d6d81013f0..904d8b675b 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-wifi.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main-wifi.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main.png index 99a83fa226..bfa60466d8 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-main.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-pass.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-pass.png index 7d866722b3..246107dcbb 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-pass.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-pass.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-ssid.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-ssid.png index d4df522dff..bc87fca757 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-ssid.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-ssid.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-sucess.png b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-sucess.png index ce32bc46d1..6a9a146bbf 100644 Binary files a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-sucess.png and b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/assets/x8-oob-wifi-sucess.png differ diff --git a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/content.md b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/content.md index f90ac421f3..bfe2dc08ff 100644 --- a/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/content.md +++ b/content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/content.md @@ -20,15 +20,14 @@ software: ## Connecting to the Board -Once the Portenta X8 is plugged in via USB, you can open your browser and go to http://192.168.7.1 and see a web page which is hosted by the board, from this dashboard you will be able to: +Once the Portenta X8 is plugged in via USB, you can open your browser and go to http://192.168.7.1 if you use Windows and Linux or http://192.168.8.1 on MacOS. This web page is hosted on the Portenta X8, from this dashboard you will be able to: ![Board set up page](assets/x8-oob-main.png) - * [Configure Wi-Fi](#connecting-to-your-wi-fi) -* [Register the factory (OTA)](#registering-a-factory) +* [Add your device to a factory (OTA)](#add-a-new-device-to-your-factory) * Board details -* Shell +* Shell (alpine python) ## Connecting to Your Wi-Fi @@ -44,31 +43,79 @@ Type the password. ![Wifi password set up](assets/x8-oob-wifi-pass.png) -Once its connected you should see the Wi-Fi status dot in the bottom left turn green. +Once it is connected, you should see the Wi-Fi status bullet in the bottom left turning green. ![Wifi connection done](assets/x8-oob-wifi-sucess.png) +***You can change your network by clicking on the button again and repeat the above steps*** -***You can change your network by clicking on the button again and repeat the steps*** +## Connect to a Factory -## Registering a Factory +### Register the Factory on Foundries.io -Click the "Register with Factory" button. +Go to [https://create.arduino.cc](https://create.arduino.cc) and click on portenta-X8 board manager, you will get prompted to set a new `Factory` name if you didn't have one before. You will not be able to be change the name later, so use one that you can remember and write easily. -![Register with factory](assets/x8-oob-main-factory.png) +![Arduino Cloud integration](assets/cloud-main.png) -And set your new factory name. +It will redirect you to the Foundries.io factory registration page. -![Name your factory](assets/x8-oob-factory-name.png) +![Foundries Factory creation](assets/foundries-create-factory.png) -Click register, now you will get a code that you need to paste into your factory page by opening [Arduino Create Cloud](https://create.arduino.cc) in your browser and click the "Portenta X8 Board Manager" inside the integrations section. -![Complete factory page](assets/x8-oob-factory-register.png) -![Arduino Cloud integration](assets/cloud-main.png) +Then you can go to [https://app.foundries.io/factories](https://app.foundries.io/factories) and it will show the factory you just created. + +![Foundries Factories](assets/foundries-factories.png) + +After you have created your Foundries.io factory you need to go back to the Portenta-X8 web dashboard to add a new device into your new factory. + +### Add A New Device To Your Factory + +Click the "Register Factory name" button. + +![Register factory button](assets/x8-oob-main-factory.png) + +![Factory connection](assets/x8-oob-factory-name.png) + +The next panel gives you a code that you need to copy. + +![Device factory token](assets/x8-oob-factory-register.png) + +Click on the "Complete registration" button on the Portenta X8 dashboard + +The button will open the Foundries.io activation page. Paste your token in the text box and press continue. + +![Foundries device link](assets/foundries-activation-token.png) + +Confirm the addition of the new device by pressing "Connect" + +![Foundries device confirmation](assets/foundries-activation-prompt.png) + +Finally you will see a confirmation which means that your device now is attached to the new factory. + +![Dashboard with a factory attached](assets/foundries-activation-success.png) + +Once it is completed, the factory button on the Portenta X8 dashboard will turn green. + +![Successful connection](assets/x8-oob-factory-success.png) -Once it is completed the factory button will turn green. +#### Check Your Factory -![Successful connection](assets/x8-oob-wifi-sucess.png) +Have a look to your factories by going to [Foundries.io factories page](https://app.foundries.io/factories) +![Foundries.io factories page](assets/foundries-factories.png) + +Select the factory that you want to check and it will open its dashboard. + +![Foundries.io Factory dashboard](assets/foundries-factory-dashboard.png) + +#### Check Your Device + +You can check if your device is fully connected to your factory by going to the "devices" tab. + +![Foundries.io factory devices page](assets/foundries-factory-devices.png) + +Then choose the device you want to check by clicking on its box and it will open its page. + +![Foundries new device activation page](assets/foundries-activation-device-page.png) ## Controlling Portenta X8 Through the Terminal @@ -76,13 +123,15 @@ You have plenty of ways to communicate with your board, be it wirelessly or with ### ADB -First of all make sure you have the latest **Mbed OS Portenta Core**, which contains the adb program. +First of all, make sure you have the latest **Mbed OS Portenta Core**, which contains the adb program. You can go to its directory inside the **Arduino15/packages/arduino/tools/adb/32.0.0**. To check the tool you can use your teminal and type `adb`, you should get feedback from the tool when typing this. To know the list of devices that can be accessed type `adb devices`. If you only see one device you can try and type `adb shell`, you are now communicating with your Portenta X8. +![Terminal using ADB](assets/adb-connection.png) + ### SSH SSH is commonly used for remote control on different kinds of devices running different set ups through TCP-IP. @@ -96,18 +145,30 @@ To gain admin (root) access, type `sudo su -` and the password is `fio` after t ![CLI configured](assets/ssh-connection-admin.png) -### Inspecting Real Time Tasks +### CLI Commands -Run: `journalctl -f` to see what's going on on the device +### Connect to a Wi-Fi Access Point -![Real time tasks on CLI](assets/command-journalctl.png) +Using the network manager tool `nmcli`: + +`nmcli device wifi connect password ` + +To check your manager connection status, use this command: + +`nmcli de` + +### Register Device to the Factory -## Uploading an Arduino Sketch +Make sure the name is not already being used in your Factory. -Make sure you have the latest mbed Core and as every other board you can select the board inside the `mbed Portenta`. +`lmp-device-register -n ` -![Board selected in Arduino IDE](assets/IDE-boards.png) +**Not recommended:** In case you cannot register the new device, you can erase the current device info by removing `/var/sota/sql.db` -And click compile and upload. +`sudo rm /var/sota/sql.db` -***Make sure you don't share GPIOs on the linux side and the Arduino sketch, this will avoid possible errors*** +### Inspecting Real Time Tasks + +Run: `journalctl -f` to see what's going on on the device + +![Real time tasks on CLI](assets/command-journalctl.png)