How to Fix “Connection Problem or Invalid MMI Code”

The “Connection problem or invalid MMI code” message means your phone couldn’t run a dialer code, such as *#06#, *#21#, or a carrier balance code. Most of the time the fix is to retype the code exactly, send it from the right SIM, toggle airplane mode, or turn the phone off and on again. If the message keeps coming back for one code only, that code probably isn’t supported by your carrier or plan.

These fixes are for Android phones, with Settings paths for Google Pixel phones on Android 16 and Android 17 and Samsung Galaxy phones on One UI 8 or later. Other Android brands have the same settings under slightly different names, and older Android versions use similar menus.

What an MMI Code Is

MMI stands for Man-Machine Interface. It’s the name for the short codes you type into the phone’s dialer that start with * or # and usually end with #. They fall into two groups:

  • Phone codes run on the handset itself. *#06#, which shows your IMEI number, is the best-known one.
  • Carrier codes (also called USSD codes, for Unstructured Supplementary Service Data) are sent to your mobile network. These check a prepaid balance, turn call forwarding on or off, or show your data usage.

The error appears when a phone code isn’t recognized or when a carrier code can’t reach the network or isn’t accepted there. Your normal calls and texts often still work fine.

A quick test tells you which side the problem is on. Dial *#06#. If your IMEI appears, the dialer works and the problem is between your phone and the carrier, so start with Fixes 2, 3 and 6. If even *#06# fails, start with Fixes 1, 4 and 8.

Fix 1: Retype the Code Exactly

Connection problem or invalid MMI code message in the Android Phone app
The error appears when a dialer code can’t run.

A single wrong character is the most common cause.

  1. Open the Phone app and tap the keypad icon (called Dialpad in Phone by Google and Keypad on Galaxy phones).
  2. Clear anything already in the number field.
  3. Type the code exactly as your carrier or phone maker lists it, including every * and #. Most carrier codes end with #.
  4. Tap the green Call button. Phone codes like *#06# run as soon as you type the last character, without pressing Call.

Get the code from your carrier’s own website or app. Codes shared online are often for a different carrier or country and won’t work on yours. If the code is something like *#21# for call forwarding, a US carrier may use a different format. For example, the steps for call forwarding on an iPhone use a settings menu route that avoids codes entirely.

A common tip online is that a carrier code goes through when you add a comma at the very end (long-press * on the keypad to type it). Google and Samsung don’t document this, and it often changes nothing, but it’s harmless to try once before moving on.

Fix 2: Send It From the Right SIM

On a dual-SIM phone, or one with both a physical SIM and an eSIM, the code has to go out on the line that belongs to the carrier you’re asking. A balance code sent through the wrong line gets rejected.

  • When you tap Call, the phone may ask which SIM to use. Pick the carrier the code belongs to.
  • Pixel: Go to Settings > Network & internet > SIMs, tap the carrier, and check that Use SIM is turned on. To choose a line for each call, go back to SIMs, tap Calls, and pick Ask every time.
Pixel SIM settings with the Use SIM switch turned on
Make sure the SIM you’re dialing from is turned on.
  • Galaxy: Go to Settings > Connections > SIM manager. Check that the SIM is turned on. Under Calls, choose the option that asks you each time (labeled Ask always or Ask every time, depending on the model), so you can pick a line for every code.
Samsung Galaxy SIM manager with Calls set to Ask always
Ask always lets you pick the SIM for each code.

If the code still fails, turn off the SIM you aren’t using with the same switch, dial the code again, and then turn that SIM back on.

Fix 3: Toggle Airplane Mode

This forces the phone to reconnect to the mobile network, which clears a lot of short-lived connection errors.

  1. Swipe down from the top of the screen to open Quick Settings.
  2. Tap Airplane mode to turn it on.
  3. Wait about 15 seconds, then tap it again to turn it off.
  4. Wait until signal bars return, then dial the code again.

Fix 4: Turn the Phone Off and On

Google recommends a full power-off rather than the quick Restart option when the network misbehaves. On a Pixel, press and hold the power and volume up buttons, tap Power off, wait 30 seconds, and turn the phone back on. On a Galaxy, open the power menu the same way or from Quick Settings and tap Power off. Try the code once the signal bars come back.

Fix 5: Check Your Signal and Wi-Fi Calling

Carrier codes travel over the cellular network. If you have weak or no cell signal, or you’re relying on Wi-Fi calling, they can fail even though calls still work.

  1. Turn off Wi-Fi so the phone uses only the cell network.
  2. Turn off Wi-Fi calling for a moment. On a Pixel, go to Settings > Network & internet > SIMs > Wi-Fi calling and turn off Use Wi-Fi calling. On a Galaxy, search Settings for Wi-Fi calling.
  3. Check the signal bars in the status bar. If they’re low, move near a window or outside.
  4. Dial the code again, then turn Wi-Fi calling back on if you use it.

If the phone shows no service at all, that’s a broader problem. Start with the Wi-Fi calling setting, which often causes it, as shown in fixing an Android SIM that’s out of service.

Fix 6: Check the Network Mode

