Recreate Particle mobile app BLE setup process?

Hello!

Question: what BLE commands does the particle mobile app send during the setup process?

I've connected to a fresh argon with a BLE tool app, and see several characteristics, but am unsure how to use them properly for setup purposes.

Follow ups:

  1. What BLE command(s) activates the internal boron SIM?
  2. What BLE command(s) activates the ethernet detection feature?
  3. On argons/borons, what is the value stored in the data matrix used for? AKA why does the particle app need to scan it first?

I was about to start BLE sniffing, but I think I'll save that as a last resort haha.

Context:

I'm building a personal automation tool to onboard new argons/borons into an external system. The steps are:

  1. Claim new device
  2. Assign device to product
  3. Do more steps unrelated to particle

The goal is to have a USB hub with several unclaimed (listening) devices plugged into it, all being onboarded at once. I can already do 90% of what I need via the CLI & Web API.

The bottleneck is simply claiming the devices. I'm onboarding 50+ at a time, so the mobile app setup process becomes tedious, as does using setup.particle.io.

Claiming a device is easy with the CLI... but the device has to be online to do so, and then I'm stuck using the mobile app to activate the SIM!

Also for smooth onboarding, since Ethernet is fastest for updating OS or firmware, I can use the CLI to flash a precompiled app that just enables ethernet - but if I can do this via BLE, even better.

You should follow the instructions in Wi-Fi setup options as it describes the protocol, however you should adjust your process slightly:

  • Add all devices to your product immediately. You get a list of Device IDs when you order in tray quantities from the wholesale store. You are not billed until the device connects to the cloud.
  • Don't claim devices. Using unclaimed product devices greatly simplifies the onboarding process.
  • If you really do need to claim devices, if you add the device to your product first you can claim it using the API while offline.
  • It's best to flash your product firmware and Device OS your device over SWD/JTAG or USB before deployment, and you can include enable Ethernet detection there.

The data matrix code contains the serial number, a space, and the mobile secret. The mobile secret used to encrypt the connection between the mobile app and Particle device.

2 Likes

Thanks for your input! Also wow - can't believe I didn't find that article earlier.

I think that gives me all the info I need to accomplish my goal.

Thanks Rick!