Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/kigen esim manufacturing #775

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0bcec83
Add esim provision command
keeramis Nov 19, 2024
4a06a58
Add bulk provision command
keeramis Nov 19, 2024
3e7ebab
Refactor
keeramis Nov 19, 2024
12fc05f
Read profiles from the device after provisioning
keeramis Nov 19, 2024
212a18b
Change the led color per the download process
keeramis Nov 20, 2024
0a78ce1
[WIP] Refactor per new json structures. Collect logs along the proces…
keeramis Nov 20, 2024
e2392e6
[WIP] Refactor doDownload per the new json output
keeramis Nov 20, 2024
48990b4
[temp]
keeramis Nov 21, 2024
7fd3ac1
Bulk provision with the new output JSON format works
keeramis Nov 21, 2024
07080d9
Clean up
keeramis Nov 21, 2024
25c8d54
Use control requests to check for AT-OK
keeramis Nov 23, 2024
c538706
Remove using serial monitor
keeramis Nov 25, 2024
ccbbd68
Add a hard delay after flashing Fix logging
keeramis Nov 25, 2024
1635395
Update readme
keeramis Nov 25, 2024
fde02e9
Add binary option
keeramis Nov 26, 2024
1863ded
Refactor
keeramis Nov 26, 2024
8bb3704
Lint fixes
keeramis Nov 26, 2024
ac886ad
Store logs in separate json files for each device
keeramis Nov 26, 2024
e3f0625
Provision the device(s) with the next available provisioning data blo…
keeramis Nov 26, 2024
0587950
Simplify getProfiles
keeramis Nov 26, 2024
82f495d
minor
keeramis Nov 27, 2024
2551c5f
Modify output json content to have steps
keeramis Nov 27, 2024
a47850b
Add new formats for the input and output jsons
keeramis Nov 27, 2024
1e581fa
Handle test ICCIDs. Do not error if test ICCIDs are present
keeramis Nov 27, 2024
b3bd97d
lint fix
keeramis Dec 2, 2024
bd20b9b
3.30.0
keeramis Dec 2, 2024
4418a82
Fix help tests
keeramis Dec 2, 2024
b455736
3.30.1
keeramis Dec 2, 2024
3aace98
fix e2e tests
keeramis Dec 2, 2024
3c25c26
3.30.2
keeramis Dec 2, 2024
b3a5e40
Fix at-ok checks
keeramis Dec 3, 2024
7d07af1
Lint fix
keeramis Dec 3, 2024
d541648
3.30.3
keeramis Dec 3, 2024
6b67442
Update readme for esim
keeramis Dec 3, 2024
8c27bf4
Fix iccid matching
keeramis Dec 10, 2024
ad7ffad
3.30.4
keeramis Dec 13, 2024
7fe5b05
Edit readme for esim provision
keeramis Dec 18, 2024
b7c31d8
Fix listing profiles on Windows
keeramis Dec 19, 2024
e6aee70
3.31.0
keeramis Dec 19, 2024
6878622
Enable profile after manufacturing
keeramis Dec 27, 2024
3e5fc02
Enable twilio or first available profile after download
keeramis Dec 27, 2024
575d3d7
Lint fix
keeramis Dec 27, 2024
c122594
3.32.0
keeramis Dec 27, 2024
9ec94fe
Do not provision devices with existing valid profiles
keeramis Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

# 3.32.0 - Dec 18 2024
* Add manufacturing tool to provision Kigen eSIMs + enable profile after dowload

# 3.31.0 - Dec 18 2024
* Add manufacturing tool to provision Kigen eSIMs + fixes

# 3.30.3 - Dec 1 2024
* Add manufacturing tool to provision Kigen eSIMs + fixes

# 3.30.3 - Dec 1 2024
* Add manufacturing tool to provision Kigen eSIMs + minor fix to e2e tests + fix for at-ok checks

# 3.30.2 - Dec 1 2024
* Add manufacturing tool to provision Kigen eSIMs + minor fix to e2e tests

# 3.30.1 - Dec 1 2024
* Add manufacturing tool to provision Kigen eSIMs + minor fix to e2e tests

# 3.30.0 - Dec 1 2024
* Add manufacturing tool to provision Kigen eSIMs

# 3.29.0 - Oct 17 2024
* Add `particle binary list-assets` and `particle binary strip-assets`

Expand Down
70 changes: 70 additions & 0 deletions ESIM_PROVISION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Provision a blank eSIM

### Pre-req

1. Input JSON (A JSON file that has a list of EIDs and their respective RSP URLs)
2. Output (Folder where output logs will be stored. Defaults to `esim_loading_logs` if not set)
3. lpa tool (lpa tool binary - differently built for mac and windows)
4. binaries (Folder with the user binaries)

## Setup

### Local folder setup on computer

Put your files in this structure (for example)

```
/kigen-resources
├── /binaries
│ ├── esim-firmware-b5som.bin
│ ├── esim-firmware-msom.bin
├── input.json
├── custom_output_folder/
├── lpa
│ ├── mac
│ ├── ├── lpa
│ ├── windows
│ ├── ├── lpa.exe
```

### Particle CLI points to Staging
```
$ particle update-cli --disable-updates
Automatic update checks are now disabled

$ export PARTICLE_MANIFEST_HOST=binaries.staging.particle.io

$ particle update-cli --version 3.30.4
Updating the CLI to 3.30.4
Automatic update checks are now disabled
CLI updated successfully

$ particle --version
3.30.4

$
```

### Device Setup

1. Connect your device(s) to the computer
2. Run this command
```
particle.js esim provision --input /path/to/input.json --lpa /path/to/lpa-tool --binaries /path/to/binaries --bulk true
```

### Expected Outcome
First, the device(s) are flashed. Once the download process starts on a given device, device will turn its LED into yellow. If the download worked, LED turns green. If the download failed, LED turns red.

### After testing

Return to using particle-cli for production
```
$ export PARTICLE_MANIFEST_HOST=binaries.particle.io
$ particle update-cli --enable-updates
$ particle update-cli
$ particle --version
```

### Notes and Warnings
1.
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "particle-cli",
"description": "Simple Node commandline application for working with your Particle devices and using the Particle Cloud",
"version": "3.29.0",
"version": "3.32.0",
"author": "David Middlecamp",
"bin": {
"particle": "./src/index.js"
Expand Down
46 changes: 46 additions & 0 deletions src/cli/esim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const unindent = require('../lib/unindent');

module.exports = ({ commandProcessor, root }) => {
const esim = commandProcessor.createCategory(root, 'esim', 'Download eSIM profiles (INTERNAL ONLY)');

commandProcessor.createCommand(esim, 'provision', 'Provisions eSIM profiles on a device', {
options: Object.assign({
'lpa': {
description: 'Provide the LPA tool path'
},
'input': {
description: 'Provide the input json file path'
},
'output': {
description: 'Provide the output folder path'
},
'binary': {
description: 'Provide the path to the binaries'
},
'bulk': {
description: 'Provision multiple devices'
}
}),
handler: (args) => {
const ESimCommands = require('../cmd/esim');
if (args.bulk) {
return new ESimCommands().bulkProvisionCommand(args);
} else {
return new ESimCommands().provisionCommand(args);
}
},
examples: {
'$0 $command': 'TBD'
},
epilogue: unindent(`
The JSON file should look like this:
{
"TBD": "TBD"
}

TBD TBD
`)
});
return esim;
};

2 changes: 2 additions & 0 deletions src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const bundle = require('./bundle');
const cloud = require('./cloud');
const config = require('./config');
const doctor = require('./doctor');
const esim = require('./esim');
const protection = require('./device-protection');
const flash = require('./flash');
const func = require('./function');
Expand Down Expand Up @@ -50,6 +51,7 @@ module.exports = function registerAllCommands(context) {
cloud(context);
config(context);
doctor(context);
esim(context);
protection(context);
flash(context);
func(context);
Expand Down
Loading
Loading