You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever you change anything in the Python® script on your computer, you will have to sync it back to the X8 and re-build the container. Following command sequence will help you to do this process:
Copy file name to clipboardExpand all lines: content/hardware/04.pro/boards/portenta-x8/tutorials/08.image-building/content.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,7 @@ In this tutorial, you have learned how to build a "builder" Docker image, get it
232
232
233
233
## Next Steps
234
234
235
-
Please follow the [Flashing tutorial](image-flashing) to flash your device with your custom image. You can use the files provided from this build to flash the Portenta X8 following the tutorial's steps.
235
+
Please follow the [Flashing tutorial](https://docs.arduino.cc/tutorials/portenta-x8/image-flashing/) to flash your device with your custom image. You can use the files provided from this build to flash the Portenta X8 following the tutorial's steps.
Copy file name to clipboardExpand all lines: content/hardware/04.pro/boards/portenta-x8/tutorials/12.multi-protocol-gateway/content.md
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: '12. Multi-Protocol Gateway With Portenta X8 & Max Carrier'
3
3
description: 'This tutorial shows how to setup a multi-protocol gateway environment on Portenta X8 using Max Carrier'
4
+
difficulty: intermediate
4
5
tags:
5
6
- Containers
6
7
- Docker
@@ -111,15 +112,15 @@ Before you begin diving deep into creating a Multi-protocol gateway, and having
111
112
112
113
The `m4-proxy` is a service that manages data exchange between these layers. You can use the following command in the terminal to observe if the service is running correctly.
113
114
114
-
```
115
+
```bash
115
116
sudo journalctl -fu m4-proxy
116
117
```
117
118
118
119
Now you will implement RPC (Remote Procedure Call) to establish communication between the Arduino and Linux layers, which is a communication mechanism developed to exchange data between these two layers.
119
120
120
121
**You will not be able to check messages via `Serial.println()` statements** to check if the Arduino sketch is running in the desired manner. You will have to use instead **`py-serialrpc`**, which is a service that will assist you in listening to those messages, and printing them on a console on the Linux layer. To have the service active, please download [this compressed file](assets/py-serialrpc.zip) to build and run the container on the Linux side of Portenta X8. Please execute the following commands to have the service running.
121
122
122
-
```
123
+
```bash
123
124
// Copy the decompressed files in ../adb/32.0.0
124
125
adb push py-serialrpc /home/fio
125
126
adb shell
@@ -134,15 +135,15 @@ cd /home/fio/py-serialrpc
134
135
135
136
To access the logs of `py-serialrpc` service, while maintaining the same directory, execute the following command.
136
137
137
-
```
138
+
```bash
138
139
sudo docker-compose logs -f --tail 20
139
140
```
140
141
141
142
***For more details about how data exchange between Arduino and Linux layer works and to understand how to debug, please read [Data Exchange Between Python® on Linux and an Arduino Sketch](https://docs.arduino.cc/tutorials/portenta-x8/python-arduino-data-exchange)***
142
143
143
144
If you have not configured internal Wi-Fi® connectivity within the system, please use the following command line:
Having the files ready in that directory, you can use the following commands to push the files to the `fio` directory inside the Portenta X8. The second command will let you navigate inside the Portenta X8.
503
504
504
-
```
505
+
```bash
505
506
adb push multi-protocol-gateway /home/fio
506
507
adb shell
507
508
```
508
509
509
510
You will now build the container using the following commands. The following command will tag the container with `Multi_Protocol_Gateway_X8` as its name.
You will be able to see the following results when the image is built successfully.
@@ -521,19 +522,19 @@ You will be able to see the following results when the image is built successful
521
522
522
523
After a successful container build, you will run the image. To do that, you can use the following command. This command will immediately give an output in your terminal, telling you how the Python® script is running. If you wish to have it running in the background, please add the `-d` flag at the end of the command.
523
524
524
-
```
525
-
#Multi_Protocol_Gateway_X8 sudo docker-compose up
525
+
```bash
526
+
Multi_Protocol_Gateway_X8 sudo docker-compose up
526
527
```
527
528
528
529
Finally, you will have the multi-protocol gateway running, which uses Wi-Fi® and LoRa® connectivity. Also, RPC for exchanging data between its layers. However, there are cases where you would wish to make changes by adding more functionalities, such as including Cat. M1 or NB-IoT to expand its communication spectrum. For this, you will need to stop the image. To stop the image from running, you can use the following command.
529
530
530
-
```
531
-
#Multi_Protocol_Gateway_X8 sudo docker-compose down
531
+
```bash
532
+
Multi_Protocol_Gateway_X8 sudo docker-compose down
532
533
```
533
534
534
535
Getting to know the status of the image is also crucial as it is the indicator of the state of operation. The following command brings up **active** containers and shows the status if the container restarted or stopped due to certain reasons. The second command lists built images and it will show you the components that go with the main image that you're building.
0 commit comments