Some carriers handle certain codes better on their recommended network setting. If you changed it in the past, set it back.

  • Pixel: Settings > Network & internet > SIMs, tap the carrier, then Preferred network type. Choose the 5G option where your carrier offers it.
  • Galaxy: Settings > Connections > Mobile networks > Network mode, then choose the automatic option at the top (such as 5G/LTE/3G/2G (auto connect)).

Fix 7: Set the Date and Time Automatically

A clock that’s set by hand and drifts away from the network’s time can upset the phone’s connection to the carrier. Letting the network set it removes that variable.

  • Pixel: Go to Settings > System > Date & time and turn on Set time automatically.
  • Galaxy: Go to Settings > General management > Date and time and turn on Automatic date and time.

Fix 8: Clear the Phone App’s Cache

A corrupted cache in the dialer can stop codes from being read correctly, especially after an update. Clearing the cache doesn’t delete contacts or call history.

  1. Open Settings > Apps. On a Pixel, tap See all apps if the Phone app isn’t listed.
  2. Tap Phone.
  3. Tap Storage & cache (Pixel) or Storage (Galaxy), then tap Clear cache.
  4. Open the Phone app and dial the code again.

Avoid Clear storage or Clear data unless the cache didn’t help. Clearing the Phone app’s data removes your recent calls list. The difference between the two is explained in clearing cache on Android.

Fix 9: Test in Safe Mode

A third-party dialer, call blocker or calling app can interfere with codes. Safe mode starts the phone with only its built-in apps, so you can see whether one of them is the cause.

  1. Open the power menu (on a Pixel, press power and volume up together).
  2. Touch and hold Power off until the safe mode prompt appears, then tap OK (Pixel) or Safe mode (Galaxy). Safe mode appears at the bottom of the screen.
  3. Dial the code. If it works now, an app you installed is the likely cause. Uninstall recent apps one at a time and test after each.
  4. Turn the phone off and on again to leave safe mode.

Safe mode can remove some Home screen widgets, so take a screenshot of your Home screen first if you want to put them back.

Fix 10: Ask Your Carrier If the Code Is Supported

If every fix above fails and only this one code is affected, the code most likely isn’t active on your line. That’s common when:

  • You’re roaming in another country. Many balance and forwarding codes only work on your home network.
  • Your plan doesn’t include the feature, like call forwarding or a prepaid balance check.
  • The carrier changed or retired the code. Some carriers are dropping older codes as their networks move to newer voice technology.

Contact your carrier, give them the exact code and error, and ask whether the feature is turned on for your line. Most carriers also show the same information (balance, usage, forwarding) in their app or account website, which skips the code entirely.

If Calls and Texts Also Fail

When you can’t make normal calls either, the code isn’t the problem. Work through these in order:

  1. Check that the SIM is active (see Fix 2) and that airplane mode is off.
  2. Remove the SIM tray, wipe the card with a soft dry cloth, check it for damage, and reinsert it. If the card is damaged, your carrier can replace it.
  3. Update the phone: Settings > System > System update on a Pixel, or Settings > Software update > Download and install on a Galaxy.
  4. Reset mobile network settings. On a Pixel, go to Settings > System > Reset options > Reset mobile network settings. On a Galaxy, go to Settings > General management > Reset > Reset mobile network settings, then tap Reset settings. This clears network preferences but doesn’t delete your photos, apps or contacts. See Google’s Pixel connectivity help and Samsung’s call troubleshooting page for the full lists.
  5. If none of that helps, call your carrier from another phone. Your account may be inactive or there may be an outage.

Before you reset anything, check what each option clears when you reset network settings on Android.

A factory reset is the very last step, and it erases everything on the phone. Back up first, and only try it after your carrier has confirmed the line and SIM are fine. The backup is covered in the steps for an Android factory reset.

For other call problems, try the fixes for when an Android phone won’t make calls.

How to Tell It’s Fixed

A phone code like *#06# shows its result on screen right away. A carrier code usually shows a pop-up with your balance or a confirmation such as “Call forwarding activated,” or a short menu from the carrier. If you see that instead of the error, the code went through.

MMI Code Questions

Does “invalid MMI code” mean my phone is broken?

No. It only means one code didn’t work. If you can make a regular call and send a text, your phone and SIM are working.

Why does *#06# show “invalid MMI code”?

That code should work on almost every phone, so first make sure you typed it into the keypad of the built-in Phone app and not a messaging or third-party dialer app. If it still fails, you can find the IMEI in Settings > About phone instead, as shown in finding a phone’s IMEI number.

Should I use the testing menu codes I found online?

No. Codes that open hidden testing or service menus aren’t part of Google’s or Samsung’s troubleshooting steps, and changing settings there can break your connection. Stick to the fixes above and your carrier’s help.

Can I use carrier codes while traveling abroad?

Often not. Many carriers only accept balance, data and forwarding codes on their home network. Use the carrier’s app or website while you’re roaming.

Will resetting network settings delete anything?

It removes saved network preferences, and the separate Bluetooth and Wi-Fi reset deletes saved Wi-Fi networks. Your photos, apps, contacts and messages stay on the phone.

If the code works again, save your carrier’s official code list in your notes so you don’t have to rely on copies you find online.