Configuration files

The USB launcher configuration files contain instructions for processing attached devices based on their properties; they also contain descriptors to expose to USB hosts when the stack is running in device mode.

The USB launcher service interprets the configuration files as Lua scripts (see the Lua project homepage for information on the Lua language). By default, the service reads the file at /etc/usblauncher/rules.lua, but you can specify a custom configuration file by using the -c command-line option.

You can name only one configuration file, but this file can use the dofile() command to include other Lua files. For example, the USB launcher files shipped with the QNX SDP installers store the USB device mode descriptors in separate Lua files that are included in the main file. This way, USB launcher can override the default descriptors when role swapping. For an example of role swapping, see the documentation for the Apple Carplay add-on (available separately) for the USB launcher service.