Friday, October 26, 2018

Enable European rear fog light

Coded with BimmerCode and ODBLink MX Bluetooth connector on a Google Pixel 3 smartphone.

Enable Expert Mode in Bimmercode:

FEM_BODY / 3060 LCEMaster 1C / NSL_Verbaut = Verbaut

REM / 3063 LCELampMapping 2 / Mapping_Nebelschlussl_L_output = nsl_l
REM / 3063 LCELampMapping 2 / Mapping_Nebelschlussl_L_Function = nebelschlusslicht
REM / 3063 LCELampMapping 2 / Mapping_Nebelschlussl_R_output = nsl_r
REM / 3063 LCELampMapping 2 / Mapping_Nebelschlussl_R_Function = nebelschlusslicht

Image and information from:
F30 DIY US Headlight Switch Modification for Rear Fog Lights + Coding

Beauty shot

F87 M2 DCT, F30 335i M Sport SAT, E60 535i M Sport 6MT

Sunday, March 11, 2018

Decoding 8S4 and 5AP

In modern US-spec BMW vehicles, two options are decoded / disabled:
8S4 Decoding for variable light distribution (VLD)
5AP Decoding for no-dazzle high-beam assistance, or glare-free high beam assistance (GFHBA)

For vehicles with adaptive front lighting using Bi-Xenon or LED, VLD can be enabled. On a F87 M2 and a F30 335i, the following codes enable VLD:
  3073 LaMaster 1, FC
      C_AFS_ENA = F020_enable

For vehicles with adaptive front lighting using LED and high-beam assistance (required), GFHBA can be enabled. On an F87 M2 and F30 335i, the following codes enable GFHBA:
  3073 LaMaster 1, FC
      C_HBA_ENA = F020_enable

For vehicles with Bi-Xenon additional coding may be required, eg C_HBA_ADAPT_SHUT_ENA.

GFHBA assistance demo video / VLD information.

Tuesday, August 29, 2017

BMW AHL2 / Variable Light Distribution

Adaptive Headlight II (AHL2)

AHL2 was introduced with the E60. It requires Xenon HID or LED headlights. AHL2 varies the light distribution of the low beam.

Engine start
In switch position "A" (light switch in the switch position for automatic driving lights control) and terminal 15 ON, both headlights execute a reference run. That means: Both swivel modules are moved down slightly and then to the desired position (visible when the vehicle is parked in front of a wall: The light cone moves down and then back up). The desired position depends on the load status of the vehicle. When the engine is started, the headlight driver module initially controls the city light distribution.

City light distribution (Town light)
The city light distribution enables a broader illumination of the left roadway at low speeds. The left headlight is moved approximately 12° to the left and approximately 0.7° downwards. The city light distribution is activated from engine start to a driving speed of approximately 50 km/h.

Pertinent Parameter:
C_AFS_C_V_LO defaultwert = 28 (40 km/h, 25 mph)

Country road light distribution (Basic light)
The country road light distribution is the same as the standard low beam headlights. At a driving speed above approximately 50 km/h, the city light distribution is changed to the country road light distribution. Below a driving speed of approximately 50 km/h, the footwell module (FRM) changes the light distribution back to city. The country road light distribution represents the basic setting for the headlights.

Motorway light distribution
The motorway light distribution increases the range of the driving light. The left headlight is moved approximately 3.5° to the left and approximately 0.25° downwards. The right headlight is moved approximately 0.2° upward. If the vehicle speed exceeds 110 km/h for longer than 30 seconds, or if 140 km/h is exceeded, the footwell module switches on the motorway light distribution. If the vehicle speed drops below 110 km/h, the headlights are gradually reset, depending on the driving speed. This takes places in stages (110 km/h 100 km/h 90 km/h 80 km/h). The country road light distribution is activated again at 80 km/h and below.

