Publish Your Profile

The final step in Device Profile creation is Publishing. When you Publish your profile using the Afero Profile Editor, several operations take place:

  • The Device Type, Attribute, and Mobile App UI definitions are pushed to the Afero Cloud.
  • The source you’ve created is used to generate a header file you will include in any MCU code you write that uses afLib.
  • The Device Profile is installed into ASR on your Modulo development board.

Before You Publish

Do the following to prepare for publishing:

  1. Have your smartphone nearby with the Afero app installed, running. Be signed in to your account.
  2. Have your Modulo board connected to a micro-USB power source, either an AC adapter or your computer (not your smartphone).
  3. With the Afero Profile Editor opened to your project, and with Publish selected from the Navigation pane, your window should show a QR Code Generator button, a list of the devices associated with your account, and your device activity:

    Publish Project

QR Code Generator

It might be convenient to generate a QR code on the fly. This would be helpful, for example, if you soldered your Modulo onto a board and made it inaccessible for subsequent scanning. To use the generator, click the QR Code Generator button. In the window that appears, type the Association ID, click Generate, and your code will appear. To save the code as a Scalable Vector Graphics (SVG) file, click the Save as SVG button. To generate your device’s QR code, you can also click the little QR code icon just to the right of your Association ID in the Developer Device table.

Developer Devices

The first list shows all devices that belong to your account, including the devices shared with you. For each device, you’ll see:


Use the checkbox(es) in the first column to select the device(s) to which you want to publish the active profile. If you see a red exclamation markExclamation Mark(as shown above), it could mean:

  • The module is not compatible with the module of the active profile.
  • The device has a firmware update pending. Cycle the power on the device to trigger the firmware update. You’ll be able to see the update progress in the mobile app.

Hover your cursor over the exclamation mark to reveal the popup with specific information.

Name This is the device name the end-user will see in the Afero mobile app. You can edit the name here before publishing: hover your cursor over the name and click once the pencil icon appears. Type the new name then click the checkmark to save.
Device Type The name and icon from the Device Type definition you created for this device.
SW Version This software version number is unique among all devices and users and is automatically incremented when any new profile is published by any user. This means that your SW Version numbers will increase every time you publish, but the specific number of your “next version” is not dependent exclusively on your current version.
ID The Association ID, which is the number in the QR code that appears on the label of your Modulo. It is used to associate your device with your account.
Status The Bluetooth signal strength between ASR and your smartphone currently running the Afero mobile app.
Test button Click the Test button to open the Attribute Tester. From this window, click an attribute to open its value for editing. Any value changes you make are reflected in the Afero mobile app UI.

Click a column heading to reorder or change the sort. Note that sorting works best on columns that display relatively static data, such as Name, Device Type, SW Version, and ID.

Device Activity

Below the Developer Devices is a list of the activity (events) of all your devices with Afero in real-time. Note that this is not a history; the activity you see begins when you first go to the Publish window. To see activity for a specific device, use the Device Filter.

Activities listed include attribute changes (e.g., you can watch the effect of a button-tap in the Afero mobile app that turns on an LED on your device) as well as operations in the Publish sequence, which means you’ll be able to watch the publish process here.

For each event you will see:

Timestamp The time when the activity occurred.
Attribute If an attribute was changed by the activity, it is identified here using its unique numeric identifier.
Value If an attribute value was changed by the activity, the resulting value is shown here.
Raw Value The hex string representation of the changed attribute value.

Now, Let’s Publish

  1. With the Afero mobile app active and your device powered up, the Status for this device should show a number like -30dBm. Specifying a specific numeric target is complex, but the point is that Status should not read “OFFLINE”. If it does, try restarting the mobile app, cycling power to the device, or restarting the Afero Profile Editor.
  2. Select the orange checkbox next to the ID of the device to which you intend to install.
  3. Click the Publish button in the upper-right of the window.
  4. After a short interval, you should see a banner at the top of the window that tells you the profile has been published and the Over-The-Air (OTA) update is in progress. During the update, you may see log info scroll past in the Device Activity, including lines such as “The Profile ID for this device was changed from <old ID> to <new ID>”. On Modulos, you may also see the LED flash.
  5. The update of your device is complete when the SW Version data in the Developer Devices table reads the new version number. This indicates the new profile has been installed, and the device has restarted and reported its software version to the Afero Cloud.
  6. When the profile is complete, the Afero mobile app should update to display the Control UI you defined for your device. If the update does not happen quickly, try restarting the Afero mobile app.

Once the new Control UI is in place, you should be able to use the controls to change attributes on the associated device.