Results 1 to 3 of 3

Thread: Enable HBA on MQB cars with existing A5 camera

  1. #1
    Verified VCDS User hadez16's Avatar
    Join Date
    Jun 2017
    Location
    Germany
    Posts
    612
    Post Thanks / Like

    Enable HBA on MQB cars with existing A5 camera

    Hi Guys,

    I'd like to share an example script for enabling the High Beam Assist on MQB cars that already have the A5 camera.

    Code:
    StartVCDS()
    CheckForUnits("A5",1)
    OpenUnit("A5")
    	TestPartNo("3Q0 980 654",0)
    	ChangeCoding("21:5","")
    CloseUnit()
    OpenUnit("A5")
    	TestPartNo("5Q0 980 653",0)
    	ChangeCoding("2:0","")
    CloseUnit()
    OpenUnit("09")
    	TestAdpChannel("Erweiterte_Fernlichtsteuerung","AFS: Fernlicht ueber AFS",0)
    	LoginToUnit("31347")
    	ChangeAdpChannel("Erweiterte_Fernlichtsteuerung","AFS: FLA: Fernlicht ueber AFS")
    CloseUnit()
    OpenUnit("09")
    	TestAdpChannel("Erweiterte_Fernlichtsteuerung","AFS: BCM-Fernlicht",0)
    	LoginToUnit("31347")
    	ChangeAdpChannel("Erweiterte_Fernlichtsteuerung","AFS: FLA: BCM-Fernlicht")
    CloseUnit()
    OpenUnit("09")
    	TestAdpChannel("Erweiterte_Fernlichtsteuerung","Basis",0)
    	LoginToUnit("31347")
    	ChangeAdpChannel("Erweiterte_Fernlichtsteuerung","Basis: FLA")
    CloseUnit()
    OpenUnit("09")
    	TestAdpChannel("Frontscheibenwischer-Adaptives Nachwischen bei SRA","",0)
    	;this channel ONLY exists in pre-Facelift BCMs
    	ChangeCoding("2:0","") ; Bit 0 sets the HBA setting to the current lighting config
    CloseUnit()
    
    ClearAllDTCs()
    This script supports both A5 camera types and both BCM types (the old ones and the newer ones where everything is done via adaptation).

    Let me explain this a little bit:

    CheckForUnits("A5",1)
    This command tests if unit A5 is installed at all.
    If not, the whole script is cancelled with an error.

    TestPartNo("3Q0 980 654",0)
    At the moment when this command is executed, the control unit is already opened.
    It checks if the part number is the string mentioned.
    If not, the script will skip this whole control unit part and goes to the next control unit block.
    The number "0" after the comma indicates that the block should be skipped. Putting a 1 in it would cause that the whole script exists with an error if the condition is not met.

    TestAdpChannel("Frontscheibenwischer-Adaptives Nachwischen bei SRA","",0)
    What has wipers (wischer) to do with HBA? Nothing.
    This is a little trick to test if we have a pre-Facelift BCM or not as this channel does not exist (to my knowledge) in facelift BCMs.
    It helps to distinguish if the coding steps has to be done like for the pre-Facelift or Facelift.

    ChangeCoding("21:5","")
    A lot of people complained about the syntax of this command, I'll defend this a bit and explain it again
    The first part in quotes is for activation of bits.
    21:5 means "set Bit 5 in Byte 21"
    21:5,7 means "set Bit 5 and Bit 7 in Byte 21
    21:5,7/5:0 means "set Bit 5 and Bit 7 in Byte 21 and set Bit 0 in Byte 5
    and so on...the same with deactivating bits in the second part in quotes.
    Activating and Deactiving can be combined in one command!


    I did not have the chance to check if the names of the adaptation channels are exactly the same in the english version. I think so for the BCM, but I am not sure. The script was initially written for the german version.
    If the channel names and values have a different localization in the english version......go fix it yourself

    My intention was to give a little example about the capabilities and error handling stuff that is possible with the tool.

    Cheers,
    hadez16

  2. #2
    Benevolent Dictator Uwe's Avatar
    Join Date
    Jan 2014
    Location
    Earth
    Posts
    24,190
    Post Thanks / Like
    Blog Entries
    1
    Would it be better to use the channel "descriptors" ("IDEnnnnn" and so on) than the text descriptions? The text descriptions may indeed vary depending on the language version of VCDS, while the descriptors should be the same.

    -Uwe-
    The engineering problems are likely insurmountable. It would be like proposing to land a rocket booster section on a barge floating in the middle of the ocean.

  3. Likes downtime, Bogdan.audi liked this post
  4. #3
    Verified VCDS User hadez16's Avatar
    Join Date
    Jun 2017
    Location
    Germany
    Posts
    612
    Post Thanks / Like
    Hi Uwe,

    one can of course use the channel descriptors as the logic behind just needs a unique match.
    No matter what you search for, Text or ID, it has to be a unique channel match. There are a few words for the logic in the documentation.

    I forgot to mention this in my post above, thank you, important fact.

    Cheers
    Last edited by hadez16; 01-06-2019 at 02:44 PM.

  5. Likes downtime, Uwe, PetrolDave, Bogdan.audi liked this post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •