AWS IoT FleetWise OBD - github's demo.sh

0

Hello AWS people I would like to collect OBD data using <campaign-obd-heartbeat.json> in IoT FleetWise github. So I ran demo.sh with the following command.

$ ./demo.sh --vehicle-name vehicle-obd --campaign-file campaign-obd-heartbeat.json --region eu-central-1 --enable-s3-upload

I checked Timestream and S3 but I saw that no data was saved. My cansim@0.service log is as follows. ubuntu@ip-172-31-14-122:~/dist$ sudo journalctl -fu cansim@0.service --output=cat 2024-03-12 10:55:34.092813 Set THROTTLE_POSITION to 300 2024-03-12 10:55:34.092820 Set ECM_DTC1 to True 2024-03-12 10:55:39.097906 Set EngineTorque to 700 2024-03-12 10:55:39.598516 Set BrakePedalPressure to 1400 2024-03-12 10:55:39.598552 Set ENGINE_SPEED to 1800 2024-03-12 10:55:39.598560 Set VEHICLE_SPEED to 80 2024-03-12 10:55:39.598564 Set FUEL_TANK_LEVEL to 92 2024-03-12 10:55:39.598568 Set AMBIENT_AIR_TEMPERATURE to 28 2024-03-12 10:55:39.598572 Set ENGINE_COOLANT_TEMPERATURE to 88 2024-03-12 10:55:39.598576 Set THROTTLE_POSITION to 0

My fwe@0.service log is as follows.. The trigger for Campaign: arn:aws:iotfleetwise:eu-central-1:799856212300:campaign/vehicle-obd-80cbf4b8-campaign activated eventID: 1242325868 but no data is available to ingest

Please help me. I'm always indebted to you.

mzhyo
asked 2 months ago134 views
1 Answer
0
Accepted Answer

It seems the data is not being saved to S3 or Timestream as expected when running the demo.sh script.

  • Verify the IAM role used has the necessary permissions to write to S3 and Timestream in the specified region.
  • Check that the S3 bucket and Timestream database specified in the campaign file exist and the region matches where the script is run.
  • Review the logs for any errors when the SDK attempts to write to S3 or Timestream. Invalid credentials, missing resources etc could cause failures.
  • As a test, try saving a simple test object/record manually using the AWS CLI or SDK to check connectivity to the resources.
aws s3 cp test.txt s3://bucket/path/
aws timestream write-records --database-name db --records file://records.json
  • Compare the data format and names used in the script versus what Timestream and S3 expect. Make sure fields line up properly.
profile picture
EXPERT
answered 2 months ago
  • Thank you for your kind answer! I used <campaign-break-event.json> collection rule to create and deploy e a campaign to save to s3 together. However, I found that [Vehicle.ECM.DemoEngineTorque] and [Vehicle.ABS.DemoBrakePedalPressure] data were saved really well in s3! Also, when I checked the IAM credentials, they were all authorized as AdministratorAccess! What did I miss? I guess OBD data is a problem. Is there any other log to see OBD data occurring other than cansim@0.service? I would like to know the answer! Thank you always!

  • Thank you. After troubleshooting, I had to modify some variable values in the config.json file from 0 to 1. The variable values to change are as follows: obdInterface:pidRequestIntervalSeconds or obdInterface:dtcRequestIntervalSeconds. Thank you for your kind reply.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions