For the begging,
I found out that the problem for 2-way is on the libaudio.so, than I downloaded the source code from the github of samsung aries.
I found the file AudioHardware.cpp as the main one.
I googled the web and found a same file with 2-way and there is the code which do that
Code:
//wxj add for voice recorder
#include <errno.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <poll.h>
//wxj add end
Code:
//-------------- wxj add for voice recorder ----------------
#if RECORDER_MOMEM
/*
AT^DAUDREC=<ON/OFF>
<ON/OFF> 0 turn off record
1 turn on record
*/
#define MODEM_RECORD_INCALL_ON "at+audr=1\r"
#define MODEM_RECORD_INCALL_OFF "at+audr=0\r"
//define pty device for send at command
#define AUDIO_AT_PATH "/dev/ttymux4"
#define AUDIO_DATA_PATH "/dev/ttymux4"
#define NUM_ELEMS(a) (sizeof (a) / sizeof (a)[0])
static const char * s_finalResponsesError[] = {
"ERROR",
"+CMS ERROR:",
"+CME ERROR:",
};
/**
* returns 1 if line is a final response indicating success
* See 27.007 annex B
* WARNING: NO CARRIER and others are sometimes unsolicited
*/
static const char * s_finalResponsesSuccess[] = {
"OK",
};
static Mutex audioLockMutex;
static int isFinalResponseError(const char *line)
{
size_t i;
for (i = 0 ; i < NUM_ELEMS(s_finalResponsesError) ; i++) {
if (strcasestr(line, s_finalResponsesError[i])) {
return 1;
}
}
return 0;
}
static int isFinalResponseSuccess(const char *line)
{
size_t i;
for (i = 0 ; i < NUM_ELEMS(s_finalResponsesSuccess) ; i++) {
if (strcasestr(line, s_finalResponsesSuccess[i])) {
return 1;
}
}
return 0;
}
/**
* returns 1 if line is a final response, either error or success
* See 27.007 annex B
* WARNING: NO CARRIER and others are sometimes unsolicited
*/
static int isFinalResponse(const char *line)
{
return isFinalResponseSuccess(line) || isFinalResponseError(line);
}
static int s_fd = -1;
static int WriteATCommand(const char *s)
{
AutoMutex lock(audioLockMutex);
//int s_fd = open(AUDIO_AT_PATH,O_RDWR | O_NONBLOCK);
if ( s_fd < 0 ) {
LOGE(" AudioHardware ERROR OPEN AT interface, errno = %d ,s_fd = %d",errno,s_fd);
return -3;
}
size_t cur = 0;
size_t len = strlen(s);
ssize_t written;
LOGV(" AudioHardware AT> %s\n", s);
/* the main string */
while (cur < len) {
do {
written = write (s_fd, s + cur, len - cur);
} while (written < 0 && errno == EINTR);
if (written < 0) {
LOGE("AudioHardware write str error, errno = %d ",errno);
close(s_fd);
s_fd = 0;
return -1;
}
cur += written;
}
#if 0
/* the \r */
do {
written = write (s_fd, "\r" , 1);
} while ((written < 0 && errno == EINTR));
if (written < 0) {
LOGE(" AudioHardware write r error, errno = %d ",errno);
close(s_fd);
s_fd = 0;
return -1;
}
#endif
const int buf_len = 1024;
int readLen = 0, count = 0;
char* buffer = new char[buf_len];
//buffer[0] = '\0';
memset((void*)buffer, 0, buf_len);
bool final = false;
int tryTimes = 0;
int pollResult = 0;
for(;;){
while (0 == pollResult){
struct pollfd fpolls;
fpolls.fd = s_fd;
fpolls.events = POLLIN;
fpolls.revents = 0;
pollResult = poll(&fpolls, 1, 1000); //timeout 5 seconds
//data ready to be read
if (pollResult > 0 && POLLIN == fpolls.revents ){
LOGD(" AudioHardware data is available %d \n",__LINE__);
break;
}else if (pollResult < 0){
LOGD(" AudioHardware pollResult < 0 %d \n",__LINE__);
if (errno == EINTR){
continue;
}else{
break;
}
}else{
LOGE("timeout, but no data available");
if (tryTimes < 5){
tryTimes++;
}else{
LOGE("timeout, exit this command ");
delete []buffer;
close(s_fd);
s_fd = 0;
return -1;
}
}
}
do {
readLen = read (s_fd, buffer + count, buf_len - count);
} while ((readLen < 0 && errno == EINTR));
if (readLen > 0){
count += readLen;
}
if (isFinalResponse(buffer)){
final = true;
LOGD("at result=%s", buffer);
break;
}
tryTimes++;
if (tryTimes > 5){
break;
}
}
LOGV("AudioHardware AT>%s sucess", s);
delete []buffer;
//close(s_fd);
return 0;
}
#endif
//----------------- wxj add end for voice recorder -----------
I don't have linux or other way to compile the files, and I wish someone with more experience from me will compile it and I'm sure we will fine volunteers to test that.
the full cpp files are attached.
By the way, the lib file will be good even to the other ICS roms which based on samsung aries of CM
would be really cool to have that possibilty in more roms, so thx to come up with that and hopefully some dev has the time and knowledge to do this...
sry that i can't help you myself!
greetz,
sUsH
What model does this AudioHardware relate to? If this is related to MSMxxxx audio hardware, probably this will not work in any way. DEAR DEVELOPERS, can you help to continue this work to finally implement this feature? I think that we can start collecting dotations in order to make everybody involved in this project!!
I wish good luck and say THANKS to OP and all people who is able to help in any way!! I hope that this project will not stop and finally we add this so useful feature to our beloving Galaxy.
I'm afraid it does belong to msm, but even if not, there must be a way based on that, for just changing the code.
I can't find the source again but I think it was belong to defy
it IS definitely possible on our sgs, cause i remember some miui-rom i once flashed and used for a while, and with this rom two-way-call-recording was possible, meaning while in call i could just press the record-button and the call (both the caller and me) got recorded.
don't know if it was some dirty hack but it worked, i recorded plenty of calls with this rom. even automatic call recording was possible, so that everytime i got a call, it got recorded automagically.
if this is of interest, i could search for that specific miui-rom in my rom-archive.
greetz,
sUsH
sUsH667 said:
it IS definitely possible on our sgs, cause i remember some miui-rom i once flashed and used for a while, and with this rom two-way-call-recording was possible, meaning while in call i could just press the record-button and the call (both the caller and me) got recorded.
don't know if it was some dirty hack but it worked, i recorded plenty of calls with this rom. even automatic call recording was possible, so that everytime i got a call, it got recorded automagically.
if this is of interest, i could search for that specific miui-rom in my rom-archive.
greetz,
sUsH
Click to expand...
Click to collapse
Afaik, 2 way recording wasn't implemented on cm7/miui like ever. It was illegal and a dirty hack to.
Sent from my GT-I9000 using xda premium
siky_dude said:
It was illegal and a dirty hack to.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
But remember that not in every country...
hmm, are you sure? i really have that in my mind.
well, i'll look through my rom-history and see which one i think it was, maybe i am wrong...
Rausio said:
But remember that not in every country...
Click to expand...
Click to collapse
Yeah... but if they changed something in the framework to enable recording it would become a upstream change... so everyone living in a legal/illegal country would have this feature... so it was never made as an upstream change.
Still, I never understand people that needed call recording. It's kind of creepy.
Sent from my GT-I9000 using xda premium
siky_dude said:
Yeah... but if they changed something in the framework to enable recording it would become a upstream change... so everyone living in a legal/illegal country would have this feature... so it was never made as an upstream change.
Still, I never understand people that needed call recording. It's kind of creepy.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
it is legal in every country... the issue in USA is that the recorder partner should tell the other side that the conversation is recorded, for example in Israel, just one side should know that the conversation is under recording, to prevent illegal bugging.
and it's not creepy we should record conversation for a lot of reason, even for people who are on ways all time and want to remember the conversation issue, or even when we argument with the cellular/internet providers.
It was working fine on froyo:
http://forum.xda-developers.com/showthread.php?t=967297
And stayed as project on gingerbread:
http://forum.xda-developers.com/showthread.php?t=1089425
Guys, let's stop offtopic discussing how legal is call recording or not, and also is it useful feature or useless; it is being discussed in other threads many times.
And the project on gingerbread trying to modify existing libraries probably ended with no success after trying all possible things, so we have to follow this way meaning developing the missing code, and i think now it is the only right way.
P.S. Probably this code also relates to call recording:
Code:
#if RECORDER_MOMEM
if(devices == AudioSystem::DEVICE_IN_VOICE_CALL) {
LOGV("set begin recording voice ");
mDevices = devices;
mVoiceRecorderFD = ::open(AUDIO_DATA_PATH,O_RDWR | O_NONBLOCK);
int i = 0;
while(mVoiceRecorderFD < 0) {
i++;
LOGV("AudioStreamInALSA::set i = %d ",i);
usleep(5000);
mVoiceRecorderFD = ::open(AUDIO_DATA_PATH,O_RDWR | O_NONBLOCK);
if(i > 20) {
LOGE(" AudioStreamInALSA::setDevice open muxaudio failure ",i);
return NO_INIT;
}
}
s_fd = mVoiceRecorderFD;
WriteATCommand(MODEM_RECORD_INCALL_ON);
return NO_ERROR;
}
#endif
l2tp, the code you brought here, seems to be related to ALSA (our galaxy) and is not related to the one I brought.
It's seems to be better chance.
Hey guys, did anybody try to do something on this?
Let's not give up!
siky_dude said:
Yeah... but if they changed something in the framework to enable recording it would become a upstream change... so everyone living in a legal/illegal country would have this feature... so it was never made as an upstream change.
Still, I never understand people that needed call recording. It's kind of creepy.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
Disabling camera shutter sound is also illegal for some countries. But you can disable it on Cyanogenmod settings. It just warns you about legality.
I have the coding skills but not the time to fully do this. I just thought I'd post and offer to assist if anyone wants to lead the project.
Plz do not give up!!
l2tp said:
Hey guys, did anybody try to do something on this?
Let's not give up!
Click to expand...
Click to collapse
I have also been waiting for this ever since I lost the feature after moving from Froyo to GB. :crying: It was a wonderful feature which eradicated the need for keeping a pen and paper ready for long office conference calls, specially when on the road. I was using some automatic recording script with customizable file naming convention and was in bliss!
In terms of legality, please let's keep that out of the equation as already pointed out with the camera shutter analogy. :silly:
The way I saw it, the legality thing was brought into picture by the MIUI 'porting' teams after the Froyo -> GB upgrade and instead of trying to 'fix' it, the questionable legality argument got presented.
Frankly, since the hardware supports it, it is only a question of finding and tweaking the correct sources. I do not have access to a compiler at the moment, but if someone needs help with code-reading/ review, please continue posting here or on pastebin. :fingers-crossed:
+1 this would be awesome!
2 way call recording is very important for me. Still using Darky 9.5 (Froyo) because of that, but I would like to try a GB or ICS ROM if a patch was available.
So in my digging around on garbage to remove... I started digging in ConnectionManager.apk. Several things kind of set me off a bit (code below). I don't claim to know exactly what it does but I can read enough of it to figure I don't want it running on my phone. EdmSysScopeService also had some interesting things in it(third block of code below). So I removed the connectionmanager.apk from the phone since I was reflashing some zips. Apparently that's not a good idea. If you do that, it breaks the Mobile Networks settings menu. So I put it back and just froze it in Titanium Backup for now. Looks like that works and it simply greys out the ConnectionsOptimizer section. I don't need that running on my phone anyways as I can turn on and turn off wifi myself.
Anyone know what the EdmSysScopeService does?
Code:
private boolean isDeviceRooted()
{
boolean bool1 = true;
String str = Build.TAGS;
if ((str != null) && (str.contains("test-keys")));
while (true)
{
return bool1;
try
{
boolean bool2 = new File("/system/app/Superuser.apk").exists();
if (bool2)
continue;
label40: bool1 = false;
}
catch (Throwable localThrowable)
{
break label40;
}
}
}
Code:
package com.birdstep.android.cm.sms;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.util.Log;
import com.birdstep.android.cm.ESLog;
import com.birdstep.android.cm.UpdaterService;
import com.birdstep.android.cm.config.ConfigXmlParser;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
public class OperatorMessage extends BroadcastReceiver
{
private static final String ANDROID_PERMISSION_READ_SMS = "android.permission.READ_SMS";
public void onReceive(Context paramContext, Intent paramIntent)
{
if (ESLog.on)
Log.i("EasySmart", "on Receive OperatorMessage OperatorMessage OperatorMessage " + paramIntent.getAction());
ConfigXmlParser localConfigXmlParser = ConfigXmlParser.getConfigXmlParser(paramContext);
if (("android.provider.Telephony.SMS_RECEIVED".equals(paramIntent.getAction())) && (paramContext.getPackageManager().checkPermission("android.permission.READ_SMS", "com.birdstep.android.cm") == 0))
{
Bundle localBundle = paramIntent.getExtras();
if (localBundle != null)
{
Object[] arrayOfObject = (Object[])localBundle.get("pdus");
if (arrayOfObject != null)
{
SmsMessage[] arrayOfSmsMessage = new SmsMessage[arrayOfObject.length];
HashMap localHashMap = new HashMap(arrayOfObject.length);
int i = 0;
if (i < arrayOfSmsMessage.length)
{
arrayOfSmsMessage[i] = SmsMessage.createFromPdu((byte[])(byte[])arrayOfObject[i]);
if (!localHashMap.containsKey(arrayOfSmsMessage[i].getOriginatingAddress()))
localHashMap.put(arrayOfSmsMessage[i].getOriginatingAddress(), arrayOfSmsMessage[i].getMessageBody());
while (true)
{
i++;
break;
String str1 = (String)localHashMap.get(arrayOfSmsMessage[i].getOriginatingAddress());
String str2 = str1 + arrayOfSmsMessage[i].getMessageBody();
localHashMap.put(arrayOfSmsMessage[i].getOriginatingAddress(), str2);
}
}
Iterator localIterator = localHashMap.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
if ((((String)localEntry.getKey()).equalsIgnoreCase(localConfigXmlParser.itemString("ExtraOperatorMessageNumber"))) || (((String)localEntry.getKey()).equalsIgnoreCase(localConfigXmlParser.itemString("WisprCredentialsSmsPhoneNr"))) || (((String)localEntry.getKey()).equalsIgnoreCase(localConfigXmlParser.itemString("account_balance_number_sms"))) || (((String)localEntry.getKey()).equalsIgnoreCase(localConfigXmlParser.itemString("topup_number_sms"))))
{
Intent localIntent = new Intent(paramContext, UpdaterService.class);
localIntent.setAction("com.birdstep.cm.ACTION_OPERATOR_SMS_RECEIVED");
localIntent.putExtra("SMSCONTENTS", (String)localEntry.getValue());
localIntent.putExtra("SMSNUMBER", (String)localEntry.getKey());
paramContext.startService(localIntent);
abortBroadcast();
}
}
}
}
}
}
}
Code:
package com.sec.android.app.sysscope.service;
public enum ResultCode
{
private int mCode;
private String mDescription = "";
static
{
ADB_RUNNING_AS_ROOT = new ResultCode("ADB_RUNNING_AS_ROOT", 1, 65537);
PARTITION_TAMPERED = new ResultCode("PARTITION_TAMPERED", 2, 131073);
ROOT_PROCESS_FOUND = new ResultCode("ROOT_PROCESS_FOUND", 3, 12289);
DANGEROUS_FILE_DETECTED = new ResultCode("DANGEROUS_FILE_DETECTED", 4, 262145);
NOT_OFFICIAL_BINARY = new ResultCode("NOT_OFFICIAL_BINARY", 5, 327681);
ResultCode[] arrayOfResultCode = new ResultCode[6];
arrayOfResultCode[0] = OK;
arrayOfResultCode[1] = ADB_RUNNING_AS_ROOT;
arrayOfResultCode[2] = PARTITION_TAMPERED;
arrayOfResultCode[3] = ROOT_PROCESS_FOUND;
arrayOfResultCode[4] = DANGEROUS_FILE_DETECTED;
arrayOfResultCode[5] = NOT_OFFICIAL_BINARY;
}
Not sure, but since the galaxy S3 I've froze all that and much more questionable system apps
.:Sent from my Sprint Galaxy Note II:.
Not sure, but Settings/About/Status shows if the counter has been reset. So there must be code somewhere that populates that field with data.
ffolkes said:
Not sure, but Settings/About/Status shows if the counter has been reset. So there must be code somewhere that populates that field with data.
Click to expand...
Click to collapse
Does this reset back if when you go back to stock?
Hopefully it isnt the newest CarrierIQ....
Well, when I freeze the syscope apk and enterprise syscope apk I get this: Scanning... l'd Put up a pic, but it won't let me.
Sent from my SPH-L900 using xda premium
Carrier IQ anyone? As for the second one it could be for warranty voiding if you root..but I'm no expert
Sent from my Galaxy Nexus using Tapatalk 2
nuc noob said:
Well, when I freeze the syscope apk and enterprise syscope apk I get this: Scanning... l'd Put up a pic, but it won't let me.
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
Interesting...more stuff to rip out! The pile is getting bigger by the minute
From a simple Google search sysscope determines if your phones moddifed and make some Samsung accessories not work with the phone...
Sent from my Galaxy Nexus using Tapatalk 2
Wordlywisewiz said:
Carrier IQ anyone? As for the second one it could be for warranty voiding if you root..but I'm no expert
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Now, thankfully I haven't found any CarrierIQ stuff.
The connection manager stuff is interesting, actually a pretty good idea for dumb/lazy people. I defrosted it and let it run for a bit. That sucker has logged every single access point my phone has seen. It put them in geographic groups and marked when it last saw them and even marked the ones that were wide open.
Logged the amount of data I used and why I dropped from the access point. Data sessions with amounts of the various access points I connected to.
The individual tower sector IDs along with the access point I was connected to. I assume so later the connection manager can learn where I used WiFi and attempt to use it again in those same areas. Kinda creepy it logs all of it, but it's really public info anyways if you drove around and logged the SSIDs anyways.
Kinda cool and I could see the benefit of it off loading data from the network. But something I don't need on my phone as I can handle my wifi connections myself.
Wordlywisewiz said:
From a simple Google search sysscope determines if your phones moddifed and make some Samsung accessories not work with the phone...
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
That must be why all share doesn't work on roms
sent from my awesomely huge Note II
fryingpan0613 said:
That must be why all share doesn't work on roms
sent from my awesomely huge Note II
Click to expand...
Click to collapse
It should be possible with a modified syscope apk just change a vqlue
Sent from my Galaxy Nexus using Tapatalk 2
Wordlywisewiz said:
It should be possible with a modified syscope apk just change a vqlue
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Yep. The Connection Manager one would be easy. just change it to Duperuser.apk
Hi All,
I have a PX5 radio that was supplied with fittings for 2006 Toyota RAV4 , sadly it didnt come with a CANBOX and supplier was not able to provide one that matched, I managed to get my hands on a Canbox for VW unit and decided to reverse engineer the unit.
Here are my findings.
Code:
Pinouts
1--2--3--4--5--6--7--8
9--10-11-12-13-14-15-16
1 GND 9 B+
2 CANH 10 CANL
3 EMPTY 11 ACC
4 EMPTY 12 EMPTY
5 EMPTY 13 EMPTY
6 EMPTY 14 EMPTY
7 MCU_RXD_CAN 15 EMPTY
8 EMPTY 16 MCU_TXD_CAN
On power up the device sends a hex packet to TX Uart of the board (RX of the head unit) at 38400 baud,
the packet is as follows
Code:
0x0,
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E,0x22,0x4,0x1,0x1,0x1,0x1,0xD5,
0x2E,0x22,0x4,0x1,0x10x1,0x1,0xD5,
0x2E,0x22,0x4,0x1,0x1,0x1,0x1,0xD5,
0x2E,0x22,0x4,0xFE,0x2,0x1,0x1,0xD5,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xFF,0xFF
Raw Packet
Code:
02E215010000C92E215010000C92E215010000C92E215010000C92E2241111D52E2241111D52E2241111D52E2241111D52E2341111D42E2341111D42E2341111D42E2341111D4FF
packet burst start with 0x0 then each packet start with 0x2e
My Assumption is the box acts as a translator converting each car specific CANBUS/KKL/KLINE/IR-bus protocol into a
pre-defined packet of information that it transmits to the headunit.
if this is confirmed then creating a open source version of the box should be easy within the ease of the cars can system ,
it may also open cars that dont have can bus to still use the canbus system of headunit, eg reading speed to adjust volume , monitor door open to display on screen using arduino.
If anyone has seen a lookup chart or information on the CANBOX/Decoders protocol to/from the headunit I would love the link.
next i will hookup to the headunit itself and send the same codes to see what effect they have.
darkspr1te
p.s if anyone knows of a firmware bin for canbus box then please let me know.
*EDIT 30/01/2023*
This is the raise/hiworld/simple soft 20 pin pin-out I am seeing now.
Below is a toyota model that has AVC LAN
confirm against Simplesoft RP5-TY-001
Code:
1: Batt 2: GND
3: AVC - 4: AVC LAN +
5: REVERSE OUT To HeadUnit 6: ILL-OUT to HeadtUnit
7: REV CAM Power 8: Park Signal IN
9: IGN In 10: ACC in
11: CAN-L to Car 12: CAN-H to Car
13: NC (model feature) 14: H/Unit RX Can data (3.3v)
15: H/Unit TX Can data (3.3v) 16:NC (model Feature)
17:Amp In Signal 18: SWC1
19: SWC2 20: SWC3
darkspr1te
Some reference information
Kia CANBOX pinouts
canbox scematic and versions XDA-post
canbus protocol headunit
darkspr1te
Found on another page, posted here for info ,
Code:
Action DEC HEX
Vol+ 46 32 2 1 1 219 2E 20 02 01 01 DB
Vol- 46 32 2 2 1 218 2E 20 02 02 01 DA
Next 46 32 2 3 1 217 2E 20 02 03 01 D9
Back 46 32 2 4 1 216 2E 20 02 04 01 D8
BT connect 46 32 2 5 1 215 2E 20 02 05 01 D7
Mute 46 32 2 6 1 214 2E 20 02 06 01 D6
Home 46 32 2 7 1 213 2E 20 02 07 01 D5
Front left door 46 65 2 1 1 186 2E 41 02 01 01 BA
Front right door 46 65 2 1 2 185 2E 41 02 01 02 B9
Rear left door 46 65 2 1 4 183 2E 41 02 01 04 B7
Rear right door 46 65 2 1 8 179 2E 41 02 01 08 B3
Trunk 46 65 2 1 16 171 2E 41 02 01 10 AB
Parking brake 46 65 2 1 32 155 2E 41 02 01 20 9B
Wiper fluid level 46 65 2 1 64 123 2E 41 02 01 40 7B
Seat belt 46 65 2 1 128 59 2E 41 02 01 80 3B
Closes decoder ? 46 34 1 0 0 220 2E 22 01 00 00 DC
Code:
1rst byte: 2E ->start
2nd byte: XX -> request ID
3 byte: NN -> number of data bytes length
4 to NN+3 bytes: DD ... DD -> data of request
NN+4 byte: cheksum from second byte to NN+3 byte complement 2
Thanks. That is very interesting. I subscribed the topic. In my case I have a problem with my can decoder regarding the panel lights. It is correctly switch on if I manually switch on the headlights, but it doesn't come on if the headlights are in "Automatic" mode. Probably the CAN message in this case is different and is not correctly decoded by the box.
Inviato dal mio SM-N960F utilizzando Tapatalk
darkspr1te said:
Found on another page, posted here for info ,
Code:
Action DEC HEX
Vol+ 46 32 2 1 1 219 2E 20 02 01 01 DB
Vol- 46 32 2 2 1 218 2E 20 02 02 01 DA
Next 46 32 2 3 1 217 2E 20 02 03 01 D9
Back 46 32 2 4 1 216 2E 20 02 04 01 D8
BT connect 46 32 2 5 1 215 2E 20 02 05 01 D7
Mute 46 32 2 6 1 214 2E 20 02 06 01 D6
Home 46 32 2 7 1 213 2E 20 02 07 01 D5
Front left door 46 65 2 1 1 186 2E 41 02 01 01 BA
Front right door 46 65 2 1 2 185 2E 41 02 01 02 B9
Rear left door 46 65 2 1 4 183 2E 41 02 01 04 B7
Rear right door 46 65 2 1 8 179 2E 41 02 01 08 B3
Trunk 46 65 2 1 16 171 2E 41 02 01 10 AB
Parking brake 46 65 2 1 32 155 2E 41 02 01 20 9B
Wiper fluid level 46 65 2 1 64 123 2E 41 02 01 40 7B
Seat belt 46 65 2 1 128 59 2E 41 02 01 80 3B
Closes decoder ? 46 34 1 0 0 220 2E 22 01 00 00 DC
Code:
1rst byte: 2E ->start
2nd byte: XX -> request ID
3 byte: NN -> number of data bytes length
4 to NN+3 bytes: DD ... DD -> data of request
NN+4 byte: cheksum from second byte to NN+3 byte complement 2
Click to expand...
Click to collapse
probably this post could help you... it gives some usefull codes, including a sort of CAN Bus monitoring:
https://forum.xda-developers.com/showpost.php?p=71455277&postcount=11
royalhawk2002 said:
Thanks. That is very interesting. I subscribed the topic. In my case I have a problem with my can decoder regarding the panel lights. It is correctly switch on if I manually switch on the headlights, but it doesn't come on if the headlights are in "Automatic" mode. Probably the CAN message in this case is different and is not correctly decoded by the box.
Inviato dal mio SM-N960F utilizzando Tapatalk
Click to expand...
Click to collapse
Yes, the can ID or $ID in short hand is different for light, auto lights on and dial light turned on. i have fallen pray to this with my RAV4 auto lights, like why my display is dim "oh i put a book on top of the sensor on the dash" , but I chased other bugs before that one became more obvious.
royalhawk2002 said:
probably this post could help you... it gives some usefull codes, including a sort of CAN Bus monitoring:
https://forum.xda-developers.com/showpost.php?p=71455277&postcount=11
Click to expand...
Click to collapse
Thanks, I had come across that one and apart from the logcan function most of the other stuff is not valid in this application.
I intend to aim primarily at the protocol between Head unit and CANBOX, not CANBOX to car (as i'am sort of covering that elsewhere) , the CANBOX to car part is one hell of a rabbit hole to go down , not only are varied high level terms thrown around incorrectly or misunderstood in a lot of articles but as soon as the document gets to a level of understanding the information drains off as the commercial applications come forward, imagine cartoon authors eye's turn to ($) ($).
Thats why you dont see much in the way of good open source OBD stuff thats not tied into a specific hardware circle or device type.
J2435 is sort of opening that up but in a poor way, they hiding the CAR part behind a device again so again we dont know what the device is saying to the car.
This is why i wont be really covering much on the car side but more in how we can replicate the canbox functions first of all.
I already have a POC that talks to a ELM327 device via wifi or BT, only the programming the esp2866 lacks full understanding of the car as i have JDM cars, not only is JDM protocols different from euro/US counterparts but the also have sub -divided protocols where a euro/us function will work on 2006-2007 model but not 2008-current, who knows why but that is the way of it.
I also do have some additional information on the protocol that i've have to digest, the last bytes are CRC8 EDIT:twos compliment crc see below, i've confirmed that, so we can calc on fly or use look up table for speed, I also have seen this protocol in my research before into another subject but i cannot place it yet, the $2e start byte is the giveaway and followed by function High byte and low bytes and then data and finally crc, Maybe i'll remember it before someone else does, but we have the base part of the protocol and i already have a POC code that is usable on many devices due to being arduino in nature(just not arduino ide but thats a coders choice),
Now as we already have a schematic floating around with full BOM we could in theory make our own canbox but when checking I found it's based on STM8 which is a older chip and I'am personally more familiar with STM32F series and atmega, sam4c etc so i may re-produce the board using that. Also all of my current in stock hardware that has canbus is all stm32f.
Now some of you might have spotted my glaring mistake, I want the code the to work on anything but i'am building it using stm, well thats only due to the fact i have a quite a few stm's to sacrifice , once i know the code works (HU to canbox & canbox to car) then i can introduce other brands of MCU once i have a validated test bench. What will vary device to device is how you Initiate the CAN, with stm32 chips they have bXcan drivers in f103 chips, for atmega we can use spi based canbus driver chips. Supporting those two functions will be enough to pull in esp/atmega/LT and many other chip makers should someone want to port to their fav brand of chip.
I would also like to support non-obd cars , sensing door open is not that hard and a simple arduino+level converter you can sense doors, speed and more. there's also a few after market steering wheels that have vol dials as wheel as custom car builder wanting to use a wheel from brand A on brand B , who am i to judge where you got your real Lotus F1 wheel from.
Now we do have to cover one subject thats often missed in these discussions, OBD and all it's cousins was ment as Diagnostic first, which means not all cars are happy having a dongle full time on the OBD port, I've seen cummings based vehicles refuse to start unless the OBD is unplugged first, that means the dongle is introducing noise on to the bus, be it in the form of legit data request, eronus data or real electrical noise from not having the BUS resistor .
edit: while trying to solve this "ive seen this before" problem I did find this, very similar,
https://www.peak-system.com/produktcd/Pdf/English/PCAN-LIN_ProtDef_eng.pdf
darkspr1te
My head unit isudar h53 also has can box. The car can H and can L connect directly to the box. Between the box and radio there are can rx and can tx. If I go to car choise menu to select car type, after that the unit update the mcu firmware. When this update is done whether the can box is also updated via can rx and can tx lines?
Normally the can rx and can tx signal translated via can chip eg.: tja1050 to can H and can L. If nothing else is in the can box it is not need to update. But the box include ignition ac signal and fix voltage. Because this reason maybe there are much more component in the box than a single can chip.
So my question is if I want to modify one of the can message, enough the head unit update or need to the can box also?
CRC sorted
Ok, so i've sorted the crc out, I can now calc the crc correctly based on this :-
Code:
uint8_t data_packet[] ={0x41,0x2,0x01,0x80};
uint8_t crc_mod(uint8_t car_array[],int datasize)
{
int checksum=0;
for (int i = 0; i < datasize; i++)
{
checksum = (checksum + car_array[i]) & 0xFF;
}
return (256 - checksum & 0xFF)-1;
}
void main()
{
uint8_t data_crc=crc_mod(data_packet,sizeof(data_packet));
Serial.print(data_crc,HEX);
}
and of course the final packet array will be :-
0x2E,0x41,0x02,0x01,0x80,0x3B
or
START_BYTE,PKT_BODY,sizeof(MIN_DATA_SIZE),FILLER_BYTE,SEAT_BELT,crc_mod(PKT_BODY,sizeof(MIN_DATA_SIZE),FILLER_BYTE,SEAT_BELT)
would make up a full packet,
As for the actual data packet i've broken it down to :-
Code:
#define START_BYTE 0x2e
#define MIN_DATA_SIZE 0x2
#define FILLER_BYTE
//buttons
#define PKT_BUTTON 0x20
#define HU_VOLUME_UP 0x1
#define HU_VOLUME_DOWN 0x2
#define HU_NEXT 0x3
#define HU_BACK 0x4
#define HU_BT_ON 0x5
#define HU_MUTE 0x6
#define HU_HOME 0x7
//body functions -
#define PKT_BODY 0x41
#define FL_DOOR 0x1
#define FR_DOOR 0x2
#define RL_DOOR 0x4
#define RR_DOOR 0x8
#define BOOT_DOOR 0x10
#define PARK_BRAKE 0x20
#define WIPER_FLUID 0x40
#define SEAT_BELT 0x80
I'am going to assume there are different packet ID's other than 0x20 and 0x41 out there eg AC, windows , lights see next post, Also i've not optimized the packet structure or definitions and i've not pasted all the body definitions i've found, some are unconfirmed or contradicting.
I'am going to tidy up the code so i can share it and hope it will make more sense once i've removed all my test rubbish but I initially have the arduino acting on packets from the device (CANBOX) and I can now build a packet with crc being calculated runtime, have not tested what happens when i send to the box yet as my setup is very , ahem, primitive due to desk space limitations and my current setup includes :-
1x canbox
3xstm32 blackpills (one is acting as HU, one is acting as CAR CAN and one ties uarts together)
1x rigol ds1054z scope
anyway, more to come.
darkspr1te
Ok,so in the prior post we spoke about the basic packet so far,
but in my first post I pasted some data from my box
Code:
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E,0x22,0x4,0x1,0x1,0x1,0x1,0xD5,
0x2E,0x22,0x4,0xFE,0x2,0x1,0x1,0xD5,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xFF,0xFF
So we also know that packet size can change , maybe this is the difference between brands (RAISE is a common one i see and mine has that written on PCB) , I dont have the box for my unit but I have seen a image of it around, i'll try to post it on the CANBOX Types post and then refer here.
I also see a lot of duplicate transmissions too so next step is to listen to the device while connected to a real HU to sniff for packet OK response, again that is a assumption on my side.
darkspr1te
MCTCoreServices
So I've found the sources that document the protocol between CANBOX and HeadUnit for some CANBOX models,
Code:
public class CanBoxProtocol
{
private final static String TAG = "CanBoxProtocol";
private boolean mIsValidProtocol = false;
private int mLengthFlag = 0x1;//0 = 长度在前,1 = 长度在后
private int mHeadLength = 0x00;//Head长度
private int[] mHeadTag = new int[]{0xFF,0xFF,0xFF};//协议头,不够补0xFF
private int[] mBaudRate = new int[]{0x00,0x00,0x00,0x00};//波特率
private int mChecksumAddLength = 0x1;//0 checksum计算不需要包含length;1 需要包含length
private int mChecksumAddCmd = 0x1;//0 checksum计算不需要包含cmd;1 需要包含cmd
private int mChecksumMode = 0x1;//0 &0xFF; 1 ^0xFF
private int mChecksumExtern = 0x0;//0 checksum不需要-1;1 不需要
private int mNeedAck = 0x1;//是否需要ACK
private int mOkAck = 0xFF;//成功ACK
private int mFailedAck = 0xF0;//失败ACK
private int mCheckSumLength = 0x01;//CheckSum长度
private int mDataLengthMode = 0x00;//0 Data部分的长度;1 除协议头以外所有的数据长度
public CanBoxProtocol(int canBoxType,int carModel)
{
updateCanBoxType(canBoxType,carModel);
}
public void updateCanBoxType(int canBoxType,int carModel)
{
Log.i(TAG, "updateCanBoxType:"+canBoxType+",carModel:"+carModel);
switch(canBoxType)
{
case CarModelDefine.CAN_BOX_RZC:
{
//睿智诚标志雪铁龙车系协议格式要单独处理
if(carModel >= 250 && carModel <= 299)
{
mLengthFlag = 0x00;
mHeadTag[0] = 0xFD;
mHeadTag[1] = 0xFF;
mHeadTag[2] = 0xFF;
mHeadLength = 0x01;
mBaudRate[0] = 0x00;
mBaudRate[1] = 0x00;
mBaudRate[2] = 0x4B;
mBaudRate[3] = 0x00;
mChecksumAddLength = 0x01;
mChecksumAddCmd = 0x01;
mChecksumMode = 0x00;
mChecksumExtern = 0x00;
mNeedAck = 0x00;
mOkAck = 0xFF;
mFailedAck = 0xFF;
mIsValidProtocol = true;
mCheckSumLength = 0x01;
mDataLengthMode = 0x01;
}
else if(carModel >= 300 && carModel <= 349)
{
mLengthFlag = 0x00;
mHeadTag[0] = 0xFD;
mHeadTag[1] = 0xFF;
mHeadTag[2] = 0xFF;
mHeadLength = 0x01;
mBaudRate[0] = 0x00;
mBaudRate[1] = 0x00;
mBaudRate[2] = 0x4B;
mBaudRate[3] = 0x00;
mChecksumAddLength = 0x01;
mChecksumAddCmd = 0x01;
mChecksumMode = 0x00;
mChecksumExtern = 0x00;
mNeedAck = 0x00;
mOkAck = 0xFF;
mFailedAck = 0xFF;
mIsValidProtocol = true;
mCheckSumLength = 0x02;
mDataLengthMode = 0x01;
}
else
{
mLengthFlag = 0x01;
mHeadTag[0] = 0x2E;
mHeadTag[1] = 0xFF;
mHeadTag[2] = 0xFF;
mHeadLength = 0x01;
mBaudRate[0] = 0x00;
mBaudRate[1] = 0x00;
mBaudRate[2] = 0x96;
mBaudRate[3] = 0x00;
mChecksumAddLength = 0x01;
mChecksumAddCmd = 0x01;
mChecksumMode = 0x01;
mChecksumExtern = 0x00;
mNeedAck = 0x01;
mOkAck = 0xFF;
mFailedAck = 0xF0;
mIsValidProtocol = true;
mCheckSumLength = 0x01;
mDataLengthMode = 0x00;
}
}
break;
case CarModelDefine.CAN_BOX_SS:
mLengthFlag = 0x00;
mHeadTag[0] = 0xAA;
mHeadTag[1] = 0x55;
mHeadTag[2] = 0xFF;
mHeadLength = 0x02;
mBaudRate[0] = 0x00;
mBaudRate[1] = 0x00;
mBaudRate[2] = 0x96;
mBaudRate[3] = 0x00;
mChecksumAddLength = 0x01;
mChecksumAddCmd = 0x01;
mChecksumMode = 0x00;
mChecksumExtern = 0x01;
mNeedAck = 0x00;
mOkAck = 0xFF;
mFailedAck = 0xFF;
mIsValidProtocol = true;
mCheckSumLength = 0x01;
mDataLengthMode = 0x00;
break;
case CarModelDefine.CAN_BOX_XP:
mLengthFlag = 0x01;
mHeadTag[0] = 0x2E;
mHeadTag[1] = 0xFF;
mHeadTag[2] = 0xFF;
mHeadLength = 0x01;
mBaudRate[0] = 0x00;
mBaudRate[1] = 0x00;
mBaudRate[2] = 0x96;
mBaudRate[3] = 0x00;
mChecksumAddLength = 0x01;
mChecksumAddCmd = 0x01;
mChecksumMode = 0x01;
mChecksumExtern = 0x00;
mNeedAck = 0x01;
mOkAck = 0xFF;
mFailedAck = 0xF0;
mIsValidProtocol = true;
mCheckSumLength = 0x01;
mDataLengthMode = 0x00;
break;
default:
Log.e(TAG, "not support this can box type");
break;
}
}
and then theres the commands
Code:
//CanBox->HU
public static final int CH_CMD_STEERING_WHEEL_KEY = 0x20;
public static final int CH_CMD_TRIP_PER_MINUTE_INFO = 0x21;//每分钟油耗
public static final int CH_CMD_INSTANT_TRIP_INFO = 0x22;//瞬时油耗
public static final int CH_CMD_HISTORY_TRIP_INFO = 0x23;//历史油耗
public static final int CH_CMD_BASE_INFO = 0x24;
public static final int CH_CMD_TPMS_INFO = 0x25;
public static final int CH_CMD_VEHICLE_SETTING = 0x26;
public static final int CH_CMD_TRIP_BEFORE_15_MINUTE = 0x27;//过去15分钟每分钟油耗
public static final int CH_CMD_AIR_CONDITION_INFO = 0x28;//空调信息
public static final int CH_CMD_STEERING_WHEEL_ANGLE = 0x29;//方向盘转角信息
public static final int CH_CMD_PROTOCOL_VERSION_INFO = 0x30;//协议版本信息
public static final int CH_CMD_AMPLIFIER_STATUS_INFO = 0x31;//攻放信息
public static final int CH_CMD_SYSTEM_INFO = 0x32;//系统信息
public static final int CH_CMD_OIL_ELEC_MIXED_INFO = 0x1F;//油电混合指示
public static final int CH_CMD_REAR_RADAR_INFO = 0x1E;//后雷达
public static final int CH_CMD_FRONT_RADAR_INFO = 0x1D;//前雷达
public static final int CH_CMD_VEHICLE_SET_STATUS_INFO = 0x50;//车辆设置状态
public static final int CH_CMD_AC_PANEL_KEY_INFO = 0x51;//空调面板设置信息(皇冠)
public static final int CH_CMD_VECHILE_SET_RETURN_INFO= 0x52;//车辆设置返回信息(皇冠、汉兰达)
public static final int CH_CMD_AIR_CONDITION_INFO2 = 0x58;//车型空调信息(皇冠)
//HU->CanBox
public static final int HC_CMD_SWITCH = 0x81;
public static final int HC_CMD_VEHICLE_SET = 0x83;//车身中控设定命令
public static final int HC_CMD_COMMON_SET = 0x84;//设定命令
public static final int HC_CMD_REQ_CONTROL_INFO = 0x90;//请求控制信息
public static final int SWC_KEY_NONE = 0x00;//无按键或者按键释放
public static final int SWC_KEY_VOLUME_UP = 0x01;//音量加
public static final int SWC_KEY_VOLUME_DOWN = 0x02;//音量键
public static final int SWC_KEY_MENU_RIGHT = 0x03;//方向键-右
public static final int SWC_KEY_MENU_LEFT = 0x04;//方向键-左
public static final int SWC_KEY_SRC = 0x07;//源切换
public static final int SWC_KEY_SPEECH = 0x08;//语音
public static final int SWC_KEY_PICK_UP = 0x09;//接听
public static final int SWC_KEY_HANG_UP = 0x0A;//挂断
public static final int SWC_KEY_BOX = 0x0B;//方框键
public static final int SWC_KEY_MENU_UP = 0x13;//方向键-上
public static final int SWC_KEY_MENU_DOWN = 0x14;//方向键-下
public static final int SWC_KEY_BACK = 0x15;//back
public static final int SWC_KEY_ENTER = 0x16;//enter
public static final int SCROLL_KEY_VOLUME_UP = 0x81;//音量旋钮-
public static final int SCROLL_KEY_VOLUME_DOWN = 0x82;//音量旋钮+
public static final int SCROLL_KEY_CH_FLD_UP = 0x83;//enter
public static final int SCROLL_KEY_CH_FLD_DOWN = 0x84;//enter
public static final int SCROLL_KEY_TUNE_TRACK_UP = 0x85;//收音调台-
public static final int SCROLL_KEY_TUNE_TRACK_DOWN = 0x86;//收音调台+
public static final int SWC_KEY_POWER = 0x87;//PWR
public static final int SWC_KEY_MODE = 0x88;//MODE
and the models are
Code:
public static final short CAR_MODEL_VOLKSWAGEN_MAGOTAN = 0;//大众迈腾
public static final short CAR_MODEL_VOLKSWAGEN_SAGITAR = 1;//大众速腾
public static final short CAR_MODEL_VOLKSWAGEN_GOLF7 = 2;//大众高尔夫7
public static final short CAR_MODEL_VOLKSWAGEN_POLO = 3;//大众波罗
public static final short CAR_MODEL_VOLKSWAGEN_OCTAVIA = 4;//大众明锐
public static final short CAR_MODEL_VOLKSWAGEN_17MAGOTAN= 5;//17款迈腾
//本田系列(50-99)
public static final short CAR_MODEL_HONDA_15CRV_L = 50;//15CRV低配
public static final short CAR_MODEL_HONDA_15CRV_H = 51;//15CRV高配
public static final short CAR_MODEL_HONDA_CROSSTOUR = 52;//歌诗图
public static final short CAR_MODEL_HONDA_ACCORD_9L = 53;//雅阁9代低配
public static final short CAR_MODEL_HONDA_ACCORD_9H = 54;//雅阁9代高配
public static final short CAR_MODEL_HONDA_CRIDER = 55;//凌派2016
public static final short CAR_MODEL_HONDA_JADE = 56;//杰德
public static final short CAR_MODEL_HONDA_ODYSSEY = 57;//奥德赛
public static final short CAR_MODEL_HONDA_FIDO = 58;//飞度
public static final short CAR_MODEL_HONDA_WISDOM = 59;//缤智
public static final short CAR_MODEL_HONDA_CITY = 60;//锋范旗舰版2015
public static final short CAR_MODEL_HONDA_12CRV = 61;//12CRV
//日产系列(100-149)
public static final short CAR_MODEL_NISSAN_X_TRAIL = 100;//奇骏
public static final short CAR_MODEL_NISSAN_QASHQAI = 101;//逍客
public static final short CAR_MODEL_NISSAN_NEW_TEANA = 102;//新天籁
public static final short CAR_MODEL_NISSAN_TEANA = 103;//天籁
public static final short CAR_MODEL_NISSAN_TIIDA = 104;//骐达
public static final short CAR_MODEL_NISSAN_SUN = 105;//阳光
public static final short CAR_MODEL_NISSAN_LI_WEI = 106;//骊威
public static final short CAR_MODEL_NISSAN_BLUEBIRD = 107;//蓝鸟
public static final short CAR_MODEL_NISSAN_INIFINITI_QX50_L = 108;//英菲尼迪QX50低配
public static final short CAR_MODEL_NISSAN_INIFINITI_QX50_H= 109;//英菲尼迪QX50高配
public static final short CAR_MODEL_NISSAN_MORNAO = 110;//楼兰
public static final short CAR_MODEL_NISSAN_CIMA_L = 111;//西玛低配
public static final short CAR_MODEL_NISSAN_CIMA_H = 112;//西玛高配
public static final short CAR_MODEL_NISSAN_VENUCIA_T70 = 113;//启辰T70
public static final short CAR_MODEL_NISSAN_VENUCIA_T90 = 114;//启辰T90
//丰田系列(150-199)
public static final short CAR_MODEL_TOYOTA_RAV4 = 150;//RAV4
public static final short CAR_MODEL_TOYOTA_VIOS = 151;//威驰
public static final short CAR_MODEL_TOYOTA_REIZ = 152;//锐志
public static final short CAR_MODEL_TOYOTA_OVERBEARING = 153;//霸道
public static final short CAR_MODEL_TOYOTA_COROLLA = 154;//卡罗拉
public static final short CAR_MODEL_TOYOTA_HIGHLANDER = 155;//汉兰达
public static final short CAR_MODEL_TOYOTA_CAMRY = 156;//凯美瑞
public static final short CAR_MODEL_TOYOTA_CROWN = 157;//皇冠
//通用系列(200-249)
public static final short CAR_MODEL_GM_HIDEN = 200;//英朗
public static final short CAR_MODEL_GM_CRUZE = 201;//科鲁兹
public static final short CAR_MODEL_GM_MALIBU = 202;//迈锐宝
public static final short CAR_MODEL_GM_16MALIBU_XL = 203;//2016迈锐宝XL
public static final short CAR_MODEL_GM_GL8 = 204;//GL8
public static final short CAR_MODEL_GM_AVEO = 205;//爱唯欧
public static final short CAR_MODEL_GM_REGAL = 206;//君威
public static final short CAR_MODEL_GM_ENCORE = 207;//昂科拉
//标志雪铁龙系列(250-299)
public static final short CAR_MODEL_PEUGEOT_16_308 = 250;//16款308
public static final short CAR_MODEL_PEUGEOT_14_408 = 251;//14款408
public static final short CAR_MODEL_PEUGEOT_ELYSEE = 252;//爱丽舍
public static final short CAR_MODEL_PEUGEOT_301 = 253;//301
public static final short CAR_MODEL_PEUGEOT_2008 = 254;//2008
public static final short CAR_MODEL_PEUGEOT_3008 = 255;//3008
public static final short CAR_MODEL_PEUGEOT_C4L = 256;//C4L
public static final short CAR_MODEL_PEUGEOT_DS5LS = 257;//DS5LS
public static final short CAR_MODEL_PEUGEOT_C3XL = 258;//C3XL
public static final short CAR_MODEL_PEUGEOT_SEGA = 259;//世嘉
public static final short CAR_MODEL_PEUGEOT_4008 = 260;//4008
//韩系(300-349)
public static final short CAR_MODEL_KOREA_IX35 = 300;//IX35
public static final short CAR_MODEL_KOREA_IX45 = 301;//IX45
public static final short CAR_MODEL_KOREA_SONATA8 = 302;//索纳塔8
public static final short CAR_MODEL_KOREA_SONATA9 = 303;//索纳塔9
public static final short CAR_MODEL_KOREA_SORRENTO = 304;//索兰托
public static final short CAR_MODEL_KOREA_KIA_K5 = 305;//起亚K5
public static final short CAR_MODEL_KOREA_KIA_KX5 = 306;//起亚KX5
public static final short CAR_MODEL_KOREA_16MISTRA = 307;//16名图
public static final short CAR_MODEL_KOREA_KIA_16ELANTRA = 308;//16领动
public static final short CAR_MODEL_KOREA_KIA_16K3 = 309;//16K3
//福特车系系列(350-399)
public static final short CAR_MODEL_FORD_12_FUCOS = 350;//2012款福克斯
public static final short CAR_MODEL_FORD_13_KUGA = 351;//2013款翼虎
public static final short CAR_MODEL_FORD_13_ECO_SPORT = 352;//2013款翼博
public static final short CAR_MODEL_FORD_13_FIESTA = 353;//2013款嘉年华
public static final short CAR_MODEL_FORD_15_FUCOS = 354;//2015款福克斯
public static final short CAR_MODEL_FORD_17_KUGA = 355;//2017款翼虎
//奔腾车系
public static final short CAR_MODEL_BESTURN_16_B50 = 400;//2016款奔腾B50
public static final short CAR_MODEL_BESTURN_X80 = 405;//奔腾X80
//广汽传祺车系
public static final short CAR_MODEL_TRUMPCH_GA3 = 450;
public static final short CAR_MODEL_TRUMPCH_GA3S = 451;
public static final short CAR_MODEL_TRUMPCH_GA6 = 452;
public static final short CAR_MODEL_TRUMPCH_GS4 = 453;
public static final short CAR_MODEL_TRUMPCH_GS5 = 454;
public static final short CAR_MODEL_TRUMPCH_XINGLANG = 455;//广汽吉奥星朗
//吉利车系
public static final short CAR_MODEL_GEELY_EMGRAND = 500;//吉利帝豪
public static final short CAR_MODEL_GEELY_EMGRAND_GS = 501;//吉利帝豪GS
public static final short CAR_MODEL_GEELY_NL_3 = 502;//吉利博越
//中华车系
public static final short CAR_MODEL_CHINA_MOTOR_V3 = 550;//中华V3
public static final short CAR_MODEL_CHINA_MOTOR_H3 = 551;//中华H3
//宝骏车系
public static final short CAR_MODEL_BAO_JUN_560_2015 = 600;//2015宝骏560
public static final short CAR_MODEL_BAO_JUN_730_2014 = 601;//2014宝骏730
public static final short CAR_MODEL_BAO_JUN_730_2017 = 602;//2017宝骏730
//吉普车系
public static final short CAR_MODEL_JEEP_FREELIGHT_2015 = 650;//2015吉普自由光
public static final short CAR_MODEL_JEEP_LIBERTY_2016 = 651;//2016吉普自由侠
public static final short CAR_MODEL_JEEP_COMPASS_2017 = 652;//2017吉普指南者
//长城车系
public static final short CAR_MODEL_GREAT_WALL_H2 = 700;//长城H2
More to come once i've studied the java and .so sources
darkspr1te
darkspr1te said:
So I've found the sources that document the protocol between CANBOX and HeadUnit for some CANBOX models,
Code:
public class CanBoxProtocol
{
private final static String TAG = "CanBoxProtocol";
private boolean mIsValidProtocol = false;
private int mLengthFlag = 0x1;//0 = 长度在前,1 = 长度在后
private int mHeadLength = 0x00;//Head长度
private int[] mHeadTag = new int[]{0xFF,0xFF,0xFF};//协议头,不够补0xFF
private int[] mBaudRate = new int[]{0x00,0x00,0x00,0x00};//波特率
private int mChecksumAddLength = 0x1;//0 checksum计算不需要包含length;1 需要包含length
private int mChecksumAddCmd = 0x1;//0 checksum计算不需要包含cmd;1 需要包含cmd
private int mChecksumMode = 0x1;//0 &0xFF; 1 ^0xFF
private int mChecksumExtern = 0x0;//0 checksum不需要-1;1 不需要
private int mNeedAck = 0x1;//是否需要ACK
private int mOkAck = 0xFF;//成功ACK
private int mFailedAck = 0xF0;//失败ACK
private int mCheckSumLength= 0x01;//CheckSum长度
private int mDataLengthMode= 0x00;//0 Data部分的长度;1 除协议头以外所有的数据长度
public CanBoxProtocol(int canBoxType,int carModel)
{
updateCanBoxType(canBoxType,carModel);
}
public void updateCanBoxType(int canBoxType,int carModel)
{
Log.i(TAG, "updateCanBoxType:"+canBoxType+",carModel:"+carModel);
switch(canBoxType)
{
case CarModelDefine.CAN_BOX_RZC:
{
//睿智诚标志雪铁龙车系协议格式要单独处理
if(carModel >= 250 && carModel = 300 && carModel HU
public static final int CH_CMD_STEERING_WHEEL_KEY = 0x20;
public static final int CH_CMD_TRIP_PER_MINUTE_INFO = 0x21;//每分钟油耗
public static final int CH_CMD_INSTANT_TRIP_INFO = 0x22;//瞬时油耗
public static final int CH_CMD_HISTORY_TRIP_INFO = 0x23;//历史油耗
public static final int CH_CMD_BASE_INFO = 0x24;
public static final int CH_CMD_TPMS_INFO = 0x25;
public static final int CH_CMD_VEHICLE_SETTING = 0x26;
public static final int CH_CMD_TRIP_BEFORE_15_MINUTE= 0x27;//过去15分钟每分钟油耗
public static final int CH_CMD_AIR_CONDITION_INFO = 0x28;//空调信息
public static final int CH_CMD_STEERING_WHEEL_ANGLE = 0x29;//方向盘转角信息
public static final int CH_CMD_PROTOCOL_VERSION_INFO = 0x30;//协议版本信息
public static final int CH_CMD_AMPLIFIER_STATUS_INFO = 0x31;//攻放信息
public static final int CH_CMD_SYSTEM_INFO = 0x32;//系统信息
public static final int CH_CMD_OIL_ELEC_MIXED_INFO = 0x1F;//油电混合指示
public static final int CH_CMD_REAR_RADAR_INFO= 0x1E;//后雷达
public static final int CH_CMD_FRONT_RADAR_INFO= 0x1D;//前雷达
public static final int CH_CMD_VEHICLE_SET_STATUS_INFO= 0x50;//车辆设置状态
public static final int CH_CMD_AC_PANEL_KEY_INFO= 0x51;//空调面板设置信息(皇冠)
public static final int CH_CMD_VECHILE_SET_RETURN_INFO= 0x52;//车辆设置返回信息(皇冠、汉兰达)
public static final int CH_CMD_AIR_CONDITION_INFO2= 0x58;//车型空调信息(皇冠)
//HU->CanBox
public static final int HC_CMD_SWITCH = 0x81;
public static final int HC_CMD_VEHICLE_SET= 0x83;//车身中控设定命令
public static final int HC_CMD_COMMON_SET= 0x84;//设定命令
public static final int HC_CMD_REQ_CONTROL_INFO= 0x90;//请求控制信息
public static final int SWC_KEY_NONE= 0x00;//无按键或者按键释放
public static final int SWC_KEY_VOLUME_UP= 0x01;//音量加
public static final int SWC_KEY_VOLUME_DOWN= 0x02;//音量键
public static final int SWC_KEY_MENU_RIGHT= 0x03;//方向键-右
public static final int SWC_KEY_MENU_LEFT= 0x04;//方向键-左
public static final int SWC_KEY_SRC= 0x07;//源切换
public static final int SWC_KEY_SPEECH= 0x08;//语音
public static final int SWC_KEY_PICK_UP= 0x09;//接听
public static final int SWC_KEY_HANG_UP= 0x0A;//挂断
public static final int SWC_KEY_BOX= 0x0B;//方框键
public static final int SWC_KEY_MENU_UP= 0x13;//方向键-上
public static final int SWC_KEY_MENU_DOWN= 0x14;//方向键-下
public static final int SWC_KEY_BACK= 0x15;//back
public static final int SWC_KEY_ENTER= 0x16;//enter
public static final int SCROLL_KEY_VOLUME_UP= 0x81;//音量旋钮-
public static final int SCROLL_KEY_VOLUME_DOWN= 0x82;//音量旋钮+
public static final int SCROLL_KEY_CH_FLD_UP= 0x83;//enter
public static final int SCROLL_KEY_CH_FLD_DOWN= 0x84;//enter
public static final int SCROLL_KEY_TUNE_TRACK_UP= 0x85;//收音调台-
public static final int SCROLL_KEY_TUNE_TRACK_DOWN= 0x86;//收音调台+
public static final int SWC_KEY_POWER= 0x87;//PWR
public static final int SWC_KEY_MODE= 0x88;//MODE
and the models are
Code:
public static final short CAR_MODEL_VOLKSWAGEN_MAGOTAN = 0;//大众迈腾
public static final short CAR_MODEL_VOLKSWAGEN_SAGITAR = 1;//大众速腾
public static final short CAR_MODEL_VOLKSWAGEN_GOLF7 = 2;//大众高尔夫7
public static final short CAR_MODEL_VOLKSWAGEN_POLO = 3;//大众波罗
public static final short CAR_MODEL_VOLKSWAGEN_OCTAVIA = 4;//大众明锐
public static final short CAR_MODEL_VOLKSWAGEN_17MAGOTAN= 5;//17款迈腾
//本田系列(50-99)
public static final short CAR_MODEL_HONDA_15CRV_L= 50;//15CRV低配
public static final short CAR_MODEL_HONDA_15CRV_H= 51;//15CRV高配
public static final short CAR_MODEL_HONDA_CROSSTOUR= 52;//歌诗图
public static final short CAR_MODEL_HONDA_ACCORD_9L= 53;//雅阁9代低配
public static final short CAR_MODEL_HONDA_ACCORD_9H= 54;//雅阁9代高配
public static final short CAR_MODEL_HONDA_CRIDER= 55;//凌派2016
public static final short CAR_MODEL_HONDA_JADE= 56;//杰德
public static final short CAR_MODEL_HONDA_ODYSSEY= 57;//奥德赛
public static final short CAR_MODEL_HONDA_FIDO= 58;//飞度
public static final short CAR_MODEL_HONDA_WISDOM= 59;//缤智
public static final short CAR_MODEL_HONDA_CITY= 60;//锋范旗舰版2015
public static final short CAR_MODEL_HONDA_12CRV= 61;//12CRV
//日产系列(100-149)
public static final short CAR_MODEL_NISSAN_X_TRAIL=100;//奇骏
public static final short CAR_MODEL_NISSAN_QASHQAI=101;//逍客
public static final short CAR_MODEL_NISSAN_NEW_TEANA=102;//新天籁
public static final short CAR_MODEL_NISSAN_TEANA=103;//天籁
public static final short CAR_MODEL_NISSAN_TIIDA=104;//骐达
public static final short CAR_MODEL_NISSAN_SUN=105;//阳光
public static final short CAR_MODEL_NISSAN_LI_WEI=106;//骊威
public static final short CAR_MODEL_NISSAN_BLUEBIRD=107;//蓝鸟
public static final short CAR_MODEL_NISSAN_INIFINITI_QX50_L=108;//英菲尼迪QX50低配
public static final short CAR_MODEL_NISSAN_INIFINITI_QX50_H=109;//英菲尼迪QX50高配
public static final short CAR_MODEL_NISSAN_MORNAO=110;//楼兰
public static final short CAR_MODEL_NISSAN_CIMA_L=111;//西玛低配
public static final short CAR_MODEL_NISSAN_CIMA_H=112;//西玛高配
public static final short CAR_MODEL_NISSAN_VENUCIA_T70= 113;//启辰T70
public static final short CAR_MODEL_NISSAN_VENUCIA_T90= 114;//启辰T90
//丰田系列(150-199)
public static final short CAR_MODEL_TOYOTA_RAV4= 150;//RAV4
public static final short CAR_MODEL_TOYOTA_VIOS= 151;//威驰
public static final short CAR_MODEL_TOYOTA_REIZ= 152;//锐志
public static final short CAR_MODEL_TOYOTA_OVERBEARING= 153;//霸道
public static final short CAR_MODEL_TOYOTA_COROLLA= 154;//卡罗拉
public static final short CAR_MODEL_TOYOTA_HIGHLANDER= 155;//汉兰达
public static final short CAR_MODEL_TOYOTA_CAMRY= 156;//凯美瑞
public static final short CAR_MODEL_TOYOTA_CROWN= 157;//皇冠
//通用系列(200-249)
public static final short CAR_MODEL_GM_HIDEN= 200;//英朗
public static final short CAR_MODEL_GM_CRUZE= 201;//科鲁兹
public static final short CAR_MODEL_GM_MALIBU= 202;//迈锐宝
public static final short CAR_MODEL_GM_16MALIBU_XL= 203;//2016迈锐宝XL
public static final short CAR_MODEL_GM_GL8= 204;//GL8
public static final short CAR_MODEL_GM_AVEO= 205;//爱唯欧
public static final short CAR_MODEL_GM_REGAL= 206;//君威
public static final short CAR_MODEL_GM_ENCORE= 207;//昂科拉
//标志雪铁龙系列(250-299)
public static final short CAR_MODEL_PEUGEOT_16_308= 250;//16款308
public static final short CAR_MODEL_PEUGEOT_14_408= 251;//14款408
public static final short CAR_MODEL_PEUGEOT_ELYSEE= 252;//爱丽舍
public static final short CAR_MODEL_PEUGEOT_301= 253;//301
public static final short CAR_MODEL_PEUGEOT_2008= 254;//2008
public static final short CAR_MODEL_PEUGEOT_3008= 255;//3008
public static final short CAR_MODEL_PEUGEOT_C4L= 256;//C4L
public static final short CAR_MODEL_PEUGEOT_DS5LS= 257;//DS5LS
public static final short CAR_MODEL_PEUGEOT_C3XL= 258;//C3XL
public static final short CAR_MODEL_PEUGEOT_SEGA= 259;//世嘉
public static final short CAR_MODEL_PEUGEOT_4008= 260;//4008
//韩系(300-349)
public static final short CAR_MODEL_KOREA_IX35= 300;//IX35
public static final short CAR_MODEL_KOREA_IX45= 301;//IX45
public static final short CAR_MODEL_KOREA_SONATA8= 302;//索纳塔8
public static final short CAR_MODEL_KOREA_SONATA9= 303;//索纳塔9
public static final short CAR_MODEL_KOREA_SORRENTO= 304;//索兰托
public static final short CAR_MODEL_KOREA_KIA_K5= 305;//起亚K5
public static final short CAR_MODEL_KOREA_KIA_KX5= 306;//起亚KX5
public static final short CAR_MODEL_KOREA_16MISTRA= 307;//16名图
public static final short CAR_MODEL_KOREA_KIA_16ELANTRA= 308;//16领动
public static final short CAR_MODEL_KOREA_KIA_16K3= 309;//16K3
//福特车系系列(350-399)
public static final short CAR_MODEL_FORD_12_FUCOS= 350;//2012款福克斯
public static final short CAR_MODEL_FORD_13_KUGA= 351;//2013款翼虎
public static final short CAR_MODEL_FORD_13_ECO_SPORT= 352;//2013款翼博
public static final short CAR_MODEL_FORD_13_FIESTA= 353;//2013款嘉年华
public static final short CAR_MODEL_FORD_15_FUCOS= 354;//2015款福克斯
public static final short CAR_MODEL_FORD_17_KUGA= 355;//2017款翼虎
//奔腾车系
public static final short CAR_MODEL_BESTURN_16_B50= 400;//2016款奔腾B50
public static final short CAR_MODEL_BESTURN_X80= 405;//奔腾X80
//广汽传祺车系
public static final short CAR_MODEL_TRUMPCH_GA3= 450;
public static final short CAR_MODEL_TRUMPCH_GA3S= 451;
public static final short CAR_MODEL_TRUMPCH_GA6= 452;
public static final short CAR_MODEL_TRUMPCH_GS4= 453;
public static final short CAR_MODEL_TRUMPCH_GS5= 454;
public static final short CAR_MODEL_TRUMPCH_XINGLANG= 455;//广汽吉奥星朗
//吉利车系
public static final short CAR_MODEL_GEELY_EMGRAND= 500;//吉利帝豪
public static final short CAR_MODEL_GEELY_EMGRAND_GS= 501;//吉利帝豪GS
public static final short CAR_MODEL_GEELY_NL_3= 502;//吉利博越
//中华车系
public static final short CAR_MODEL_CHINA_MOTOR_V3= 550;//中华V3
public static final short CAR_MODEL_CHINA_MOTOR_H3= 551;//中华H3
//宝骏车系
public static final short CAR_MODEL_BAO_JUN_560_2015= 600;//2015宝骏560
public static final short CAR_MODEL_BAO_JUN_730_2014= 601;//2014宝骏730
public static final short CAR_MODEL_BAO_JUN_730_2017= 602;//2017宝骏730
//吉普车系
public static final short CAR_MODEL_JEEP_FREELIGHT_2015= 650;//2015吉普自由光
public static final short CAR_MODEL_JEEP_LIBERTY_2016= 651;//2016吉普自由侠
public static final short CAR_MODEL_JEEP_COMPASS_2017= 652;//2017吉普指南者
//长城车系
public static final short CAR_MODEL_GREAT_WALL_H2= 700;//长城H2
More to come once i've studied the java and .so sources
darkspr1te
Click to expand...
Click to collapse
Excellent work. I have a lot of functionality on my 2010 jeep grand Cherokee (tpms, front and rear radar, etc.) That aren't displayed by the head unit....I hope you will find a way to customize it and I finally can use it for my car
Inviato dal mio SM-N960F utilizzando Tapatalk
royalhawk2002 said:
Excellent work. I have a lot of functionality on my 2010 jeep grand Cherokee (tpms, front and rear radar, etc.) That aren't displayed by the head unit....I hope you will find a way to customize it and I finally can use it for my car
Inviato dal mio SM-N960F utilizzando Tapatalk
Click to expand...
Click to collapse
Thanks, Yes extended functions will be available even in cars where they may not directly exist. Door open could be emulated by just sensing the door pin, but the electronics for a general car board that could be re-purposed for this I'am not sure exist in a good package.
maybe later on i'll look for a open source obd board that has additional input other than just OBD CAN and can isolate itself from the H/U.
Jeeps are known to me, I grazed my first knuckles on a 4L High output from the willies jeep body & early Cherokee, fun cars if they are not your daily driver.
darkspr1te
darkspr1te said:
Thanks, Yes extended functions will be available even in cars where they may not directly exist. Door open could be emulated by just sensing the door pin, but the electronics for a general car board that could be re-purposed for this I'am not sure exist in a good package.
maybe later on i'll look for a open source obd board that has additional input other than just OBD CAN and can isolate itself from the H/U.
Jeeps are known to me, I grazed my first knuckles on a 4L High output from the willies jeep body & early Cherokee, fun cars if they are not your daily driver.
darkspr1te
Click to expand...
Click to collapse
Door status display, manual headlight switch on, steering wheel commands and Steering angle sensor (dynamic lines in rear view cam) are the unique "CAN" implemented function on my Jeep Grand Cherokee WK head unit CanBus BOX. There are a lot info on the Can Bus that could be displayed on the HU, i.e. external temperature, TPMS, Parking Sensors, Compass, etc.
Any update?
Inviato dal mio SM-N960F utilizzando Tapatalk
Is this wonderful work abandoned ?
I've not abandoned the project, due to IRL commits and other projects to complete I just had not had the time to return to this, the project is still under development internally but writing the public document side is time consuming and i've not had that kinda time of late.
darkspr1te
Canbus firmware file
I don't know if this is still useful for you, but here is a link for a firmware update for a VW-SS-07 VW canbus unit:
https://mega.nz/#!zXJBnQxZ!EOEbuxoIjO3Otyv9hxUuDBzLDuuNRbiMEo9-g2hBfAI
Here are the instructions for using it:
1. Confirm the model of your canbus decoder is VW-SS-07.
2. Download the software onto the root content of your sd card and insert it to the unit.
3. Enter Factory Settings and input the code "canupdates" instead of password.
Here's the page I found it on:
http://forum.autopumpkin.com/viewtopic.php?t=13120
-Karl.
darkspr1te said:
Hi All,
I have a PX5 radio that was supplied with fittings for 2006 Toyota RAV4 , sadly it didnt come with a CANBOX and supplier was not able to provide one that matched, I managed to get my hands on a Canbox for VW unit and decided to reverse engineer the unit.
Here are my findings.
Code:
Pinouts
1--2--3--4--5--6--7--8
9--10-11-12-13-14-15-16
1 GND 9 B+
2 CANH 10 CANL
3 EMPTY 11 ACC
4 EMPTY 12 EMPTY
5 EMPTY 13 EMPTY
6 EMPTY 14 EMPTY
7 MCU_RXD_CAN 15 EMPTY
8 EMPTY 16 MCU_TXD_CAN
On power up the device sends a hex packet to TX Uart of the board (RX of the head unit) at 38400 baud,
the packet is as follows
Code:
0x0,
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E,0x21,0x5,0x0,0x10,0x0,0x0,0x0,0xC9,
0x2E,0x22,0x4,0x1,0x1,0x1,0x1,0xD5,
0x2E,0x22,0x4,0x1,0x10x1,0x1,0xD5,
0x2E,0x22,0x4,0x1,0x1,0x1,0x1,0xD5,
0x2E,0x22,0x4,0xFE,0x2,0x1,0x1,0xD5,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xD4,
0x2E,0x23,0x4,0x1,0x1,0x1,0x1,0xFF,0xFF
Raw Packet
Code:
02E215010000C92E215010000C92E215010000C92E215010000C92E2241111D52E2241111D52E2241111D52E2241111D52E2341111D42E2341111D42E2341111D42E2341111D4FF
packet burst start with 0x0 then each packet start with 0x2e
My Assumption is the box acts as a translator converting each car specific CANBUS/KKL/KLINE/IR-bus protocol into a
pre-defined packet of information that it transmits to the headunit.
if this is confirmed then creating a open source version of the box should be easy within the ease of the cars can system ,
it may also open cars that dont have can bus to still use the canbus system of headunit, eg reading speed to adjust volume , monitor door open to display on screen using arduino.
If anyone has seen a lookup chart or information on the CANBOX/Decoders protocol to/from the headunit I would love the link.
next i will hookup to the headunit itself and send the same codes to see what effect they have.
darkspr1te
p.s if anyone knows of a firmware bin for canbus box then please let me know.
Click to expand...
Click to collapse
karlnorth said:
I don't know if this is still useful for you, but here is a link for a firmware update for a VW-SS-07 VW canbus unit:
https://mega.nz/#!zXJBnQxZ!EOEbuxoIjO3Otyv9hxUuDBzLDuuNRbiMEo9-g2hBfAI
Here are the instructions for using it:
1. Confirm the model of your canbus decoder is VW-SS-07.
2. Download the software onto the root content of your sd card and insert it to the unit.
3. Enter Factory Settings and input the code "canupdates" instead of password.
Here's the page I found it on:
http://forum.autopumpkin.com/viewtopic.php?t=13120
-Karl.
Click to expand...
Click to collapse
Thanks, I've pulled the files but not yet looked at them, time has been a strange partner of late
darkspr1te
Hi darkspr1te ,
Useful topic. Congrats!
So, i had a DIY project and got some information about serial protocol between CANbox decoder and China head unit from your topic.
I have a Volvo XC90 and buy from aliexpress head unit for my Volvo, but when it arrives... There is surprise - CAN decoder did not recognize CAN bus. I asked the seller, but he told me "you need to learn yourself how the CANbus integration works".... Тypical China seller....
After that i open this CANbus decoder and found inside STM32L072, great news, because i'm hardware engineer and my primary job is to design PCBs and write firmware.
Since today i have working CAN bus decoder(i wrote my own FW) with following features:
1. Recognize CAN communication between modules in XC90 and parse messages.
2. Send commands via UART to china head unit. Most of functionality works now - steering wheel buttons, gearbox state(P,R,N,D) this is for rear camera, day - night backlight mode, doors and lids state(open-close).
Today spended two hours to play with CAN analyzer in my car and found message that shown steering wheel angle. Do you know how to send this information via UART to head unit?
I found in your topic following - public static final int CH_CMD_STEERING_WHEEL_ANGLE = 0x29;//方向盘转角信息, but i don't know how to transmit the data in the message.