This article is about Blynk.Inject™️ – a framework for device provisioning that includes Firmware API and a Mobile Connection Wizard to simplify life for your customers when getting device online and for you, as a manufacturer (or developer).

Dynamic Auth Token Provisioning

Dynamic Auth Token Provisioning is used for devices that can connect to the Internet over WiFi and can act as an WiFi Access Point (AP). For example: ESP8266 or ESP32. 

Major advantage of Dynamic Auth Token Provisioning is that you don't have to flash Auth Token to every device before it's delivered to your customers. Which means that you can use same firmware on every device while all the provisioning processes is handled by Blynk.Inject™️.

Blynk.Inject™️ Firmware API covers:

  • connection management
  • obtaining Auth Token from the server
  • status indication of hardware state (AP, connecting, connected, error, etc)
  • credentials storage
  • credentials reset 

How Blynk.Inject works for your customers

Experience starts when your customer unboxes your product and turn it on for the first time. They would also need your app installed on their smartphones. 

  • Product automatically switches into a WiFi Access Point (AP) mode and starts broadcasting its' own WiFi network. This state is indicated with an LED color and animation (or you can provide your own indication)
  • User opens your app and follows the Connection Wizard UI which guides them through the steps to connect the product to their WiFi network.

Connection Wizard UI example

All the steps of Connection Wizard are pre-designed for you. You can customize product icons, provide your own instructions and translate them to a different language.

This wizard was extensively tested for usability and connectivity failures and provides 99.9% reliability.
Wizard is included in every app
made with Blynk

NOTE: Due to differences with WiFi connection management on Android and iOS, Connection Wizard has different UI on these operating systems

  • Your customers will choose the WiFi network they want to connect the product to (for example, their home WiFi network) and input password.
  • Then they will connect their smartphones to the WiFi network your product broadcasts

After that Device Provisioning starts:

  1. Your app passes WiFi credentials (SSID and password) to the device
  2. Your app requests a new Auth Token from the server and passes it to the device
  3. Credentials and Auth Token is stored in the device's memory (EEPROM)
  4. Device automatically reboots itself
  5. Device uses the stored WiFi credentials to connect to the user's WiFi network. It no longer acts as an Access Point.
  6. Device uses the stored Auth Token to connect to Blynk Cloud
  7. New Device appears in the app and is ready to be used


Here is a couple of examples on how Blynk.Inject™️ works with real products that run on Blynk: Plaato and CamaCooler


How to integrate Blynk.Inject™️ and Dynamic Auth Token Provisioning with your product. 

Check the Demo App: myPlant 

  1. Download demo app from Google Play or from App Store
  2. Follow this guide to learn how hardware should be set up 

Use App Preview in Blynk App

  1. Download Blynk app for iOS or Android
  2. Go to Home Screen ->  My Apps -> Create New App
  3. Follow the instructions in the app to create App Preview
  4. Firmware and code templates can be found here.
  5. Check comments in Settings.h  to configure various parameters
  6. Flash your hardware with the firmware
  7. Go to Blynk app - My Apps - Your app - Press Play Icon

You will be able to experience Connection Wizard your customers would go through and connect your prototype device.  

Once your prototype is working, you can choose the plan and we will publish your app containing Blynk.Inject. 

---

If you have any questions - contact us or post questions on our forum.

Did this answer your question?