Home Forums Articles How To's FAQ Register
Go Back   Xoutpost.com > BMW SAV Forums > X5 (E53) Forum
Fluid Motor Union
User Name
Password
Member List Premier Membership Search Today's Posts Mark Forums Read

Xoutpost server transfer and maintenance is occurring....
Xoutpost is currently undergoing a planned server migration.... stay tuned for new developments.... sincerely, the management


Reply
 
LinkBack Thread Tools Display Modes
  #51  
Old 10-03-2021, 06:11 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
I think I actually have 2 different CAN bus modules that I was going to try with the Arduino but never did. This thread is renewing my interest a bit. My plan was going to be to put an Arduino in the E-box and maybe at the fuel tank to gather information that isn't available on the bus and another on the dash to run the display all linked with a RS-485 bus. I chose RS-485 partly because it seemed to very robust and good for longer distances and other projects I have and didn't know much about CAN. I have everything working (the RS485 with my own data packets and error detection) but haven't put everything together.

If you like electronic projects the DSO138 scope kit (about $15-$30) is pretty cool for the money and is more than adequate for checking most automotive stuff including CAN bus.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)

Last edited by 80stech; 10-03-2021 at 06:25 PM. Reason: add
Reply With Quote

Sponsored Links

  #52  
Old 10-08-2021, 02:44 PM
Member
 
Join Date: Feb 2019
Location: Caroline County, MD
Posts: 225
lkv0315 is on a distinguished road
Quote:
Originally Posted by 80stech View Post
I think I actually have 2 different CAN bus modules that I was going to try with the Arduino but never did. This thread is renewing my interest a bit. My plan was going to be to put an Arduino in the E-box and maybe at the fuel tank to gather information that isn't available on the bus and another on the dash to run the display all linked with a RS-485 bus. I chose RS-485 partly because it seemed to very robust and good for longer distances and other projects I have and didn't know much about CAN. I have everything working (the RS485 with my own data packets and error detection) but haven't put everything together.

If you like electronic projects the DSO138 scope kit (about $15-$30) is pretty cool for the money and is more than adequate for checking most automotive stuff including CAN bus.
well, maybe with this improved and refined knowledge we can tackle this issue together and see if we can finally make something work
__________________
2005 X5 E53, 167k Miles: Kenwood DNX893S Head Unit, Mud Flaps (Rear Only) , Rim Shopping(WIP), Full Spectrum RGB Halos,
Reply With Quote
  #53  
Old 10-08-2021, 03:53 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
Have you checked the source code for comments and clues? I'm guessing this is on GitHub? have you posted questions there? As far as the hardware goes you are working blind without a scope or at least a logic analyzer. Have you tried to see if you can use the Pi as a logic analyzer bypassing the CAN bus shield/hat?
Have you tried disconnecting the terminating resistor as suggested? (My CAN bus module appears to have jumpered pull-ups.) Did you check into the grounding?
If your CAN module is fully isolated it will need both power and ground from the vehicle on the input side.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)

Last edited by 80stech; 10-08-2021 at 11:25 PM. Reason: add
Reply With Quote
  #54  
Old 10-09-2021, 03:20 PM
Member
 
Join Date: Feb 2019
Location: Caroline County, MD
Posts: 225
lkv0315 is on a distinguished road
Quote:
Originally Posted by 80stech View Post
Have you checked the source code for comments and clues? I'm guessing this is on GitHub? have you posted questions there? As far as the hardware goes you are working blind without a scope or at least a logic analyzer. Have you tried to see if you can use the Pi as a logic analyzer bypassing the CAN bus shield/hat?

Have you tried disconnecting the terminating resistor as suggested? (My CAN bus module appears to have jumpered pull-ups.) Did you check into the grounding?

If your CAN module is fully isolated it will need both power and ground from the vehicle on the input side.


So the project is on GitHub, and Iíve been communicating with the devs and other users on their slack for quite some time now. Theyíve been helpful but nothing has made much progress. They believe the bus traffic may be encrypted.
I will look into the logic analyzer question in a little bit, but if itís possible I will give it a try.
The pi is powered by the cigarette lighter outlet, so the ground and hot pins have direct continuity to the vehicle battery ground/power.
In response to the resistor question, I actually returned the original can module and switched it out for a 2 channel which also has a jumper for the termination resistor, which I have tried both on and off.
This is turning into one of those projects that Iím in way over my head and itís starting to bother me that I canít make progress. I guess the logic analyzer is the next best step.
Even the repair manual contains little to no info on the actual speeds/configuration of the can bus, besides telling me what itís hooked up to on which pins.


Sent from my iPhone using Xoutpost.com
__________________
2005 X5 E53, 167k Miles: Kenwood DNX893S Head Unit, Mud Flaps (Rear Only) , Rim Shopping(WIP), Full Spectrum RGB Halos,
Reply With Quote
  #55  
Old 10-09-2021, 04:03 PM
Member
 
Join Date: Jul 2020
Location: CA
Posts: 25
gpeterson is on a distinguished road
Quote:
Originally Posted by lkv0315 View Post
They believe the bus traffic may be encrypted
It is absolutely not encrypted. If if the message payload were you would still see CAN messages if your hardware/software were functioning properly.
Reply With Quote
  #56  
Old 10-09-2021, 04:55 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
RE the isolation: If isolated the CAN module will need power and ground (depending on the level of isolation) on the data input side SEPERATE from the Pi supply. Yes it could be coming from the same place but the makers of the module don't know how you are going to use it. I also noticed that the CAN module has it's own crystal so it will be limited to only certain data rates that can be derived from the crystal which might not match up with the BMW data rate. Just putting that out there as a possibility.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)
Reply With Quote
  #57  
Old 10-09-2021, 07:56 PM
Overboost's Avatar
//Binary is in my DNA
 
Join Date: Apr 2006
Location: Huntersville, NC
Posts: 3,189
Overboost is on a distinguished road
BMW and almost every street car CAN bus baud rate is 500k. Work with that as default.
Reply With Quote
  #58  
Old 10-09-2021, 08:57 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
500k is pretty fast! I tested my RS485 setup up to 512k and was error free (I was totally blown away that it could go that fast!) I didn't even try faster because I thought that was already ridiculous and about 100x faster than I would really need. Looking at the CAN bus protocol though there is a huge amount of bits around each packet so will need at least 3 times the speed to move the same data as what I'm doing with the RS485 bus. For sure good to know though and you would think if 500k is pretty universal for automotive the CAN bus module and software would be set up for that.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)

Last edited by 80stech; 10-09-2021 at 08:58 PM. Reason: spelling
Reply With Quote
  #59  
Old 10-09-2021, 09:11 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
Haha! I had just had a look at my CAN module and it has a 8,000 mhz crystal so a divide by 16 counter would give exactly 500k so that all makes sense as does the reason for the crystal in the first place since 500k is not normally dividable from most processor clocks I'm thinking.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)
Reply With Quote
  #60  
Old 10-10-2021, 03:01 PM
Member
 
Join Date: Mar 2016
Location: Saskatchewan Canada
Posts: 1,282
80stech is on a distinguished road
@ikv0315 maybe try setting the address filter for a specific piece of data. Polling for anything probably won't return anything if the filter is exclusive to everything it's not set to. Makes sense in a way because there is no way you can display scrolling data fast enough. If you can get into the source code and set a "data capture" to a buffer for set time or number of frames and then display the buffer it might help to see what's going on.

There also seems to 2 different bit frame lengths, 11 and 29, so that might be something to look into.

Keep the wiring short and twisted pair. BTW How are you tapping in to the wires?

Also maybe make sure you have the right identifiers for the CAN bus you are working with. AFAIK the other diagnostic and communication lines are Can buses(use CAN protocol) as well and probably use different identifiers.
__________________
1988 325is (purchased new)
2004 X5 3.0 (new to me) 2005 X3 2.5 (new to wife)

Last edited by 80stech; 10-12-2021 at 09:21 AM. Reason: add
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 05:13 AM.
vBulletin, Copyright 2021, Jelsoft Enterprises Ltd. SEO by vBSEO 3.6.0
© 2017 Xoutpost.com. All rights reserved. Xoutpost.com is a private enthusiast site not associated with BMW AG.
The BMW name, marks, M stripe logo, and Roundel logo as well as X3, X5 and X6 designations used in the pages of this Web Site are the property of BMW AG.
This web site is not sponsored or affiliated in any way with BMW AG or any of its subsidiaries.