Volvo Community Forum. The Forums of the Volvo Owners Club

Forum Rules Volvo Owners Club About VOC Volvo Gallery Links Volvo History Volvo Press
Go Back   Volvo Owners Club Forum > "General Topics" > General Volvo and Motoring Discussions
Register Members Cars Help Calendar Extra Stuff

Notices

General Volvo and Motoring Discussions This forum is for messages of a general nature about Volvos that are not covered by other forums and other motoring related matters of interest. Users will need to register to post/reply.

Information
  • VOC Members: There is no login facility using your VOC membership number or the details from page 3 of the club magazine. You need to register in the normal way
  • AOL Customers: Make sure you check the 'Remember me' check box otherwise the AOL system may log you out during the session. This is a known issue with AOL.
  • AOL, Yahoo and Plus.net users. Forum owners such as us are finding that AOL, Yahoo and Plus.net are blocking a lot of email generated from forums. This may mean your registration activation and other emails will not get to you, or they may appear in your spam mailbox

Thread Informations

car computer- feasibility, functions

Views : 3879

Replies : 53

Users Viewing This Thread :  

Reply
 
Thread Tools Display Modes
Old Jul 15th, 2019, 10:03   #31
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

MENU button- selection which display is the knob assigned to (centre/HUD)
CD button- active display to switch to OBD readout (torque)
RADIO- active screen to switch to media center
TEL- active screen to switch to home desktop OR telephone function (if developed)
NAV- active screen to switch to SatNav
BACK- self-explanatory
OPTION- bring up context menu for highlighted option (equivalent to right-click in windows)

knob rotation- scrolling trough options on active screen
knob press DOWN- selecting the option

Joystick UP/DOWN/LEFT/RIGHT- to be assigned at later stage


Quote:


4 pin connector:
1 - Red (12V)
2 - Brown/Black (GND)
3 - Orange( CAN)
4 - Orange( CAN)


10 pin connector (used from y2009 to September 2011)
1 - Red/Yellow (12V)
2 - Brown/Black (GND)
3 - Orange (CAN)
4 - Green( CAN)
5 - White/Black( PDC button)
6 - White/Blue(PDC button)
7 - NC
8 - NC
9 - NC
10 - NC
Quote:
Usually CAN-devices isn't just acting as slave devices, so your unit may need some init-messages to start spewing out CAN-frames.
Quote:
CAN BUS :: General hardware setup
A Controller Area Network consists of a loop, in fact the two lines (CAN High and CAN Low) are "terminated".
If you imagine the CAN "bus" being a railway, it's two lines being CANH and CANL, at the both ends of the rail, the lines are connected! That is with resistors (120 Ohm resistors are defined as standard).
Also, the two lines of the "railway" are twisted together.
Any node can be hooked at any point of the rail (paying attention to connecting the pins correctly to the CANH or CANL line), as long as it's between the two ends of the "railway".

CAN BUS :: In a car
A vehicle has a bunch of individual CAN busses. Usually when people talk CAN, they mean OBD-II (which is the OnBoard Diagnostics port that is mandatory on all vehicles commercialised since 2001 worldwide). The OBD port is a particular port and not interesting to me right now... anyway a quick search will lead to finding out it runs at 500kbps.

BMW :: K-CAN
In modern BMW's the K-CAN is the network on which most interior accessories are running, such as windows, lights, and the CIC (the infotainment system). This bus runs at 100kbps, which is usually not defined in Arduino CAN libraries.
I don't know the logic behind the value specified below, I know it relates to crystal timers, bit clocking etch... suffice to say you will need to add a line similar to this to enable popular CAN libraries to work on the K-CAN:
Code: [Select]

#define CANSPEED_100 9 // 100 Kbps


This goes next to where other speeds are defined..
Code: [Select]

7 = 125 Kbps
3 = 250 Kbps
1 = 500 Kbps



BMW :: CIC Controller (iDrive 2.0 rotary controller)
The BMW part number 6582 9267955-01 refers to the latest iDrive knob (in this case featuring Media, Radio, Tel, Nav, Menu, Back and Option buttons, on top of the knob which has a rotary encoder with integrated 4-way joystick with tilt mechanism and a push button).
This device has a 4-pin connector with the following pinout (pins are numbered inside the connector!):
Code: [Select]

1 VIN (+12V)
2 GND
3 CANH
4 CANL



I am now in the process of finding out how to set up a sniffer with the CAN-bus shield... basically listening to anything going on, on the bus.
I have to admit that up to now I simply haven't been able to do ANYTHING with the CAN-bus shield. I've been trying each and every popular and less popular libraries around. Unfortunately they all seem to be designed to work specifically with the OBD port.
I also have to understand if the iDrive knob device needs to be initialised somehow, or if it simply starts sending messages when a user interacts with its physical sensors. For that I need to sniff the network.
Quote:
The bus’ physical layer is an open collector setup – pulled high (+12v) by the bus and pulled low by the talker. This means that the normal voltage on the wire while the bus is idle is +12V (the battery voltage, or Vbatt). A bit is transmitted by pulling low or shorting the bus with the ground momentarily. This is the reverse of many digital signals where the normal voltage is 0V and is raised high (Vmax which in this case is Vbatt or +12v) to send a bit.

Serial communications on the bus are 9.6Kbps, 8 data bits, Even parity, and 1 stop bit. (9600, 8E1).

Any device can start sending when the bus is idle, but if it discovers that the line is pulled low without doing it itself, it has to abort. The I/K-Bus is always active when terminal R (Ignition) is switched on. If the bus line is quiet for more than 60 seconds, all of the control modules will go into Sleep Mode.

Control units that provide the I/K-Bus operating voltage (Master controllers) are:
On E38 and E39/E53 High version vehicles:
• The LCM is the Main (master) Controller of the I-Bus. The IKE and MID/BMBT are Stand-by Controllers.
• The GM is the Main (master) Controller of the K-Bus.
• The IKE is the bus “gateway”

On E46, E52 and E39/E53 Base version vehicles:
• The GM is the Master Controller for vehicles equipped with only the K-Bus.
• The LCM/LSZ is the Stand-by Controller.

Each module on the I/K-Bus is informed by a message from the Master Controller as to the ready status of all of the other connected modules. The modules polled are according to the coding of the Master Controller. Every 30 seconds after Terminal R is switched on, each module on the bus line is polled.

I/K-Bus Packet Structure:

The information sent over the bus is configured serially. Each message consists of:
1. Transmitter address (8 bit Source ID)
2. Length of data (number of following message bytes)
3. Receiver address (8 bit Destination ID)
4. Detailed description of message (maximum 32 bytes of data)
5. Summary of transmitted information (check sum)

The XOR checksum byte is used to check the integrity of the message. The receiver will compare that value with its own computation, and if not equal, will reject the packet.
Attached Images
File Type: jpg CIC-I-Drive-Controller-800x800.jpg (70.2 KB, 2 views)
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles

Last edited by ThomasG; Jul 15th, 2019 at 10:58.
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 11:40   #32
SwissXC90
Premier Member
 

Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
Default

I have successfully read and decoded can bus on a Volvo and ibus on a bmw.

Compared to can bus, ibus is trivial.
Dealing with high speed can data is not easy.

Can bus is a real challenge to emulate an existing device when you have no lab environment and have to reverse engineer everything.

Your project is sounding like a mega project that requires a team of >10 people with different disciplines and experience to make it successful.

The devil lies in the detail. And some of the detail is difficult. Really difficult.
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65.
SwissXC90 is offline   Reply With Quote
Old Jul 15th, 2019, 11:57   #33
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

Yes, I`m aware of that..
Thats why in my pretty much first post i said that it may take me years, and it is even possible that i`ll never get it done..

Yet i`m this deep- i can as well plod on until i get really really stuck.

in the worst case- i will learn new things, and that is valuable by itself.

----------------------------------------------------

bit more technical

it is only a sketch of an idea, but the way i understand it now:

for connecting that knob i will need to provide +12V onVin pin, 0V on GND pin
and then most of descriptions i`ve read by now describes communication as "one wire"
but connector is 4 pin, take out Vin and GND that still leaves 2 pins for data transmission.

i need to catch up on canbus and i-bus, i think i`m missing something here

but if i`m not- and only one of the pins is used to transmit/listen (i can assume this knob will be capable of listening to the bus as well, to accomodate backlight changes)
and it is high level for "0" low level for "1"

then i will need to provide +12V onto that line, but trough some resistor, carefully choosen as to allow the knob to pull the line to "low" state (that is- resistor not allowing too much current that might saturate the line)

then its a separate matter of logging data stream

i think it is safe to assume that the line will remain "silent" (that is 12V) until one or other button is pressed- then i would expect around 56bits of data transferred (8bit adress, 8 bit lenght, 32 bit message 8 bit checksum)

this by itself may take me well into christmas..
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 12:08   #34
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

or just get one, strip it for electronics, and solder in a simple rotary encoder plus several bolean inputs onto usb bridge..
-----------------------------------------------------

even easier- get one of these and strip for electronics
it has scroll wheel (knob rotating)
it has mcro joustick on top (knob as a joystick)
and several buttons that can be re-assigned

drivers already exist, Bobs the uncle

Attached Images
File Type: jpg 98935391_68739976.jpg (23.2 KB, 2 views)
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles

Last edited by ThomasG; Jul 15th, 2019 at 12:19.
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 13:25   #35
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

donor found

requirements:
scroll wheel
non-potentiometer based joystick
at least 8 buttons

https://www.ebay.co.uk/itm/Microsoft...cAAOSwVh9cfVOp

-------------------------------------------------------------

even better:

http://www.leobodnar.com/shop/index....roducts_id=204


and that would pretty much close the section of making sure that the bmw knob will work..

as a bounus- it has 8 analog inputs that i could use for light sensors for example

next:

to use my proper (not the work one) laptop with virtual box, external screen (not touch just yet) and see how is it managing 3 instances of android each running own, sometimes resource-heavy, stuff.

and trying to figure out how o forward controls into these emulated droids
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles

Last edited by ThomasG; Jul 15th, 2019 at 15:56.
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 20:39   #36
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

That's just not going to work you know...

OK, I can make that knob from BMW behave like a dial selector with buttons on USB, mimicking joystick or another game controller..

I could get it to work under Linux.
Others managed, so why wouldn't i?

But to forward it into virtual machine running android AND figure out a way of switching that control between virtual machines and Linux itself...

That.

That may be a bit too much.

On the other hand..

That IoT idea from paddy, the one with several Pis and HA to keep them all lined up.

That may still work.

One of pis running xbian
Another android
And third android
And then fourth some version of Linux with HA (or similar ) on it..

Each having its own HDMI output, I would simply need a 4X2 HDMI matrix switch.
And in pararell to that- 4hostX1device USB sharing switch.

Get HA to switch these accordingly.

That is- 4hdmi sources available to display 1
(Together with touchscreen capability switching in line with HDMI)

4hdmi sources available for display 2(HUD)
(Figure out how to painlessly invert the picture, to be reflected in windscreen)

And separately- USB sharing switch with only 2 options

To either connect USB device to that Pi that uses display 1 at given moment.

Or to connect it to the one that uses display 2.

There will be no issue of forwarding USB signals into any virtual machine, as there will be none.

There may be lag on USB activity, though- each time knob is reassigned, that Pi will have to recognise USB device anew (or not?)

And then what..

Voice + touch control for satnav?
Knob + touch control for Xbian?
Touch control for torque...


-----------

I still think that if there is a will, there is a way!
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 20:47   #37
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

Or maybe use 4 of rasp Pi-4B, these have 2 HDMI outputs each..

Use mirroring for both HDMI outputs on each, quite literally "mirroring" as the one on HDMI 2 will need to be inverted.

And then, instead of 4X2 matrix, use 2 independent 4X1 switches.

First switch "gathers" all HDMI1 outputs from all 4 units and chucks that onto touchscreen
Second switch "gathers " HDMI2 from all 4 and throws them onto HUD display..

Yet one more!

No HDMI1 used at all!
Instead, to use rasp dedicated touch panel and figure out a way if switching that between 4 units!

HDMI 2 still inverted and still on a switch.
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles
ThomasG is offline   Reply With Quote
Old Jul 15th, 2019, 21:01   #38
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

Paddy74!

You, sir, are a genius!
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles
ThomasG is offline   Reply With Quote
Old Jul 17th, 2019, 11:53   #39
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

Change of approach.

It was one big and rather stupid mistake to try to do it all at once.

One step at a time then.
Just like I did with my previous (and my first at the same time) system (TV with common interface to all possible/accessible media services)

Step 1:

Get a tablet (GPS equipped, luckily I do have one)
And do following:

Fit it as HUD, check position etc, try to use it as either GPS satnav or OBD readout in that position.

Try and find out how to map HID device (mouse, keyboard, joystick etc) into android.

Establish possibility of changing key maps, that is- if for example joystick button 1 is pressed, it will be recognised as space bar of keyboard.

Establish will it be possible to assign keyboard key to bring up menu of Torque.
Establish will it be possible to assign keyboard key to be recognised as OK (single click of highlighted option)
Establish will it be possible to map scroll wheel of given HID device to scroll trough options.

With maps, establish will it be possible to assign a keyboard key to bring munu selection, and separate key to bring up "search" function.

Again, scroll wheel to go trough menu or "recently searched" options, OK to make selection.

This I think as 2 separate tablets, or, as I actually intend to do- make tablet to work in described way with torque, make notes, erase and try to do it again with satnav, using same tablet.

Then third run with media center.
Maybe android tablet still, or maybe by then I will be using raspberry Pi or something yet different.


And only when all that is ready and tested, only then try to aggregate it into one device ir system of devices.
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles
ThomasG is offline   Reply With Quote
Old Jul 17th, 2019, 16:06   #40
ThomasG
Aka MadBabs
 

Last Online: Nov 11th, 2022 15:29
Join Date: Sep 2017
Location: London
Default

Has anyone got photos of what exactly sits behind dash/clocks on P2 and P3 V70, please?
__________________
`03 V70 Mk2 Auto 2.4 B5244 NA, 170Bhp, 295K miles
(Now parts donor)
'05 XC70 MK2 Geartronic, 2.5 B5254T2, 210bhp, 129k miles

Last edited by ThomasG; Jul 17th, 2019 at 16:45.
ThomasG is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

Forum Jump


All times are GMT +1. The time now is 01:43.


Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.