atmel touch tools to set atmel object value

首先說明一下我的環境:
---
CPU: MSM8992
Touch panel: ATMEL MXT_224s
OS:Android 5.1.1 (lollipop)
---
目前有一個平台是用 atmel mxt 224s touch panel,有時候會有修改此touch panel object的需要
在網路上找了一下,發現有一個工具 mxt-app 可以用來修改touch panel內部object的設定
網址如下:
https://github.com/atmel-maxtouch/mxt-app
於是在 ubuntu環境下利用下面指定下載source code,目錄為 mxt-app
git clone https://github.com/atmel-maxtouch/mxt-app.git
並執行
git submodule init
git submodule update
來download libusbdroid submodule
根據https://github.com/atmel-maxtouch/mxt-app 網站的說明,要compile需要下載NDK
所以我就在我 windows 平台上,至以下網址下載 Android NDK
https://developer.android.com/ndk/downloads/index.html#download
因我是 64 bit 平台,下載後得到檔案為 android-ndk-r10e-windows-x86_64.exe 410MB,並解壓縮
注意此 android-ndk-r10e 不能放在有空白字元目錄下,所以我就放在 D:\android-ndk-r10e
並將此路徑加到windows的環境變數PATH中
將在 ubuntu 系統下載的 mxt-app source code複製到 windows 系統中,並切換目錄到windows mxt-app放置處
根據https://github.com/atmel-maxtouch/mxt-app 網站的說明,因我的系統為Android 5.1.1 (lollipop)
必須enable PIE support,不然執行時會出現 "error: only position independent executables (PIE) are supported." 錯誤訊息
執行以下命令:
ndk-build APP_PLATFORM=android-16
binary執行檔會產生再 mxt-app/libs目錄下,分別有 arm64-v8a, armeabi,armeabi-7a,mips,mips64,x86,x86_64
因我的系統是屬於 arm64_v8a,所以我將 mxt-app/libs/arm64-v8a/mxt-app 複製到 android 裝置上
先將裝置 root, remount,複製mxt-app到裝置上,給於執行權限
.adb root
.adb remount
.adb push mxt-app /data/local/tmp
.adb shell chmod 777 /data/local/tmp/mxt-app
.adb shell
之後在裝置上切換目錄到 /data/local/tmp,執行 mxt-app
./mxt-app
出現以下畫面,下面範例示範 Enter I: Read (I)nfo block , Enter W: (W)rite individual object 將T9, 第14個 NUMTOUCH設定為 0x09
root@msm8992:/data/local/tmp # ./mxt-app
./mxt-app
Version:
Registered sysfs path:/sys/bus/i2c/drivers/atmel_maxtouch_ts/2-004b
Command line tool for Atmel maXTouch chips version:
Select one of the options:
Enter L: (L)oad config file
Enter S: (S)ave config file
Enter I: Read (I)nfo block
Enter D: Rea(D) individual object config
Enter W: (W)rite individual object
Enter T: Run sel(T)-test
Enter F: (F)lash firmware to chip
Enter B: (B)ackup the config data to NVM
Enter R: (R)eset the maxtouch device
Enter C: (C)alibrate the maxtouch device
Enter M: Display raw (M)essages
Enter U: D(U)mp Diagnostic data
Enter Q: (Q)uit the application
I
I
Reading info block.....
Family: 130 Variant: 36 Firmware V3.0.AB Objects: 21
Matrix size: X24Y14
Information Block CRC: 0xF0808B
Type Start Size Instances ReportIds Name
-----------------------------------------------------------------
T37 136 130 1 0-0 DEBUG_DIAGNOSTIC_T37
T5 266 9 1 0-0 GEN_MESSAGEPROCESSOR_T5
T6 275 6 1 1-1 GEN_COMMANDPROCESSOR_T6
T38 281 8 1 0-0 SPT_USERDATA_T38
T71 289 112 1 0-0 SPT_DYNAMICCONFIGURATIONCONTAINER_T71
T7 401 4 1 0-0 GEN_POWERCONFIG_T7
T8 405 14 1 0-0 GEN_ACQUISITIONCONFIG_T8
T9 419 46 1 2-9 TOUCH_MULTITOUCHSCREEN_T9
T18 465 2 1 0-0 SPT_COMMSCONFIG_T18
T25 467 9 1 10-10 SPT_SELFTEST_T25
T42 476 10 1 11-11 PROCI_TOUCHSUPPRESSION_T42
T46 486 10 1 12-12 SPT_CTECONFIG_T46
T47 496 26 1 0-0 PROCI_STYLUS_T47
T56 522 30 1 13-13 PROCI_SHIELDLESS_T56
T57 552 3 1 14-14 PROCI_EXTRATOUCHSCREENDATA_T57
T61 555 5 2 15-16 SPT_TIMER_T61
T65 565 11 1 0-0 PROCI_LENSBENDING_T65
T66 576 3 1 17-17 SPT_GOLDENREFERENCES_T66
T70 579 10 8 18-25 SPT_DYNAMICCONFIGURATIONCONTROLLER_T70
T72 659 80 1 26-26 PROCG_NOISESUPPRESSION_T72
T80 739 4 1 0-0 PROCI_RETRANSMISSIONCOMPENSATION_T80
Select one of the options:
Enter L: (L)oad config file
Enter S: (S)ave config file
Enter I: Read (I)nfo block
Enter D: Rea(D) individual object config
Enter W: (W)rite individual object
Enter T: Run sel(T)-test
Enter F: (F)lash firmware to chip
Enter B: (B)ackup the config data to NVM
Enter R: (R)eset the maxtouch device
Enter C: (C)alibrate the maxtouch device
Enter M: Display raw (M)essages
Enter U: D(U)mp Diagnostic data
Enter Q: (Q)uit the application
W
W
Enter the object number to write or 0 to finish
9
9
TOUCH_MULTITOUCHSCREEN_T9:
Object element 0 = 139
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 1 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 2 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 3 = 19
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 4 = 11
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 5 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 6 = 112
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 7 = 70
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 8 = 2
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 9 = 7
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 10 = 5
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 11 = 5
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 12 = 2
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 13 = 224
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 14 = 1
Do you want to change this value? (1 for yes/2 for no)1
1
Enter the value to be written to object element 14 :9
9
Wrote 9
Object element 15 = 10
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 16 = 10
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 17 = 10
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 18 = 32
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 19 = 3
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 20 = 224
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 21 = 1
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 22 = 45
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 23 = 44
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 24 = 32
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 25 = 3
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 26 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 27 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 28 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 29 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 30 = 10
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 31 = 10
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 32 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 33 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 34 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 35 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 36 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 37 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 38 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 39 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 40 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 41 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 42 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 43 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 44 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Object element 45 = 0
Do you want to change this value? (1 for yes/2 for no)2
2
Enter the object number to write or 0 to finish
0
0
Select one of the options:
Enter L: (L)oad config file
Enter S: (S)ave config file
Enter I: Read (I)nfo block
Enter D: Rea(D) individual object config
Enter W: (W)rite individual object
Enter T: Run sel(T)-test
Enter F: (F)lash firmware to chip
Enter B: (B)ackup the config data to NVM
Enter R: (R)eset the maxtouch device
Enter C: (C)alibrate the maxtouch device
Enter M: Display raw (M)essages
Enter U: D(U)mp Diagnostic data
Enter Q: (Q)uit the application
q
q
Quit
root@msm8992:/data/local/tmp #
以上提供給有需要的朋友參考!
全站熱搜