Skip to content

Instantly share code, notes, and snippets.

@tachesimazzoca
Last active June 21, 2020 03:06
Show Gist options
  • Save tachesimazzoca/538078430ad6d3907eb5e6d15f2cc3b8 to your computer and use it in GitHub Desktop.
Save tachesimazzoca/538078430ad6d3907eb5e6d15f2cc3b8 to your computer and use it in GitHub Desktop.
How to setup Rakuten (LTE) SIM for Surface Go LTE

How to setup Rakuten (LTE) SIM for Surface Go LTE

Motivation

This week, I made a contruct for a nano SIM card of Rakuten Mobile UN-LIMIT.

I tried installing the SIM to my Surface Go LTE, but unfortunatelly the easy first attempt failed.

The cellular connection was recoginzed as NTT DOCOMO (LTE), the attached APN was recoginized as rakuten.jp though.

Adding a new APN to the wrong connection NTT DOCOMO (LTE) always fails with the following error message:

Cellular data is not working properly.

Since I've installed a DoCoMo MVNO SIM to the same Surface Go, I suspected any remaining APN profiles may prevent a service from recognizing Rakuten (LTE).

After doing things described on the following chapters, finally I got a right cellular connection to Rakuten (LTE).

Where APN profiles are stored

The APN profiles are stored here:

  • C:\ProgramData\Microsoft\WwanSvc\Profiles

In my case, the following 2 *.xml files contain the information described as a device provisioned profile for NTT DOCOMO.

<?xml version="1.0"?>
<MBNProfileExt xmlns="http://www.microsoft.com/networking/WWAN/profile/v4">
	<Name>6818162F-C3BA-4FBD-AAC9-C1597B7F4150</Name>
	<Description>mopera U (Xi)</Description>
	<IsDefault>true</IsDefault>
	<ProfileCreationType>DeviceProvisioned</ProfileCreationType>
	...
	<HomeProviderName>NTT DOCOMO</HomeProviderName>
	<ConnectionMode>auto</ConnectionMode>
	<Context>
		<AccessString>mopera.net</AccessString>
		<Compression>DISABLE</Compression>
		<AuthProtocol>NONE</AuthProtocol>
		<IPType>IPv4v6</IPType>
	</Context>
	<PurposeGroups>
		<PurposeGroupGuid>...</PurposeGroupGuid>
	</PurposeGroups>
	<AutoConnectOrder xmlns="http://www.microsoft.com/networking/WWAN/profile/v8">1</AutoConnectOrder>
</MBNProfileExt>
<?xml version="1.0"?>
<MBNProfileExt xmlns="http://www.microsoft.com/networking/WWAN/profile/v4">
	<Name>DD62F728-80F8-49A9-B398-063882E98EDD</Name>
	<Description>mopera U (FOMA定額)</Description>
	<IsDefault>true</IsDefault>
	<ProfileCreationType>DeviceProvisioned</ProfileCreationType>
	...
	<HomeProviderName>NTT DOCOMO</HomeProviderName>
	<ConnectionMode>auto</ConnectionMode>
	<Context>
		<AccessString>mopera.flat.foma.ne.jp</AccessString>
		<Compression>DISABLE</Compression>
		<AuthProtocol>NONE</AuthProtocol>
		<IPType>IPv4v6</IPType>
	</Context>
	<PurposeGroups>
		<PurposeGroupGuid>...</PurposeGroupGuid>
	</PurposeGroups>
	<AutoConnectOrder xmlns="http://www.microsoft.com/networking/WWAN/profile/v8">2</AutoConnectOrder>
</MBNProfileExt>

The each profile ID will be used when removing each APN profile. Keep them to detect default profiles later on.

  • 6818162F-C3BA-4FBD-AAC9-C1597B7F4150
  • DD62F728-80F8-49A9-B398-063882E98EDD

I recommend you make backup files of the Profiles folder contains the whole profile *.xml files.

Don't remove those files manually. Use the netsh mbn command.

netsh mbn

WE can use netsh mbn to query and configure mobile broadband settings and parameters.

netsh mbn show profiles

The APN profiles can be inspected with the netsh mbn show profiles command.

> netsh mbn show profiles

Profiles on interface Cellular:
-------------------------------------
    6818162F-C3BA-4FBD-AAC9-C1597B7F4150
    DD62F728-80F8-49A9-B398-063882E98EDD
    {8ABBF94E-FB16-4D67-8B5F-945DC81F5820}

> netsh mbn show profiles interface="Cellular" name="6818162F-C3BA-4FBD-AAC9-C1597B7F4150"
...

> netsh mbn show profiles interface="Cellular" name="DD62F728-80F8-49A9-B398-063882E98EDD"
...

netsh mbn delete profile

As I checked the profile IDs before, the profiles without brackets {...} must be default APN profiles. The user profiles with brackets should be kept.

In order to remove a profile, use the netsh mb delete profile command.

> netsh mbn delete profile interface="Cellular" name="6818162F-C3BA-4FBD-AAC9-C1597B7F4150"

> netsh mbn delete profile interface="Cellular" name="DD62F728-80F8-49A9-B398-063882E98EDD"

> netsh mbn show profiles

Profiles on interface Cellular:
-------------------------------------
    {8ABBF94E-FB16-4D67-8B5F-945DC81F5820}

Rakuten (LTE)

After removing the wrong default profiles, restart OS Windows 10.

The Rakuten (LTE) will be shown as a cellular connection, or add an APN profile for rakuten.jp

  • Profile name: (any)
  • APN: rakuten.jp
  • Type of sign-in info: None
  • IP Type: IPv4v6

netsh mbn show connection

You can check if the Mobile Network Code (MNC) with netsh mbn show connection.

PS> netsh mbn show connection

Connection information for interface Cellular:
-------------------------------------
    Interface State       : Connected
    Register State        : Home
    Register Mode         : Automatic
    Provider Name         : Rakuten
    Provider Id           : 44053
    Provider Data Class   : LTE
    Number of connections : 1

      Serial number #1
        Connection Id         : 3604
        Access Point Name     : rakuten.jp

PS> ($(netsh mbn show connection interface="Cellular" | Select-String "Provider Id" | Out-String).Trim() -split ": ")[1]
44053
MCC + MNC Provider
44011 Rakuten
44053 KDDI Rakuten Roaming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment