Hellothis sounds like the car is out of synchronisation with the keytry this processHow to Program Mercedes Remote Keys The transponder chip inside the key must be synchronized to the cars immobiliser (for starting car) to proceed with these steps. 1. Place transmitter key in ignition lock and turn to position 2 2. Extract transmitter key from ignition lock 3. Within 10 seconds: press (close) pushbutton, hold and simultaneously press (open) pushbutton five times one after the other release pushbuttons and then press one of the two pushbuttons once It may also be necessary to synchronize a transmitter key if the battery in the transmitter key has been replaced.
if this doesn't work then I'd suggest try resetting the ECU by disconnecting the battery cables and clamping them together for 10 mins. Remove both battery leads from the battery then use a nut and bolt or G-clamp to hold both battery lead terminals together.This discharges any capacitors / memory within the ECU and around the car so ensures all memory settings are wiped clear - back to the factory default. This will reset all the systems on the car and you may need the radio security code to get it going again, and ensure that the keys are in your hand when you re-connect the battery as the car may lock and turn on the alarmand if that doesn't work then its time to get the dealership involved I'm afraid as onyl they carry the top level diagnostics to re-program keys