I’ve got a decent skeleton going in C all the way up to going into 4x mode and sending data to module via vpw mode 36. That’s when I’m having trouble.
First one is that it seems to after sending 0xC1 0x01 to enter 4x it shifts the data read back by 2-4 bytes but is inconsistent meningitis it a real bare to predict what position the read content is in … how to deal with this?
Seems like I can’t send more than ox0f bytes at a time? Max avt len? Then how to send longer messages?
C program for avt 852. Serial cable
- antus
- Site Admin
- Posts: 8988
- Joined: Sat Feb 28, 2009 8:34 pm
- cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B - Contact:
Re: C program for avt 852. Serial cable
Nah... have a look at how pcmhammer does it in the public repository. You usually would want to configure filters and have a function that reads the first byte, then the second and makes decisions about what format the packet is and how many bytes to inspect, as well as sensible error handling incase something crashes mid-transmit on the bus. You can even use the whole library but note that its GPL and that will require that you open source your app under the same license if you go this way. Its C#, not C, though.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
-
- Posts: 469
- Joined: Thu Jan 16, 2014 12:41 pm
- cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion
Re: C program for avt 852. Serial cable
Got it it’s 12 in front to send larger blocks.