- Download the file from protobuf releases based on your CPU architecture.
1.1. For Rasp4:1.2. For Scouter:$ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-aarch_64.zip
$ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip
- Unzip the downloaded file:
$ unzip [downloaded zip file] -d protoc3
- Move the files and change ownership based on your environment:
3.1. For Rasp4:3.2. For Scouter:$ sudo mv protoc3/bin/* /usr/bin/ $ sudo mv protoc3/include/* /usr/include/ $ sudo chown $USER /usr/bin/protoc $ sudo chown -R $USER /usr/include/google
$ sudo mv protoc3/bin/* /home/scouter/anaconda3/bin/ $ sudo mv protoc3/include/* /home/scouter/anaconda3/include/ $ sudo chown $USER /home/scouter/anaconda3/bin/protoc $ sudo chown -R $USER /home/scouter/anaconda3/include/google
- Install the Protobuf Python package:
$ pip3 install --upgrade protobuf # Version 5.27.0
- Modify
configs/config_producer.py
:- Write the column names and their data types of the CSV in
type_dict
.
- Write the column names and their data types of the CSV in
- Update the MQTT connection information in
configs/config_producer.py
. - Place the CSV file in the current directory before running the script:
- Example:
transport_201.csv
- Example:
- Execute
send_tramsport_sensor_simulation
:
4.1. Running individually:
bash $ python3 send_tramsport_sensor_simulation.py [eqp_id]
4.2. External execution:
- Prepare the CSV file and modify the config files as needed.