Pertinent Parameters:
C_AFS_C_V_HI  defaultwert = 8C (140 km/h, 87 mph)
C_AFS_E_V_LO  defaultwert = 6E (110 km/h, 68 mph) (see timer below)
C_AFS_E1_V_LO defaultwert = 64 (100 km/h, 62 mph)
C_AFS_E2_V_LO defaultwert = 5A  (90 km/h, 56 mph)
C_AFS_E3_V_LO defaultwert = 50  (80 km/h, 50 mph)

C_AFS_E_T_MIN defaultwert = 1E (30s)
Comment = Counter Minimum for LightDistribution E

Fog light distribution
The fog light distribution is activated when the fog lights are switched on. The fog light distribution can be combined with the city light distribution and the country road light distribution. The left headlight is moved approximately 8° to the left and approximately 0.7° downwards. If the high beam headlights are switched on while the fog light distribution is active, the headlight moves to the basic setting, i.e. to the country road light distribution.

Pertinent Parameter:
C_AFS_EX_FOG_ENA defaultwert = 01
Comment = Switch to enable or disable motorway light distribution while fog lights are turned on (1 means motorway light distribution enabled).


In the US, vehicle option 8S4 Variable Light Distribution Decoding actually disables (de-code) VLD. Do not remove 8S4 as it may interfere with software update performed by a BMW Center.

