aws / aws-iot-fleetwise-edge

Reference Implementation for AWS IoT FleetWise
https://aws.amazon.com/iot-fleetwise/
Apache License 2.0
61 stars 44 forks source link

[ERROR] [OBDOverCANModule.cpp:360] [autoDetectECUs()]: [Failed to write] #102

Closed Atharva01 closed 1 month ago

Atharva01 commented 1 month ago

Issue: Error When Running AWS IoT FleetWise Campaign on Raspberry Pi

Description

I am trying to implement AWS IoT FleetWise using Raspberry Pi, following the Raspberry Pi Tutorial.

This problem occurs when running the demo.sh script to start the campaign.

Command:

./demo.sh --vehicle-name fwdemo-rpi --campaign-file campaign-obd-heartbeat.json

Screenshot of demo.sh:

Error on development machine

Screenshot of Service Running on Edge Agent:

Service: fwe@0 running on Edge Agent

Data Source

I have used both CANsim and an actual car to feed data into the CANBus of the Raspberry Pi, but the result is the same in both cases. (https://github.com/aws/aws-iot-fleetwise-edge/tree/main/tools/cansim)

Expected Behavior

The campaign should start successfully and collect data without errors.

nenadilic84 commented 1 month ago

Hi @Atharva01, thanks for creating the issue. It seems that you might have an issue with the CAN setup. Can you verify if the CAN interface is up and that your providing the right interface to the provisioning script as well.

I assume you are using the CAN Bus Expansion HAT, if so there was a comment in one of the closed issues on how to test it: https://github.com/aws/aws-iot-fleetwise-edge/issues/100#issuecomment-2360562412

Let me know if this helps

Atharva01 commented 1 month ago

Hello @nenadilic84 , thanks for sharing #100, I am using the same CAN Bus Expansion hat as per the instructions in the repo. I will follow the steps mentioned in previously resolved issue, you shared.

Atharva01 commented 1 month ago

Hi @nenadilic84, I followed #100 and data is populated in TimeStream Database as well as in the JSON file under collected-data folder. Looking at the messages generated by the cansim script, CAN Messages are 11 bits long. Does AWS FWE only supports 11 bits CAN Message or it can extend support to 29 bit CAN Messages as well? I replayed the stored CAN Messages from a car on can0 and ran the demo script and same error occurred.

nenadilic84 commented 1 month ago

The 29-bit is supported. Take a look here. Make sure that the decoder manifest and the signal catalog is aligned with the signals you have on the CAN.

Otherwise it would be great if you can share additional logs.

nenadilic84 commented 1 month ago

@Atharva01 any news on this? Should we close the issue?

Atharva01 commented 1 month ago

@nenadilic84 please close this issue.