Previous Topic

Next Topic

Book Contents

Book Index

Peripheral Descriptor Structure

Introduction

In a list of PeripheralDescriptor objects the PeripheralAdmin service maintains meta-data about known devices that are expected to connect.A Peripheral Descriptor contains information how a Peripheral device will be connected to a driver and configured. It consists of property=value pairs of the following types:

General Properties

They contain general information about the descriptor. Mandatory properties: "uid", "name", "vendor", "version", "type", "model". If needed, more general properties can be added with user-specified names.

The "name" property supports the following wildcards: *AAA > endsWith, BBB* > startsWith *CCC* > indexOf

uid=descr.controller.usb.zigbee.acme
name=Acme ZigBee Controller
vendor=Acme
version=1.0
type=controller.usb.zigbee
model=ETRX3USB

Match Properties

The Match Properties start with prefix "matchProperties.". They specify that a Peripheral device that has all of them with the same values will be associated to the descriptor.

matchProperties.bcdDevice=0100
matchProperties.bcdUSB=0110
matchProperties.bMaxPacketSize0=40
matchProperties.bNumConfigurations=01
matchProperties.idProduct=8293
matchProperties.idVendor=10c4
matchProperties.sProduct=Telegesis USB Device

There are no mandatory properties of this group. The larger the number of Match properties, the narrower set of devices can be matched and vice versa

Specific Property Names

The only entity in this group is specificPropertyNames. The value is a comma separated list of names. For each name in this list, a value will be read from the system and the corresponding dollar-prefixed ($) property will be replaced with that value. The reading is implemented in the com.prosyst.mbs.services.peripheral.spi.SpecificInfoProvider service. The following specific property names are supported: STORAGE, STORAGE_TYPE, STORAGE_MOUNT, COM, BLUETOOTH_HCI, BLUETOOTH_FEATURES, BLUETOOTH_ADDRESS.

specificPropertyNames=COM

If the COM value is read /dev/ttyUSB0, the driverInfo.configProps.commPort=$COM will become driverInfo.configProps.commPort=/dev/ttyUSB0.

Driver Info Properties

Configuration Properties

They start with "driverInfo.configProps." prefix. A driver info must contain exactly one of pid or fpid property.

driverInfo.configProps.commPort=$COM
driverInfo.configProps.configurationId=$sSerialNumber
driverInfo.fpid=mbs.zb.telegesis.comm.fpid

Driver Element Properties

There could be more that one driver elements. The naming convention is: driverInfo.element.<index>.<property name>=<value>, where <index> is a number starting with 1 and going consecutively. Missing a number makes the higher indexes unreachable. Mandatory properties are uid and requiredVersion.

driverInfo.element.1.uid=driver.osgi.zigbee
driverInfo.element.1.vendor=Bosch.IO
driverInfo.element.1.requiredVersion=0.5
driverInfo.element.1.type=2