Skip to main content

javax.usb.properties Reference

Overview

The javax.usb.properties file is used to configure the USB implementation on Linux operating systems. For more information regarding the settings and usages, please refer to the JSR80 project documentation.

Default configuration file

#
# Properties file for javax.usb
#
# This file is provided by the Linux implementation of javax.usb.
#
# The 2.4 kernel does not support control-type queueing nor interrupt-type
# queueing (see below to enable javax.usb internal queueing).
#
# Some 2.4 kernels do not properly handle hotplug notification, specifically
# those somewhere after 2.4.19. See below to enable polling instead.
#

################################################################################
# Properties required/used by javax.usb API
################################################################################

# This is required by the API, this is the class that the API will create
# to implement UsbServices.
javax.usb.services = com.ibm.jusb.os.linux.LinuxUsbServices
#javax.usb.services = de.ailis.usb4java.Services

################################################################################
# Properties required/used by javax.usb Common Reference Implementation
################################################################################

# These properties enable queueing for different pipe types. If the operating
# system does not support queueing for a particular pipe type (or at all),
# enable queueing here. This queueing is most likely much slower than OS-level
# queueing, so if the OS supports queueing, these should not be enabled.
#com.ibm.jusb.UsbPipeImp.queueSubmissions.control = true
#com.ibm.jusb.UsbPipeImp.queueSubmissions.interrupt = false
#com.ibm.jusb.UsbPipeImp.queueSubmissions.isochronous = false
#com.ibm.jusb.UsbPipeImp.queueSubmissions.bulk = false

# This property is similar to the UsbPipe-specific queueing properties, but
# this applies only to the Default Control Pipe queueing.
com.ibm.jusb.UsbDeviceImp.queueSubmissions = true

################################################################################
# Properties required/used by javax.usb Linux Implementation
################################################################################

# If polling should be used instead of waiting for a hotplug notification.
# Some kernel versions have a bug, and don't update the device node(s) until
# many seconds after waking up threads waiting on the devices file.
# If you are not getting hotplug events on a moderately to heavily loaded system,
# use polling.
# Note that since the new (buggy?) kernel behavior breaks javax.usb, this defaults to true!
# If you know your kernel isn't broken you can set this to false.
com.ibm.jusb.os.linux.LinuxUsbServices.topologyUpdateUsePolling = true

# If polling is disabled, this is how long in ms to delay after a
# hotplug event is signalled to re-enumerate the USB bus.
# If polling is enabled, this is how often to poll.
com.ibm.jusb.os.linux.LinuxUsbServices.topologyUpdateDelay = 500

# After new device(s) are detected, the device's driver is probably taking its
# sweet time talking to them. This delay lets the Linux driver (if any) have some time to
# talk before we send a device connection event, which may cause an application
# to immediately start talking to the device.
com.ibm.jusb.os.linux.LinuxUsbServices.topologyUpdateNewDeviceDelay = 100

################################################################################
# Tracing properties used by javax.usb Linux Implementation
################################################################################

# These rest apply to JNI tracing levels. This is a little better than it used to be,
# but it needs more improvement as far as controlling the tracers and levels.

# This either disables tracing entirely, or enables some amount of tracing.
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.tracing = true

# This defines where the JNI tracing output is sent.
# The default is stderr. Note that if append mode is used, the trace file will
# grow ever-larger every time javax.usb is run, and its size should be managed
# somehow. In file mode, the file size will not be managed/limited by javax.usb.
# 1 - stdout
# 2 - stderr
# 3 - file (truncate mode)
# 4 - file (append mode)
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_output = 2

# This is the filename to trace to, if trace_output is set to file tracing.
# There is NO DEFAULT to this, it must be set if trace_output is set to file tracing.
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_filename =

# This sets the tracing level. Higher levels mean more tracing.
# This level applies to ALL tracers. See each tracer for their levels.
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_level = 4

# This enables or disables default tracing. This is the most used tracer.
# The trace_data must also be enabled.
# These are the levels for this tracer.
# 0 - CRITICAL
# 1 - ERROR
# 2 - INFO
# 3 - FUNCTION
# 4 - DEBUG
# 5 - OTHER
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_default = true

# This enables or disables hotplug tracing.
# The trace_data must also be enabled.
# These are the levels for this tracer.
# 0 - CRITICAL
# 1 - ERROR
# 2 - CHANGE
# 3 - DEVICE
# 4 - OTHER
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_hotplug = true

# This enables or disables xfer tracing.
# The trace_data must also be enabled.
# These are the levels for this tracer.
# 0 - CRITICAL
# 1 - ERROR
# 2 - REQUEST
# 3 - METADATA
# 4 - DATA
# 5 - OTHER
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_xfer = true

# This enables or disables urb tracing.
# The trace_data must also be enabled.
# WARNING! DATA-level tracing will generate a LOT of output.
# These are the levels for this tracer.
# 2 - METADATA
# 3 - DATA
#com.ibm.jusb.os.linux.LinuxUsbServices.JNI.trace_urb = false