MXT-APP(1)
π MXT-APP(1) π
β¨ NAME β¨
mxt-app β command line utility for maXTouch devices. Periodt.
π¦ SYNOPSIS π¦
mxt-app [command] [options]...
πΈ DESCRIPTION πΈ
Okay so mxt-app is your little bestie for managing Atmel maXTouch touch controllers and other devices that support Atmel Object Based Protocol. No cap.
If you don't give it a command, it gives you an interactive menu-based interface. Cute, right? π
π§ OBJECT PROTOCOL π§
The Atmel Object Based Protocol defines how device registers (normally accessed via I2C) are mapped to different functions within the devices. This interface organises the register map into separate objects, and each one gets a T number. mxt-app can inspect and alter the object configuration, and view diagnostic data, while the device is running. It's giving main character energy fr fr.
For a description of object protocol, see Atmel AT42QT1085 Object Protocol Guide, available from atmel.com.
The meaning of the configuration bytes within the objects may be found in the Protocol Guide documentation released with each device, and is only provided by Atmel under NDA. So yeah, some tea is locked behind NDA, iykyk. π
π GENERAL COMMANDS π
-h,--helpβ Display a brief summary of available options and exit.-i,--infoβ Print the ID information and object table.-M,--messages[timeout] β Prints the messages until timeout seconds have passed. If no timeout is provided, continue until user presses Ctrl-C. Zero timeout reads once. Provide-F[--msg-filter] option to filter by a specific object.-F,--msg-filterTYPE β Filters messages by object TYPE.--resetβ Reset device.--calibrateβ Send calibrate command.--backup[=COMMAND] β Backup configuration to NVRAM where the optional argument, COMMAND, is theBACKUPNVcommand.-gβ Write Golden Reference calibration to NVRAM.--self-cap-tune-configβ Tune and calibrate the self capacitance settings and store them to the device configuration.--self-cap-tune-nvramβ Tune and calibrate the self capacitance settings and store them to NVRAM without updating the Config Checksum.--versionβ print version ofmxt-app.--block-sizeBLOCKSIZE β Sets the i2c block size.
π CONFIGURATION FILE COMMANDS π
--loadFILE β Upload config from FILE, write it to NVRAM, and reset device. The configuration may be in.xcfgorOBP_RAWformat.--saveFILE β Save config to FILE in eitherOBP_RAWor.xcfgformat.--checksumFILE β Read the contents of FILE and recalculate the configuration checksum.
β REGISTER READ/WRITE COMMANDS β
-R,--readβ Read data from the device.-W,--writeβ Write data to the device.-n,--countCOUNT β read/write COUNT registers.-f,--formatβ format register output.-I,--instanceINSTANCE β select object INSTANCE.-r,--registerREGISTER β start at REGISTER (offset in object when used with TYPE).-T,--typeTYPE β select object TYPE.--zeroβ zero all configuration settings.
π EXAMPLES π
Read info block:
$ mxt-app -R -n7 -r0
82 19 11 AA 18 0E 16
Read T7 Power Config object:
$ mxt-app -R -T7
32 FF 05 43
Zero first two bytes of T7:
$ mxt-app -W -T7 0000
Read T7 Power Config object, formatted output:
$ mxt-app -R -T7 --format
GEN_POWERCONFIG_T7
00: 0x00 0 0000 0000
01: 0x00 0 0000 0000
02: 0x05 5 0000 0101
03: 0x43 67 0100 0011
π TCP SOCKET COMMANDS π
mxt-app supports connection over TCP using a ASCII protocol which allows mxt-app to act as a bridge so that Atmel proprietary tools such as Object Server can access the device. It's giving bridge era. π
-C,--bridge-clientHOST β Connect over TCP to HOST.-S,--bridge-serverβ Start TCP socket server.-p,--portPORT β TCP port (default4000).
π₯ BOOTLOADER COMMANDS π₯
--bootloader-versionβ Query and print ID and version of bootloader.--flashFIRMWARE β Flash FIRMWARE to device. The firmware file should be in.encformat.--reset-bootloaderβ Reset device in bootloader mode. In bootloader mode the device will cease normal operation until a firmware is sent. The I2C address or USB PID will change. The only valid command in this mode is--flash. A hard power cycle will return the device to normal Object Protocol mode, unless the firmware image is corrupted. This command is only provided for debugging purposes: in most cases--flashwill manage the change to/from bootloader mode before/after flash.--firmware-versionVERSION β The.encfile format does not provide the firmware version in a form available tomxt-app. If it is provided via this switch,mxt-appcan check firmware VERSION before and after flash. It will skip the flash process if the firmware version is already correct. It will also check for a successful flash on completion. The version must be provided in the format1.0.AA.
π T25 SELF TEST OPTIONS π
The Self Test T25 object runs self-test routines in the device to find faults in the sense lines and electrodes. The Self Test T25 object runs a series of test sequences. Slay, but for diagnostics. π
-t,--testβ Run all self tests.-tXX /--test=XX β Run individual self test specified by the CMD hex value.-t01β run analog power test.-t11β run pin fault test.-t12β run pin fault 2 test.-t13β run AND gate test.-t17β run signal limit test.-t20β run gain test.-t21β run offset fault test.
π¦ T37 DIAGNOSTIC DATA OPTIONS π¦
Capture frames of diagnostic data. The default mode is to capture touch deltas. Self capacitance measurements are only available on some devices. Not every device gets the full self-cap moment. π
--debug-dumpFILE β The T37 Diagnostic Data object provides raw access to touch reference/delta measurements from the touch screen. Diagnostic data is written to FILE in CSV format. The format is compatible with the Atmel Hawkeye utility.--framesN β Capture N frames of data.--referencesβ Capture references data.--self-cap-signalsβ Capture self cap signals.--self-cap-deltasβ Capture self cap deltas.--self-cap-refsβ Capture self cap references.--active-stylus-deltasβ Capture active stylus deltas.--active-stylus-refsβ Capture active stylus references.
π T68 SERIAL DATA COMMANDS π
--t68-fileFILE β Upload FILE to the device via the T68 Serial Data object.--t68-datatypeDATATYPE β Set DATATYPE of the file. This will be automatically detected from the file itself in most cases.
π BROKEN LINE DETECTION π
The broken line test scans the diagnostic data to identify touch sensor defects. It's giving detective mode. π
--broken-lineβ Run the broken line detection algorithm on the device.--dualxβ Indicate if sensor X lines are double connected.--x-center-thresholdN β Set threshold for X lines in center of sensor to N percent.--x-border-thresholdN β Set threshold for X lines at edge of sensor to N percent.--y-center-thresholdN β Set threshold for Y lines in center of sensor to N percent.--y-border-thresholdN β Set threshold for Y lines at edge of sensor to N percent.--patternPATTERN β set sensor PATTERN material toITOorXsense.
π§ SENSOR VARIANT ALGORITHM π§
The sensor variant algorithm calculates all nodes of a channel to find the trend line of the reference. A comparison is done between the real and expected sensor reference.
--sensor-variantβ Perform the Sensor Variant algorithm.--dualxβ Indicate if sensor X lines are double connected.--fail-if-anyβ Fail the Sensor Variant test on any defects.--max-defectsN β Maximum No. of continuous defects.--upper-limitN β Upper limit for regression, in percentage%.--lower-limitN β Lower limit for regression, in percentage%.--matrix-sizeN β The allowed matrix size.
π FINDING AND SPECIFYING DEVICE π
okay so by default mxt-app will scan available devices and connect to the first device it finds. main character energy, honestly.
-q,--queryβ scan for devices and output a list. slay.-d,--deviceDEVICESTRING β connect to a particular device specified by DEVICESTRING, which is given in the same format as output by--query.
There are three connection methods supported for hardware access:
β¨ sysfs β¨
This is used in conjunction with the Linux kernel driver. It accesses sysfs attributes under the directory
/sys/bus/i2c/drivers/dddddddd/b-00xx/
Where
dβ driver name -atmel_mxt_ts,Atmel MXTXXXX, etcbβ i2c adapterxxβ i2c address
A specific USB device can be specified by giving a device option -d sysfs:PATH as given by -q/--query option
The sysfs attributes used under this directory are
mem_accessβ access to raw I2C address space.debug_enableβ output messages from the device todmesglog as hexadecimal.debug_v2_enable,debug_msg,debug_notifyβ optional improved binary interface to retrieve messages
They are provided when using the Atmel kernel driver from github, and may be supported by other devices.
π USB π
Many maXTouch devices support a USB mode which reports touches via USB HID. In addition, evaluation boards may use a βbridge chipβ which interfaces I2C to the same protocol.
USB mode will be built by autotools when libusb is available.
A specific USB device can be specified by giving a device option -d usb:001-003 which corresponds to the bus and device numbers given by the -q/--query option and lsusb.
π¦ I2C debug interface π¦
Devices can be accessed directly via the i2c-dev I2C debug interface by giving adapter and address on command line.
The i2c-dev interface is documented in the Linux kernel source, in Documentation/i2c/dev-interface
The I2C debug interface support must be enabled using the CONFIG_I2C_CHARDEV kernel configuration option. It is enabled on a system if files /dev/i2c-* are present.
To use i2c-dev, provide a device string such as -d i2c-dev:1-004a.
Messages from the maXTouch devices are read by polling. If a kernel driver is also present on the system, reading messages on interrupt, then no messages will be received by the tool. A workaround is to set T18.COMMAND (byte 1) to 2 βForce the CHG line high (inactive)β so the kernel driver does not receive an interrupt.
There is no scanning support. This is because reading from every possible maXTouch address on every I2C bus might adversely affect some unrelated hardware that does not understand Object Protocol. You must manually identify the correct adapter and address by reference to the protocol guide or to the platform setup.
It is possible to use the --flash command with a device already in bootloader mode, by specifying the bootloader address.
π HIDRAW π
The hidraw backend supports maXTouch devices which connect using USB or HID over I2C.
The hidraw interface is documented in the Linux kernel source, in Documentation/hid/hidraw.txt
The device must have /dev/hidraw raw HID device support enabled using the CONFIG_HIDRAW kernel configuration option.
To use hidraw, provide a device string such as -d hidraw:/dev/hidraw0.
There is no scanning support.
Bootloading is not supported in this mode.
π₯ DEBUG OPTIONS π₯
-v,--verboseLEVEL β set debug level. LEVEL is one of0(Silent),1(Warnings and Errors),2(Info - default),3(Debug),4(Verbose). Debug and Verbose are only available if built in.
π EXIT VALUES π
0β Success1β Internal error/assert2β Input/output error3β Memory allocation failure4β Timeout5β Could not find a device or device went away6β Permission denied7β Operation not allowed for this device type8β Interrupt function call9β Object not available on device10β Received unexpected invalid message from message processor11β Self test invalid test command12β Self test AVdd Analog power is not present13β Self test Pin fault14β Self test AND Gate Fault15β Self test Signal limit fault16β Self test Gain error17β Information block checksum error18β Bootloader already unlocked19β Bootloader CRC failure (transmission failure)20β File format error21β Device firmware already required version22β Could not identify bootloader address23β Version on device did not match version given after bootloading operation24β Device did not reset25β Device in unexpected state26β Incorrect command line parameters or menu input given27β Bridge TCP protocol parse error28β Bridge connection error29β Serial data download failed30β No such file or directory31β Error processing self cap command
πΈ COMPILING FROM SOURCE πΈ
To download the source code using git:
git clone https://github.com/atmel-maxtouch/mxt-app.git
There are two build harnesses, for Android and autotools:
π Android π
To download libusbdroid submodule:
git submodule init
git submodule update
To compile using Android NDK:
ndk-build
To enable debug:
ndk-build NDK_DEBUG=1
To enable PIE support (for Android L):
ndk-build APP_PLATFORM=android-16
Binaries will be placed in libs/
The Android NDK is available from https://developer.android.com/tools/sdk/ndk/
π Running on Android π
adb push libs/armeabi/mxt-app /data/local/tmp/
adb shell /data/local/tmp/mxt-app [command]
If executable permissions have not been set, run:
adb shell chmod 777 /data/local/tmp/mxt-app
π§ autotools π§
To compile using autotools:
./autogen.sh && make
To cross-compile:
./autogen.sh --host=arm-linux-gnueabi && make
or,
./autogen.sh --host=arm-linux-gnueabihf && make
To enable debug:
./autogen.sh --enable-debug
To enable generation of the man page using pandoc:
./autogen.sh --enable-man
To build the doxygen documentation (this requires doxygen and graphviz to be installed):
make doc
β VERSION NUMBERING β
A version number is generated by git describe during the build process and is reported by --version and to debug logs.
A typical version might be 1.15-29-g8321 which means, 29 commits after the release tag 1.15, with a git SHA id beginning with 8321.
If the source is not checked out using git (for example by clicking on the github βDownload ZIPβ link), then the version from the file VERSION in the source archive is used.
The suffix -mod is appended if there are uncommitted changes in the source code.
π TROUBLESHOOTING π
klogctl error
If you see the warning
W: klogctl error 1 (Operation not permitted)
this indicates that mxt-app has been unable to retrieve messages from dmesg. Various features will not work properly. It may be possible to unrestrict dmesg by doing
# echo 0 > /proc/sys/kernel/dmesg_restrict
Thatβs the whole mxt-app(1) page, bestie β mxt-app source/version and the date it was built. Byeee π
β¨
π¦ where this page comes from
- ubuntu jammy: mxt-app 1.28-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms