2: Device configuration - bruno-beloff/scs_mfr GitHub Wiki

docs > software repositories > scs_mfr


Services should not be running while configuration is taking place.

Part 1: Configuration

Specify which sensing subsystems are connected to the host device:

1.1 ./interface_conf.py -m MODEL -i INFERENCE_UDS
1.2 ./sht_conf.py -i INT_ADDR -e EXT_ADDR
1.3 ./pressure_conf.py [-m MODEL] [-a ALTITUDE]
1.4 ./scd30_conf.py -i INTERVAL -t OFFSET
1.5 ./opc_firmware_conf.py [-s FIELD VALUE] [-c]
1.6 ./opc_conf.py -m MODEL -s SAMPLE_PERIOD -p { 0 | 1 } -i INFERENCE_UDS
1.7 ./gps_conf.py -m MODEL -i INTERVAL -t TALLY -f REPORT_FILE
1.8 ./psu_conf.py -p PSU_MODEL -b BATT_MODEL -i INTERVAL -f REPORT_FILE

Part 2: Logging

Specify data logging activity on the device:

2.1 ./csv_logger_conf.py -r ROOT_PATH -o DELETE_OLDEST -i WRITE_INTERVAL

Part 3: Calibration

Specify the initial calibration of the relevant components. Baselines should be set to zero initially, then set to correct values after soak test:

3.1 ./rtc.py -i -s
3.2 ./timezone.py -s ZONE
3.3 ./afe_calib.py { -a SERIAL_NUMBER | -s SERIAL_NUMBER YYYY-MM-DD }
3.4 ./pt1000_calib.py -s
3.5 ./afe_baseline.py -1 SN1_OFFSET -2 SN2_OFFSET -3 SN3_OFFSET -4 SN3_OFFSET
3.6 ./scd30_baseline.py -c CORRECT REPORTED
3.7 ./mpl115a2_calib.py -s
3.8 ./fuel_gauge_calib.py -l D

Part 4: Communication

Generate a shared secret and the device identity on the network, together with device authentication (for AWS or OpenSensors). Finally, specify the sampling schedule:

4.1 ./display_conf.py -n NAME
4.2 ./mqtt_conf.py -p INHIBIT_PUBLISHING -f REPORT_FILE [-l]
4.3 ./shared_secret.py -g
4.4 ./system_id.py -v -d VENDOR_ID -m MODEL_ID -n MODEL_NAME -c CONFIG -a
4.5 ./aws_client_auth.py -e ENDPOINT -c CLIENT_ID -i CERT_ID
4.6 ./aws_project.py -v -s ORG GROUP LOCATION
4.7 ./schedule.py -s NAME INTERVAL COUNT

Part 5: AWS Greengrass

Configure the device identity within AWS Greengrass, and configure the contents of the Greengrass deployment:

5.1 ./gas_model_conf.py
5.2 ./pmx_model_conf.py

To be run as root:

5.3 aws_identity -sv
5.4 aws_group_setup -vsmfi4

To be run as scs:

5.5 ./aws_deployment.py -wvi4