Unhappy [Q] DM initialization in not ready. Check network or sim card

Hi, I have a galaxy S4 active, it is original from AT&T but I was using it with tmobile, it is not rooted, today stopped detecting the SIM card, so I dialed *#9090# it shows the servicemode screen, it had a list of options and I accidentally press the first one which I do not know what was it for, the phone rebooted and now when I go into the servicemode screen it does not show any option, I do not know what I did to the phone, I connected to wifi and try to update the software but it shows the message "DM initialization is not ready. Check network or SIM card" please I need some help!!!