Instead, VLD can be simply enabled via coding with NCS Expert or E-Sys (depending on your vehicle chassis.

For my E60, I use NCS Expert and NCS Dummy to enable VLD:
AHL2_ENABLE = aktiv

For the F30, I use E-Sys to enable VLD:
 3073 LaMaster 1, FC
    C_AFS_ENA - F020_enable

I was curious about enabling option 5AC HBA High Beam Assistant since the vehicle appears to have the KaFAS camera. KaFAS is the Camera Assisted Driver Assistance System / Kameraunterst├╝tztes Fahrerassistenzsystem. The KaFAS camera is utilized by the factory installed options:

  • 5AS Active Driving Assistant
  • 5AG Lane change warning / lane departure warning
  • 8TH Speed limit info
However, HBA requires the presence of the HBA switch on the light controller stalk:

Saturday, August 26, 2017

Upgrade the Navigation Map Data for NBT Head Units

BMW NBT head units use the map data type of "Next". This can be confirmed by viewing current map type in the CIC screen. Select Navigation, Options, and scroll to the end of the list and select "Navigation system version".

Acquire the E-Sys software and ENET cable for connection to the OBD2 port on the vehicle.

Use the E-Sys software to download the DE file from the vehicle. Save the file, eg DE.fsc.

Acquire the latest map data, eg Road Map NORTH AMERICA Next 2017-2. Determine the AppID and UpgradeID of the map data. Locate the file named Info_Map.imp in the upgrade media. Identify the AppID and UpgradeID.

Generate the FSC code.

Insert the USB media in the vehicle USB port and follow the onscreen upgrade prompt. The directory structure of the NBT navigation USB Media is used as it, without the need to move folders to the root.

Summary (updated Dec 16 2017):
NBT Map Code:
0xa8 North America Next

NBT Year Code:
0x2b 2017-2
0x2c 2018-1

Additional information for those interested in coding F-Series vehicles:

Thursday, May 18, 2017

Download the 1B File From a BMW E-Series Vehicle Equipped with the CIC

CIC is the Car Information Computer used in certain BMW automobiles. To help identify the CIC, please see information about BMW iDrive.

If your BMW E-series vehicle is equipped with a CIC, you may be able to retrieve the 1B file using an OBD2 ENET adapter. I was able to connect to the CIC on my 2010 BMW E60 using the adapter.


I used an Ethernet switch because I wanted to observe the link and activity status  A crossover Ethernet cable can probably be used in place of the switch, but I have not tried it. For the computer network port, I set it to use an autoconfiguration IPv4 address ( /16 or netmask The ODB2 port autoconfiguration IPv4 address is (ignition must be on).

ftp user/pass pairs to try:
  • files/remote
  • root/Hm83stN
  • root/cic0803
The file to download from the CIC is /HBpersistence/normal/generalPersistencyData_DiagnosticSWTController

I used the HxD file editor to extract and save the 1B file as follows:
  • Open the downloaded file with HxD
  • Search for the Hex-values 01 01 00 1B
  • The value should be located at offset 33A
  • Move the cursor to offset 33A
  • Highlight to the beginning of the file and delete. Acknowledge file-size warning and proceed.
  • Move cursor to row 00000130 and to offset 13F. Highlight to end of file and delete. Acknowledge file-size warning and proceed.
  • Save file using the name a.hex. It should be 319 bytes. This is the 1B file for the vehicle.


Additional information about identifying map code and year code. Use HxD to open the file Info_Map.imp in the map update media. It is located under the folder pkgdb\INFO_MAP_xxxxxxxxxxxxxxx

Summary (updated Dec 16 2017):
CIC Map Code:
0x28 Europe Premium
0x2d North America Premium

CIC Year Code:
0x29 2017-1
0x2d 2018-1

Tuesday, June 7, 2016

Upgrade the Navigation Map Data for CIC Head Units

BMW navigation data update can be performed gradually over an extended period of time during normal vehicle operation, with a set of USB flash drives containing the complete data, and will resume updating after normal vehicle power off. The method described in this blog post is for those who prefer to update the navigation data at one go, which completes in about 40 minutes.

  • Intelligent car battery charger capable of 10A or more.
  • New navigation data on USB flash drive(s).
  • FSC activation code for navigation data update. It is a one-time code specific to the vehicle VIN, navigation system type, and map region / version. Lifetime codes are not authorized by BMW and may have undesirable effect in the future. Use lifetime FSC activation codes at your own risk.
Here is the file structure of a USB flash drive with navigation data, if one is using a single USB flash drive instead of multiple USB flash drives.

Using a computer, one would move pkgdb and config,nfo from the first folder to the root folder and insert the USB flash drive into the vehicle USB port. When prompted, one would remove the USB flash drive from the vehicle and use a computer to move the pkgdb and config.nfo back to the first folder, and move the two files from the second folder to the root folder. Repeat until all data has been copied to the vehicle.

Before starting the navigation data update, connect the car battery charger to the vehicle at 10A or more (eg 12A, 15A). Let it charge for about 10 minutes in case the vehicle battery is too weak or old to maintain 12V without the engine running. Be forewarned that an old or weak battery is detrimental to your vehicle alternator and electronics. You should perform electronic service work only with a vehicle battery that is capable of providing at least 12V.
Car battery charger connected
To begin the update, engage the parking brake for safety, turn the ignition on, but do not start the engine (keep foot off brake or clutch pedal), To conserve vehicle battery energy during navigation data update, turn off DRL, interior light, audio, climate control, and any other accessories.

Insert the USB flash drive into the USB port for data update. It is the USB port in the glove compartment, or in the center console if there isn't one in the glove compartment. Once the USB flash drive is in the correct port, the vehicle will detect that it contains newer navigation data.
USB flash drive with newer navigation data detected

Have the FSC activation code handy. The FSC activation code is alphanumeric, but will not have the numbers 1 (one) or 0 (zero) in order to avoid confusion. Start the update and enter the FSC activation code.
Enter the FSC activation code

Navigation data update in progress
Replace USB flash drive as prompted or follow your navigation data seller's instructions for moving files from the USB flash drive folders to the root directory. Continue to update the navigation data.

It takes about 40 minutes for all navigation data to be copied from the USB flash drive(s) to the CIC. Allow the system to restart. Wait about 5 minutes before verifying the new navigation system version information. To verify, go to Navigation, Map, Option, Navigation system version.
Navigation system version
Remember to re-enable DRL if it was on previously. Turn off ignition. If you wish, you may leave the car battery charger running for an additional 10 minutes to make sure that the battery has enough power to start the engine. Navigation data update is complete.