Here's demo tutorial on reading & programming a new BMW CAS4/CAS4+ key with Xhorse VVDI2 by OBD cable step-by-step. Similar procedure goes to CAS4/CAS4+ all keys lost as well (require ISN code).
Model example: BMW 730LD
Requires latest version VVDI2 software (6.6.1 or above)
Launch VVDI2 software, go to BMW function
Connect VVDI2 key programmer with vehicle via OBD cable
Select Key Learn->CAS Key Learn function
Select Car Type: CAS4/CAS4+- F-Series and Get Key Info
Read vehicle information. Follow instructions on the bottom
Prepare dealer key and reset KM require unlock CAS4.
Select Unlock CAS4/CAS4+ function
It takes about 10 minutes. You must provide extra power to car before programming.
(If all keys lost, press brake and open lights to activate communication. )
Unlocking CAS4 in process
CAS4/CAS4+ unlock complete. Now we can make dealer key via OBDII.
Select a unused key position and press Prepare dealer key with programmer.
Here we choose Have a working key. Switch ON ignition with working key and continue. Press Next.
If lost all keys, select Known ISN (need to read ISN code first)
Insert working to ignition switch and press OK
Save security key information
Insert original key to VVDI2 programmer and press OK
Put a new key into VVDI2
Write key success.
Test the new key. No need to write back eeprom.
The new key can start vehicle.
Remote control works as well.