why does lights flash when in 4WDhi or 4WDlo truck does engage but lights flash on 2003 GMC Envoy

both 2wd and a4wd work fine and lights for these 2 selections go solid like they should.is there some sensor that detects when the truck is in 4wd and where is it located. maybe it is defective

1 answer
have codes scanned with a good sacnner not just an obd11 scanner.then post codes so we can adv