sandbox環境に架空オペレータ作成、IoT SIM作成と登録
ステップ 1: Sandbox に架空のオペレーターを作成する
コマンド:
soracom configure-sandbox
レスポンス:
— SORACOM CLI setup (Sandbox) —
This will create a directory /root/.soracom if it does not exist yet and place ‘sandbox.json’ in it.
Please select which coverage type to use.
1. Global
2. Japan
select (1-2) > 1 or 2
Please Specify a pair of AuthKeyID and AuthKey for the production environment to check if you have a valid account on it.
authKeyId: keyId-xx
authKey:secret-xx
Please Specify Email and Password for a sandbox account to be created.
email: hoge@xx.xx
password:xx
コマンド:
soracom operator get –profile sandbox
レスポンス:
root@daeheui:/mnt/c/Users/daehe# soracom operator get –profile sandbox
{
“createDate”: “yyyy-mm-ddThh:mm:ss.sss”,
“email”: “hoge@xx.xx”,
“operatorId”: “xx”,
“updateDate”: “yyyy-mm-ddThh:mm:ss.sss”
}
ステップ 2: 架空の IoT SIM を作成し登録する
コマンド:
soracom sandbox subscribers create –profile sandbox –coverage-type jp \
–body ‘{
“subscription”: “plan-D”
}’
レスポンス:
{
“apn”: “soracom-sandbox.io”,
“iccid”: “xx”,
“imsi”: “xx”,
“ipAddress”: “xx”,
“moduleType”: “micro”,
“msisdn”: “xx”,
“operatorId”: “xx”,
“plan”: 1,
“registrationSecret”: “xx”,
“serialNumber”: “xx”,
“sessionStatus”: {
“online”: 0
},
“simId”: “xx”,
“subscription”: “plan-D”,
“tags”: {},
“type”: “s1.standard”
}
コマンド:
soracom subscribers register –profile sandbox –coverage-type jp \
–imsi xx \
–body ‘{
“registrationSecret”: “xx”
}’
レスポンス:
{
“apn”: “soracom-sandbox.io”,
“createdAt”: xx,
“createdTime”: xx,
“expiredAt”: null,
“expiryAction”: null,
“expiryTime”: null,
“groupId”: null,
“iccid”: “xx”,
“imeiLock”: null,
“imsi”: “xx”,
“ipAddress”: “xx”,
“lastModifiedAt”: xx,
“lastModifiedTime”: xx,
“lastPortMappingCreatedTime”: null,
“moduleType”: “micro”,
“msisdn”: “xx”,
“operatorId”: “xx”,
“packetCaptureSessions”: null,
“plan”: 1,
“registeredTime”: xx,
“serialNumber”: “xx”,
“sessionStatus”: {
“dnsServers”: null,
“imei”: null,
“lastUpdatedAt”: xx,
“location”: null,
“online”: false,
“ueIpAddress”: null
},
“simId”: “xx”,
“speedClass”: “s1.standard”,
“status”: “ready”,
“subscription”: “plan-D”,
“tags”: {},
“terminationEnabled”: false,
“type”: “s1.standard”
}