API cmd.carrier.select and config.wan.connection succeed but does not switch carrier on BYO eSIM A (firmware 8.5.2)

Hi all,

I’m building a personal app for my MAX BR1 Pro 5G (firmware 8.5.2) and one of the functions is to switch carriers on the BYO eSIM A

Manual carrier selection works perfectly in the web UI (Cellular → Carrier Selection → Manual Select → pick carrier → Save and Close).

However, the same change via API returns stat: “ok” but the active carrier never actually switches. No connection drop occurs and the Peplink UI continues showing the old carrier.

I have tried two approaches:

  1. The documented endpoint: POST /api/cmd.carrier.select with payload containing connId: 2 and selectedCarrier: { mcc, mnc, pcs, name }
  2. The full config update that the UI itself sends: POST /cgi-bin/MANGA/api.cgi with func: “config.wan.connection”, instantActive: true, and the complete eSim1.carrierSelection block

Both calls succeed, but the router does not apply the new carrier.

Has anyone successfully changed the active carrier via API on a BYO eSIM A profile in firmware 8.5.x? Is there a missing cmd.config.apply, a reconnect step, or a special requirement for eSIM profiles that isn’t documented?

Any working examples or hints would be greatly appreciated.

Thank you very much for your assistance and guidance,

Mark

Upgrade to 8.5.3 or later , we have done this.

1 Like

Thank you Jonathan! I’ll grab an update in the morning and give it a shot.

I’m now on 8.5.4 build 6264.

Here is the payload I’m passing with cmd.carrier.select:
{
“connId”: 2,
“simId”: X, // 1 or 2 for physical SIMs ? (3 or 4 “simID invalid”)
“selectedCarrier”: {
“mcc”: “310”,
“mnc”: “410”,
“pcs”: 1,
“name”: “AT&T”
}
}

If I do not pass a simID or use a letter, I receive :code: 999, message: ‘Unsupported SIM card type’

What simID are you passing for a BYO eSIM and are you using the cmd.carrier.select endpoint?

Very much appreciated,

Mark

I had to go back and dig thru my code, it’s been a min.
We did not use cmd.carrier.select to identify a BYO eSIM by simId.

In the 8.5.2 API doc, POST /api/cmd.carrier.select only documents simId values 1 or 2, which lines up with the simId invalid result you saw when trying 3 or 4:

What worked on my side was treating the BYO eSIM slots through POST /api/config.wan.connection instead. On the devices I tested, BYO A showed up as eSim1 and BYO B as eSim2 in the cellular config payloads. I do not see eSim1 / eSim2 explicitly documented in that PDF, so that mapping came from inspecting live payloads rather than from the published enum list. Note I didn’t test setting this, without an actual populated esim profile.

For example, to force BYO A active, I used the cellular scheme update path and enabled only eSim1:

{ "instantActive": true, "action": "update", "list": [ { "id": 2, "cellular": { "scheme": { "type": "custom", "detail": { "1": { "enable": false }, "2": { "enable": false }, "remoteSim": { "enable": false }, "fusionSim": { "enable": false }, "speedfusionConnect5gLte": { "enable": false }, "eSim1": { "enable": true }, "eSim2": { "enable": false } } } } } ] }

So short version:

  • cmd.carrier.select: documented simId is only 1 or 2
  • BYO A / BYO B: on my unit these appeared as eSim1 / eSim2
  • To switch the active BYO eSIM, I used POST /api/config.wan.connection, not cmd.carrier.select
1 Like

That was it! Thank you very much for taking time to help me. I owe you a minimum of a cup of coffee.

2 Likes