This page is for Afero partners and describes the factory programming process, which is the final stage in product deployment. The first section below describes what must be completed before entering this stage. In this document we refer to Afero, Afero Partners, Partner’s Manufacturers, and the product End-Users.
The factory programming process is described in the following sections:
Before You Begin
The Steps
Before you can move into factory programming, make sure you have completed the tasks described below. Contact the Afero Customer Enablement (ACE) team if you need details on fulfilling these tasks:
The diagram below illustrates the connections for the host MCU, ASR module, and the associated factory programmers:
Afero will create your Factory Programmer, but requires some inputs from the partner.
Be sure you have published your final device Profile to at least one prototype development device, using the email address you used that first triggered the creation of your partner account.
✓ | Information Needed | Description | Example |
---|---|---|---|
☐ | Partner Email Address | This must be the same email you used to sign in to the Afero Profile Editor:
|
afero@ABCinc.com |
☐ | Final Production Device Profile Version # |
This is the final, tested, and Afero certified version of the device Profile that will be programmed onto each production device in the factory. You will find your final device Profile Version # by doing the following:
|
v23371 |
☐ | Device Type Name |
This is a unique name across all the devices in your account that identifies which devices the Profile can be installed on. When created, you paired it with a hardware Module Type, which remains part of its essential device type definition. To find your Device Type Name, do the following:
|
Kitty Tracker |
The Afero Factory Programmer (AFP2) is created for you by Afero and is packaged in a .zip
file. It contains all the software you will need to program your PCB in the factory.
AFP2 will handle the following tasks:
.afero
) file.✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Submit partner email, final device Profile version #, and Device Type Name to Program Manager. | This is the information you’ve gathered above in Step 1. |
|
☐ | Factory programmer is created and tested. | The Afero Hardware team will take the partner inputs and create the AFP2 .zip file. |
|
☐ | Factory programmer is handed to partner/factory. | Using the partner’s ExaVault account, Afero transfers the factory programmer to the partner. |
|
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Set up the PC and required software. |
|
|
☐ | Design and test factory programming fixture. | You must set up the factory programming fixture and debugger/programmer (such as a SEGGER J-Link, which is used as an example in the instructions that follow):
|
|
☐ | Design product’s final board. |
The circuit design must expose the programming pins used to load the production Afero device Profile and latest firmware. Please consider the following:
|
|
☐ | Purchase and test QR code/label printer. |
|
|
☐ | Procure QR code scanner. | Recommended scanner is the Datalogic QUICKSCAN QD2430. If the QR code scanner doesn’t work correctly, check the QuickScan Quick Reference Guide. In the Guide are QR codes you can use for programming the QR code scanner to work with the PC you’ve connected to. |
|
This step is broken into four sub-steps:
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Set up factory station(s). | Each factory station must be set up with a PC with AFP2 software installed, and connected to the factory programming jig (via J-Link), 300dpi label printer, and QR code scanner. |
|
☐ | Set up label printer. | Label printer must be loaded with correct label size for PCB labels. |
|
☐ | Connect the programming fixture. | Connect the programming fixture to a switchable power supply and your PC. The programming fixture will interface with the assembled board, supplying power to and communicating with ASR. |
|
☐ | Unzip AFP2 file. | Use 7-Zip to unzip the encrypted file To unzip, highlight the zip file, then right-click to select 7-Zip> Extract to |
|
☐ | Customize the config.json file. |
The Use Notepad++ to edit the file. Fields that must be customized are marked with the value CHANGE_ME. These customized values are required and will appear in the factory database record. |
|
☐ | Complete printer setup. |
|
|
On every PCB manufactured, the following steps are performed by a factory line worker at a factory station.
Afero recommends that you program the ASR module first to ensure that the host MCU is not running code that will hold ASR in RESET or otherwise interfere with the ASR programming step.
Most MCUs are designed with the I/Os floating; as a result, the ASR RESET line between the MCU and ASR will float if the MCU program has been erased or is held in reset. An external pullup on the ASR RESET line is a good practice.
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Connect board and fixture. |
Connect the assembled board to the programming fixture. |
|
☐ | Run the programming script. |
|
|
☐ | Place QR code label on PCB. |
Make sure that the label is permanently affixed to the PCB. |
|
☐ | Repeat for all PCBs manufactured. |
Do this at each of the factory stations. |
|
Program the host MCU after programming ASR. If you must program the host MCU before ASR (strong recommendation is to program ASR first), the code on the host MCU must be designed so the ASR RESET line is not held low during ASR programming.
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Program the host MCU. | Use the process defined for the partner MCU. |
|
☐ | Factory test the host MCU. | Use the process defined for the partner MCU. |
|
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Locate the .afero file. |
The AFP2 script generates a factory output file in the
The first field designates the Factory File Type and will always be This file is comma-separated and contains the fields listed below by default:
Assuming you have customized the
|
|
☐ | Post .afero file to Afero. |
At the end of each manufacturing day, post this .afero file to the ExaVault site in a directory specified by Afero. Archive back-up copies of each .afero file in a secure location at the factory.
Be careful not to overwrite existing files on the ExaVault server. |
|
☐ | Afero sends email listing files uploaded. | The SFTP server sends a daily email listing all files uploaded. Double-check that the daily email includes all files that were uploaded. |
|
☐ | Afero processes .afero file. |
Once the file has been validated by Afero, PCBs are ingested by the Afero service. The file is then moved to a “Completed” directory and the factory is left with a record of devices in a separate SFTP folder. The ingested PCBs are now enabled for use in the Afero Platform. |
|
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Set up factory programming stations(s). | Each factory station must have a PC with AFP2 software installed, must be connected to the QR code scanner and a 300dpi label printer with the correct label size for the product. |
|
☐ | Start running label printing script. | Run the AFP2 script for printing the large QR code label for the outside of the product. You will find this script at the top level within the unzipped factory programmer (AFP2) directory, named label-large-ProgrammerName.bat . This is the QR code that the end-user will scan when onboarding the product. |
|
☐ | Scan the QR code on the PCB. | You will be prompted by the script to scan the QR code on the PCB label. |
|
☐ | AFP2 prints the QR code label. | Install the PCB in the product, placing the matching QR code label on the product body in an easily-scannable location. Ensure the label is permanently affixed to the product. |
|
☐ | Repeat for each product. | Run through the label printing for each product manufactured. |
|
These tests ensure that the QR label on the product is ready for the end-user to scan, and that the RSSI (Received Signal Strength Indicator) is acceptable.
Depending on what module you are using, BLE or BLE+Wi-Fi, you will run a different set of tests:
Follow the instructions that apply to your product’s radio module.
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Set up factory test station(s). | Each factory station must have an Apple Mac mini with Afero RSSI Measurement software installed (included in AFP2), and connected to a QR code scanner. |
|
☐ | Connect the product to power. | The BLE module will power on and start advertising. |
|
☐ | Run RSSI Measurement software. | While the software is running, go ahead and scan the QR code (the next step). |
|
☐ | Scan the QR code on the product. | The QR code provides the Device ID and Association ID. |
|
☐ | Evaluate the results of RSSI Measurement software. | Afero RSSI Measurement software:
|
|
☐ | Upload .afero files. |
At the end of each day of manufacturing, save the Multiple stations can be run in parallel and upload using the same ExaVault account credentials. |
|
☐ | Afero Cloud validation. | Afero validates the contents of the .afero files and confirms partner PCBs have already been ingested into the Afero Cloud by double-checking against the .afero files uploaded after factory programming. |
|
✓ | Task | Description | Responsibility |
---|---|---|---|
☐ | Set up factory test station(s). |
Each factory station must have a PC:
|
|
☐ | Make the connections. |
Power the module and connect the PC to the UART interface on the module:
|
|
☐ | Run RSSI Measurement software. | While the software is running, go ahead and scan the QR code (the next step). |
|
☐ | Scan the QR code on the product. | The QR code provides the Device ID and Association ID. |
|
☐ | Evaluate the results of RSSI Measurement software. | Afero RSSI Measurement software:
|
|
☐ | Upload .afero files. |
At the end of each day of manufacturing, save the Multiple stations can be run in parallel and upload using the same ExaVault account credentials. |
|
☐ | Afero Cloud validation. | Afero validates the contents of the .afero files and confirms partner PCBs have already been ingested into the Afero Cloud by double-checking against the .afero files uploaded after factory programming. |
|