Challenge

Project 1

Que.Using what you’ve learned in your hands-on labs, write a program that logs CAN data from one or more CAN buses.

1. CAN messages (from any bus) should be sorted into logs of even ARB ID messages and odd ARB ID messages

2. Even logs should be stored in a Linux Directory called “Even Logs” and odd logs should be stored in a Linux Directory called “Odd Logs”

3. Individual log files should only store up to 1000 messages

4. The program should run indefinitely until manually stopped

Solution:

Give command to add virtual interface (vcan0):

1. CAN messages (from any bus) should be sorted into logs of even ARB ID messages and odd ARB ID messages

1.1. Can messages sorted into Even ARB ID messages using cangen and candump command.

1.2. Can messages sorted into Odd ARB ID messages using cangen and candump command.

2. Even logs should be stored in a Linux Directory called “Even Logs” and odd logs should be stored in a Linux Directory called “Odd Logs”

2,1. First make a directory name as Linux. give the command of “mkdir” to make directory to save log files.

2.2: Store Even log in Linux directory

2.3: Store Odd log in Linux directory

3. Individual log files should only store up to 1000 messages

3.1. Can messages generated using cangen and candump command. (only 1000 messages)

3.2: Store 1000 messages in l000_message.log file in Linux directory

4. The program should run indefinitely until manually stopped

4.1. Can messages generated using cangen and candump command.

4.2. Infinite can messages until I stop.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.