Go to advanced search

by marcellatwin
Sun Oct 13, 2019 10:26 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

So a quick update: The project has taken another turn. After my internship with Volvo Group where I made a lot of changes, the program is essentially broken. I've narrowed it down to a possible curses.h library issue and a file-descriptor issue for the CAN socket connection. One of the biggest turns...
by marcellatwin
Sun Oct 13, 2019 9:44 pm
Forum: C/C++
Topic: Trouble with GCC compiling
Replies: 10
Views: 1969

Re: Trouble with GCC compiling

Thanks for all the advice everyone. The project has taken a turn towards another direction. I'm now combining this project with a school project and converting it to a C++ program. So I will revisit the library and compiling and make files later once I figure out what the project needs. But thanks a...
by marcellatwin
Mon Jun 17, 2019 6:46 pm
Forum: Other programming languages
Topic: Issues comparing arguments of bash script
Replies: 2
Views: 851

Re: Issues comparing arguments of bash script

Thanks. Yeah so I just couldn't get it to work with the ( ) and using a more readable code like <=. So I went with your method of [ ] and the options of -gt -lt. It now works. Thanks again.
by marcellatwin
Sat Jun 15, 2019 10:02 pm
Forum: Other programming languages
Topic: Issues comparing arguments of bash script
Replies: 2
Views: 851

Issues comparing arguments of bash script

So I have a script that connects to the CAN bus with a single argument of the bus' baud rate. So I have the code below that first checks for an argument, which works just fine. # Check if argument is present if (( "$#" == 0 )); then printf "\n Input Bitrate\n\n" # Check if argument is within range e...
by marcellatwin
Fri Jun 07, 2019 3:54 pm
Forum: C/C++
Topic: Trouble with GCC compiling
Replies: 10
Views: 1969

Re: Trouble with GCC compiling

Now I'm on a machine which has the can-utils installed on it so I can see how it is supposed to be working. ~/CAN/linux-can-utils$ ls -l lib* -rw-r--r-- 1 petero petero 11770 Mar 15 2015 lib.c -rw-r--r-- 1 petero petero 5800 Mar 15 2015 lib.h -rw-r--r-- 1 petero petero 10400 Mar 15 2015 lib.o So th...
by marcellatwin
Thu Jun 06, 2019 8:08 pm
Forum: C/C++
Topic: Trouble with GCC compiling
Replies: 10
Views: 1969

Re: Trouble with GCC compiling

Where did you get the compile options from ? PeterO gcc -Wall -Wextra -O3 /home/pi/jc_volvo.c -lwiringPi -lcurses -lpthread -I/home/pi/linux-can-util -llib -o /home/pi/jc_volvo -Wall - is all the compiler warnings turned on, these aren't errors but warnings -Wextra - extra compiler warnings that ar...
by marcellatwin
Thu Jun 06, 2019 7:11 pm
Forum: C/C++
Topic: Trouble with GCC compiling
Replies: 10
Views: 1969

Re: Trouble with GCC compiling

Should that be -Llib (note the first L is a capital) PeterO So I tried that, even though I didn't think it would work cause all the other libraries included in the compilation are -l "lowercase". Why would this one be different? So I did that and got the following error: /tmp/ccqdvsBH.o: In functio...
by marcellatwin
Thu Jun 06, 2019 6:33 pm
Forum: C/C++
Topic: Trouble with GCC compiling
Replies: 10
Views: 1969

Trouble with GCC compiling

Hello everyone. I am working on a CAN bus project using a RPi 3B with Raspian Stretch (9.9). It has a CAN shield, PiCan2, to connect to the CAN bus thru an OBD2 port on a car. I have a custom program built from code provided by the linux-can-utils which has programs such as candump, cansniffer, cans...
by marcellatwin
Thu Jun 06, 2019 11:58 am
Forum: C/C++
Topic: Can via C/C++ on Rasp Pi3
Replies: 6
Views: 2263

Re: Can via C/C++ on Rasp Pi3

Not to resurrect an old thread, but in searching for a different but similar issue I came across this. Are you still having issues "reading" can bus messages? Cause I can totally help with that.
by marcellatwin
Wed Jun 05, 2019 8:27 pm
Forum: Raspbian
Topic: Can't Compile Any More! Please need help!
Replies: 10
Views: 1218

Re: Can't Compile Any More! Please need help!

Most of us are in the same situation. It's not like we're going to take a class to learn how to use RPi's. As with most things related to computers or programing, there's more than one way to accomplish a task. That makes me feel a little better. I actually thought most people were more academicall...
by marcellatwin
Wed May 29, 2019 5:48 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

So I finally have time to update. So yes, as per my last post, I found the Vtec CAN message. I found it by having my wife video tape the cansniffer program and I drove between 4500 and 5200 rpm in 3rd gear for about 15 miles saying out loud ON, OFF, ON, OFF each time we went in and out of vtec. I th...
by marcellatwin
Sun May 26, 2019 4:08 pm
Forum: Raspbian
Topic: Can't Compile Any More! Please need help!
Replies: 10
Views: 1218

Re: Can't Compile Any More! Please need help!

