tomaskovacik / vwcdavr Goto Github PK
View Code? Open in Web Editor NEWAVR alternative to vwcdpic HW+SW
AVR alternative to vwcdpic HW+SW
Hi there,
at first a really big commendation for your work.
Since a few hours I am trying to understand the cdc_arduino_ported_k9spud_vwcdpic programm.
I use the arduino nano right now. By simple copy and paste the program into the Arduino IDE and check it the compiler says:
`C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic\cdc_arduino_ported_k9spud_vwcdpic.ino:361:13: warning: 'void ScanCommandBytes()' used but never defined
static void ScanCommandBytes(void);
^~~~~~~~~~~~~~~~
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic\cdc_arduino_ported_k9spud_vwcdpic.ino:382:13: warning: 'void SendPacket()' used but never defined
static void SendPacket(void);
^~~~~~~~~~
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic\cdc_arduino_ported_k9spud_vwcdpic.ino:375:13: warning: 'void EnqueueString(const uint8_t*)' used but never defined
static void EnqueueString(const uint8_t *addr PROGMEM);
^~~~~~~~~~~~~
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic\cdc_arduino_ported_k9spud_vwcdpic.ino:365:13: warning: 'void SetStateIdle()' used but never defined
static void SetStateIdle(void);
^~~~~~~~~~~~
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic\cdc_arduino_ported_k9spud_vwcdpic.ino:377:13: warning: 'void ResetTime()' used but never defined
static void ResetTime(void);
^~~~~~~~~
Compiling libraries...
Compiling core...
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:455: undefined reference to `ResetTime()'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:456: undefined reference to `SetStateIdle()'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:458: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:459: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:460: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:461: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:480: undefined reference to `SendPacket()'
C:\Users\Johannes\AppData\Local\Temp\cchlkGFH.ltrans0.ltrans.o: In function `CDC_Protocol':
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:832: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:838: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:842: undefined reference to `ScanCommandBytes()'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:799: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:800: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Johannes\Documents\Arduino\vag_cdcFaker\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:801: undefined reference to `EnqueueString(unsigned char const*)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error at compyling.`
Those are the most important things I think. Because i'm relativ new to Ardunio I'm out whats wrong there. In C# I would think that the variable is not definied, but that should already happend, or? And the second part should be a consequential error.
What do you think?
Thank you very much and greetings,
DaMusikant
Does not work with Arduino nano(Atmega328) and Skoda Fabia Symphony.
I see data comming from head unit but on display it is "No CD Changer".
cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers use 100us timing, and its not stopping while void OutputPacket(void) is outputing packet
Hello,
at the beginning I would like to appreciate your work with VW CDC projects.
I am going to build complete CDC Emulator for VW Gamma IV with aux + bluetooth input for myself. I have been digging in your repositories for a bit.
I was going to use one of these projects, but I am not so sure if they are up-to-date (I also found it difficult to buy s3860m-s)
Would you mind answering a few questions?
Thanks in advance!
Hello, Tomas!
Nice work!
I've successfully flashed arduino pro mini and now have an AUX in my vw sony gamma 5.
I've purchased XS-3868 board and would like to use it in my system. But unfortunately, I can't figure out, which pins of XS-3868 should be connected to arduino board. Can you point me?
Thanks!
I've hooked up an Uno to my RCD 200. Everything seems to work okay (bit glitchy, but restarting radio + arduino usually does the trick).
To debug this I hooked up the serial monitor and it got spammed with dataerr
messages.
Like so:
AudAudi Concert I Multimedia Gateway Ver.1.0c
RING
LIST2
80dataerr
Audi Concert I Multimedia Gateway Ver.1.0c
NEXT
LIST1
LIST2
dataerr
80Audi Concert I Multimedia Gateway Ver.1.0c
Audi Concert I Multimedia Gateway Ver.1.0c
Audi Concert I Multimedia Gateway Ver.1.0c
Audi Concert I Multimedia Gateway Ver.1.0c
LIST1
Audi Concert I Multimedia Gateway Ver.1.0c
LIST3
5300000000dataerr
LIST4
dataerr
80LIST5
400000dataerr
0000dataerr
Is this an actual error, or somewhat expected?
From the code the dataerr
indicated a framing type data error, and also that "This should never happen on normal head unit sending 32 bit command strings with error free data".
I can't quite debug where the (seemingly) random numbers come from (80
, 5300000000
, 400000
, etc). I.e. I can't find where in the code they are put into the txbuffer, via EnqueueString
or otherwise.
Any ideas?
Ps. The CD / track buttons DO change the cd and track accordingly (cd1 - cd6 and TR01 - TR99).
Pps. Only thing hooked up are CLC, DATA_IN, DATA_OUT and ground. So without audio (Audio did work in a previous test, as long as the radio is in playing state, and I don't press buttons too quickly. If I do the radio stops playing).
EDIT:
I'm using the cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers
version, I don't know if this matters
if TP (traffic info) is played while cdc-hanger emu is used, emu did not send proper response and whole system stop working at least on audi concert1 unit
command send from radio is 0x30, without proper handling radio send 0x30 over and over ...
on real changer I investigate proper behavior, sending 0x30 paused playing, sending 0xE4 enable playback
6977FF6DFFE79E34 CD: 77 track: FF min: 6D sek: FF mode: E7
D277FF6DFFE79E14 CD: 77 track: FF min: 6D sek: FF mode: E7
A577FF6DFFE79E14 CD: 77 track: FF min: 6D sek: FF mode: E7
4B77FF6DFFE79E1C CD: 77 track: FF min: 6D sek: FF mode: E7
34BEEFFEDBFFCF3C CD: BE track: EF min: FE sek: DB mode: FF
34BEEFFEDAFFCF3C CD: BE track: EF min: FE sek: DA mode: FF
34BEEFFED9FFCF3C CD: BE track: EF min: FE sek: D9 mode: FF
34BEEFFED8FFCF3C CD: BE track: EF min: FE sek: D8 mode: FF
34BEEFFED7FFCF3C CD: BE track: EF min: FE sek: D7 mode: FF
34BEEFFED6FFCF3C CD: BE track: EF min: FE sek: D6 mode: FF
Hi,
you already helped me lot but I'm again stuck in the middle of the code.
The problem is, that the Arduino is sending some messages that are not encodible. Every third message I got a "007904FB" if I am in CD Changer mode with my radio and "007901FE" if I am not in CD Changer mode.
If I press down the button to go into CD Changer mode I got
MENABLE007904FBMENABLE007904FBMENABLEMENABLE007904FBMENABLE
I think those are current status updates. But the problem is that they are also going in between the main messages like 007904FBLIST2
For my purpose I don't need those messages but I didn't found any possibility to disable them.
Can you help me?
Thank you and greetings
I successfully compiled, uploaded and connected the arduino to audi symphony 2. It recognizes cdc1 track1 00:00 but does not emit sound from aux nor does it have play option. Is there sething I am missing?
Hi and thank you for your quick response. On my previous attempt I was using an outdated version of the Arduino IDE so I updated to 1.8.5 and now I'm getting the following error messages. This is for the cdc_arduino_ported_k9spud_vwcdpic.ino file.
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"
C:\Users\WINDOW~1\AppData\Local\Temp\ccbR9Kq2.ltrans0.ltrans.o: In function `Init_VWCDC':
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:802: undefined reference to `ResetTime()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:804: undefined reference to `SetStateIdleThenPlay()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:813: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:815: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:817: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:819: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:856: undefined reference to `SendPacket()'
C:\Users\WINDOW~1\AppData\Local\Temp\ccbR9Kq2.ltrans0.ltrans.o: In function `main':
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:2156: undefined reference to `SetStateIdle()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:2183: undefined reference to `SetStatePlay()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:2190: undefined reference to `SetStateIdle()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:2206: undefined reference to `ResetTime()'
C:\Users\WINDOW~1\AppData\Local\Temp\ccbR9Kq2.ltrans0.ltrans.o: In function `CDC_Protocol':
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1438: undefined reference to `SendPacket()'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1469: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1471: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1473: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1529: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1539: undefined reference to `EnqueueString(unsigned char const*)'
C:\Users\Windows7HD\Documents\cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino:1545: undefined reference to `ScanCommandBytes()'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Use timer probably 8bit one is fine, to tick and just increment variables
Based on dataout pin level set dataoutPinLevel to 1 or 0 , in timer isr based on value of this var increment dataoutHighCount or dataoutLowCount variables.
Increment count variable for 50ms flag (seconds ticking)
Increment variable for counting between bytes or between packets
Also will be nice if sending out bits will be timed by this counter, so 50us is probably best, bit timing is currently 40us so 50us is fine, clk value should be stored in a variable( or we can read port bit, no?) And if we each tick simply invert it we have clock, then when this is low we can set dataline and leave timer isr, if next time timer isr is fired and we flip clock pin bit value ( so level) and it is high we simply did not change dataline pin bit value and leave isr.
Ok so I have been messing with the headphone jack on my galaxy s7 edge and I found that I can control the NEXT PREV PLAY/PAUSE functions with just shorting the the MIC ring to the GND ring.
Simulating Button Clicks (shorting to GND)
1 click = play/pause
2 quick clicks = NEXT track
3 quick clicks = PREV track
A 680ohm resistor to gnd simulates pressing the volume down key. ( Media if playing music, Ringtone volume if not playing music)
I have yet to find what other resistance values will do. I will try to incorporate these functions using a HEF4066 switch. Hopefully,
My question is. How can I take the command from the Head Unit buttons and have the arduino interpret them into IO functions?
Is this already included in your code?
Hi, I want to make your protek for my car with the bt F6188 module, but I can't open KiCad files
I keep getting an error message of "PB0 was not declared in this scope." I am using an Arduino Uno and Arduino IDE I'm at a loss as to what the issue may be. Please Help.
Hi,
I can not simulate a CDC using the "cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers" version. On the serial monitor I got only the welcome text and the radio says " No CDC". The other version works fine, tested with atmega328.
Tried to slap Clk and Data in, but still no result.
Hey!
I have a question,
Is there a possibility to get prev/next commands from the head unit and multi steering next/prev track signals pass to CDC emulators?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.