ufConf.conf - The Update Factory configuration file for Android¶
The ufConf.conf file determines how your devices communicate with the Update Factory platform. Below, we define the various parameters and provide examples to ensure proper syntax.
The essential paramaters will be provided to you after your registration with Update Factory.
The tenant is essentially your customer account. It is provided to you upon registration with Update Factory. You can define the tenant parameter like this:
The url defines which service on Update Factory that your devices will be connecting to.
The conrollerId is a unique identifier for each device. This Id will be how you differentiate between more than one device on Update Factory.
A best practice is to include also the MAC address or a serial number as part of the controllerId. See the example below. However, you can use whatever format you want.
The gatewayToken is a common/shared 32 alphanumeric character security-token that can be used as a layer of security for all of your devices. Also, with Update Factory, you use the gatewayToken as a first authenticaion for your device, see also: targetToken.
If you intend to use only the gatewayToken for authentication, this scenario should only be used for development purposes.
You can enable the use of, and generate the gatewayToken in the System Config section on Update Factory. Check the option: Allow a gateway to authenticate and manage multiple targets through a gateway security token
The targetToken is a unique 32 alphanumeric character security-token that is generated for each unique device.
There are 3 different options to generate targetTokens for devices in Update Factory:
(1) Under: Deployment > Targets > choose the + icon. Once you complete the form, you can look in the target container at the bottom, and retrieve the Security Token for the device that you just created.
(2) Under: Deployment > Targets > choose the bulk upload icon, next to the + icon, and then immediately choose: "Bulk Upload".
The Bulk Upload feature requires that a file in csv format be prepared in this manner:
Controller_id_1,targetName1 Controller_id_2,targetName2 ... ...
(3) Update Factory has implemented a slightly more secure and efficient procedure for authentication which incorporates also the gatewayToken to be used as a first authentication.
Requires the following to be enabled under System Config:
Allow targets to authenticate directly with their target security token
Allow a gateway to authenticate and manage multiple targets through a gateway security token
Requires that: updateFactoryServer is set to: true.
Simply define the gatewayToken in your ufConf.conf and connect your device(s). Once you can see the device(s) under Deployments > Targets, it now has retrieved it's unique targetToken. At this point, you can then disable under System Config: Allow a gateway to authenticate and manage multiple targets through a gateway security token.
Now, the device(s) will authenticate using only the targetToken.
apiMode allows for third party apps provide dialogue messages between Update Factory and the Android device. For example, this could be used in the case where an update requires user intervention at the device. If you don't have any need for this (especially if you are not using an app in the UI, and only the UF client service, it is recommended to set apiMode to false.
If you are using the Update Factory ui app as noted here, you will set this to true.
The enable parameter defines whether the Update Factory client service is active or inactive. Typically, this is set to true.
The Update Factory server uses a different procedure (with respect to hawkBit), to provide the targetToken back to the client. Setting this to true, enables the function in the client to retrieve the targetToken from the Update Factory server. If set to false, then the client will communicate as expected by a hawkBit server.
Typically, this will be set to true.
ufConf.conf with all parameters¶
tenant=tesla url=https://personal.updatefactory.io/ controllerId=device-00DE0212A4EE gatewayToken=ebeazfivzx74a2u4soltp134d4Wkkv33m targetToken= apiMode=true enable=true updateFactoryServer=true
ufConf.conf with minimal parameters¶
tenant=tesla url=https://personal.updatefactory.io/ controllerId=device-00DE0212A4EE
In this example, because a gatewayToken or targetToken is not defined, then in System Config on Update Factory, Allow targets to authenticate anonymously without security credentials must be checked.
ufConf.conf file location¶
The ufConf.conf must be loaded in your Android device here:
/sdcard/UpdateFactoryConfiguration/. You can use the
adb utility like this:
adb push ufConf.conf /sdcard/UpdateFactoryConfiguration/ufConf.conf
Events and Machine States¶
Be sure to take a look at our documentation on the various machine states or events when your device(s) are in communication with Update Factory. This information can be helpful for debugging or troubleshooting.
If you have any questions, feel free to reach out to us directly by email: support (at) kynetics (dot) com.