Upgrading (in place) a system to Stretch is an iffy process. When I tried it, last year, I encountered all sorts of issues. The usual recommendation is to burn the latest version of Stretch to a new SD card and then reconfigure it to your taste. The time that this takes is (for most people) well wo...
by marcellatwin
Sat May 25, 2019 3:09 am
Forum: Raspbian
Topic: Can't Compile Any More! Please need help!
Replies: 10
Views: 1218

Re: Can't Compile Any More! Please need help!

So going off your advice I did the following: sudo apt purge binutils sudo apt install binutils Which seemed to get ride of gcc entirely, both versions. Could you tell me briefly what is binutils, or what it contains? I then did: sudo apt autoremove sudo apt install gcc ... gcc version 6.3.0 2017051...
by marcellatwin
Sat May 25, 2019 12:34 am
Forum: Raspbian
Topic: Can't Compile Any More! Please need help!
Replies: 10
Views: 1218

Can't Compile Any More! Please need help!

Hello there. I hope you guys can help me cause I am pulling my hair out trying to figure this out. I keep getting a Segmentation fault when I compile. Here is the error: collect2: error: ld terminated with signal 11 [Segmentation fault] So some context... I'm running a Raspberry Pi 3B with Debian St...
by marcellatwin
Wed May 22, 2019 4:20 am
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

So a bit of an update. I FOUND IT!!! I FINALLY F&^%ING FOUND IT!!! The VTEC activation CAN frame!!! The CAN ID is 0x320 and it's byte 1 (second byte). The first hex digit of that byte is 0 when VTEC is OFF (RPMS < 5,000), then changes to 4 when VTEC is ON (> 5,000). Man it was difficult. So I should...
by marcellatwin
Wed May 22, 2019 4:12 am
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

rpdom wrote: As they are a byte, I suspect they are returning an unsigned value between 0 and 255. Subtract 40 from that will give you a temperature range of -40°C to +215°C.
That makes perfect sense. Thanks. I'll add that to the code.
by marcellatwin
Tue Apr 02, 2019 5:52 am
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

Hello everyone. I apologize for not updating sooner. I have entered into my final year of my engineering degree and as such my senior capstone project. It has taken over my life and I have not had any time to work on this at all. Good thing thou is one of the classes I'm taking is Microprocessors + ...
by marcellatwin
Fri Aug 31, 2018 3:31 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

Another update. Made a ton of progress, at least in my opinion. I finally got rid of the flickering issue. I really researched the curses.h library and found what I needed. Now the program displays more than twice the data and doesn't flickers a smidge. I've also found what was wrong with my scaling...
by marcellatwin
Sun Aug 26, 2018 6:10 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

So for an update. I finally got my own program to connect to the CAN bus and started reading in just the CAN IDs that I know, convert them to decimals by combining the bytes together, scale them to numbers we understand, and output them to the screen to see if I decoded them correctly. For the most ...
by marcellatwin
Sun Aug 26, 2018 3:36 am
Forum: Beginners
Topic: CanBus can_frame address help
Replies: 2
Views: 485

Re: CanBus can_frame address help

Thank you for getting back to me. So I did finally figure it out. I found some code online, Wikipedia - SocketCAN, and another site that showed similar enough code that I copied it essentially line by line and it worked, I connected to the Socket and the CAN bus. Before I found that I did do what yo...
by marcellatwin
Thu Aug 16, 2018 4:27 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

It finally arrived! The Mini Black Hat Hack3r. Now I can finally connect the breadboard AND the PiCan2 board to the same GPIO on the Pi. Here is some pics showing my new set up: 39294986_1665401383588389_2110536913390665728_n.jpg This is the whole setup. It went from being just 2 boards screwed toge...
by marcellatwin
Wed Aug 15, 2018 7:30 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

For those of you who are car people, this is my motivation: https://www.youtube.com/watch?v=cMGyUm-4v8E That video was the review of the Vtec Climax that I'm replicating with some differences. As stated before, this item is too expensive (over $350) and I want the experience of coding and building t...
by marcellatwin
Wed Aug 15, 2018 4:53 am
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Re: Honda CAN bus Pi Project

Hello again. So there's been some updates. First I answered the question from my last post about the random characters after the CanBus data. I emailed Craig Smith, a "CanBus hacker" who has a YouTube channel and a book about CanBus hacking where I learned how to use the cansniffer program a little ...
by marcellatwin
Tue Aug 14, 2018 8:34 pm
Forum: Beginners
Topic: CanBus can_frame address help
Replies: 2
Views: 485

CanBus can_frame address help

Hello there. I am working on a CanBus project and am trying to make the next step past reading the CanBus with cansniffer and candump and actually doing something with it. For more context, my project is here: https://www.raspberrypi.org/forums/viewtopic.php?f=41&t=220138&p=1351497#p1351497 Right no...
by marcellatwin
Fri Aug 10, 2018 5:27 pm
Forum: Other projects
Topic: Honda CAN bus Pi Project
Replies: 16
Views: 7463

Honda CAN bus Pi Project

Hello everyone. I'm fairly new to the Raspberry Pi, my first small electronics project. I'm also an engineering student. This project is mostly centered around Canbus. And hopefully putting my project up here will help others and help me when I hit a road block. So first a quick overview of my proje...

Go to advanced search