요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Tracking sensor와 calibration
sysfs-driver-hid-roccat-koneplus:111-145tracking·distance control, Easy 기능, TCU register와 calibration을 제어하고 calibration 중 표면의 30×30 pixel sample image를 읽습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 0-4.
When read, this attribute returns the number of the actual
profile. This value is persistent, so its equivalent to the
profile that's active when the mouse is powered on next time.
When written, this file sets the number of the startup profile
and the mouse activates this profile immediately.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 0-4.
When read, this attribute returns the number of the actual
profile. This value is persistent, so its equivalent to the
profile that's active when the mouse is powered on next time.
When written, this file sets the number of the startup profile
and the mouse activates this profile immediately.
Please use actual_profile, it does the same thing.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read, this file returns the raw integer version number of the
firmware reported by the mouse. Using the integer value eases
further usage in other programs. To receive the real version
number the decimal point has to be shifted 2 positions to the
left. E.g. a returned value of 121 means 1.21
This file is readonly.
Please read binary attribute info which contains firmware version.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info
Date: November 2012
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read, this file returns general data like firmware version.
When written, the device can be reset.
The data is 8 bytes long.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store a macro with max 500 key/button strokes
internally.
When written, this file lets one set the sequence for a specific
button for a specific profile. Button and profile numbers are
included in written data. The data has to be 2082 bytes long.
This file is writeonly.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons
Date: August 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_buttons holds information about button layout.
When written, this file lets one write the respective profile
buttons back to the mouse. The data has to be 77 bytes long.
The mouse will reject invalid data.
Which profile to write is determined by the profile number
contained in the data.
Before reading this file, control has to be written to select
which profile to read.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons
Date: August 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_buttons holds information about button layout.
When read, these files return the respective profile buttons.
The returned data is 77 bytes in size.
This file is readonly.
Write control to select profile and read profile_buttons instead.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_settings holds information like resolution, sensitivity
and light effects.
When written, this file lets one write the respective profile
settings back to the mouse. The data has to be 43 bytes long.
The mouse will reject invalid data.
Which profile to write is determined by the profile number
contained in the data.
Before reading this file, control has to be written to select
which profile to read.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
Date: August 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_settings holds information like resolution, sensitivity
and light effects.
When read, these files return the respective profile settings.
The returned data is 43 bytes in size.
This file is readonly.
Write control to select profile and read profile_settings instead.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse has a tracking- and a distance-control-unit. These
can be activated/deactivated and the lift-off distance can be
set. The data has to be 6 bytes long.
This file is writeonly.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/talk
Date: May 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: Used to active some easy* functions of the mouse from outside.
The data has to be 16 bytes long.
This file is writeonly.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When written a calibration process for the tracking control unit
can be initiated/cancelled. Also lets one read/write sensor
registers.
The data has to be 4 bytes long.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
Date: October 2010
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read the mouse returns a 30x30 pixel image of the
sampled underground. This works only in the course of a
calibration process initiated with tcu.
The returned data is 1028 bytes in size.
This file is readonly.
Users: http://roccat.sourceforge.net
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Profile 선택과 device 정보
1-42BASE=/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>
$BASE/actual_profile
$BASE/startup_profile
$BASE/firmware_version
$BASE/info
contact는 Stefan Achatz <erazor_de@users.sourceforge.net>, user는 http://roccat.sourceforge.net다.
| attribute | Date | 값·길이 | access | 의미 |
|---|---|---|---|---|
| actual_profile | 2010년 10월 | integer 0-4 | read/write | 현재 profile과 다음 power-on startup profile |
| startup_profile | 2010년 10월 | integer 0-4 | read/write | actual_profile과 같은 기능을 제공하는 구 interface |
| firmware_version | 2010년 10월 | raw integer | read-only | decimal point를 왼쪽으로 두 자리 이동한 firmware version |
| info | 2012년 11월 | 8 byte | read/write | firmware를 포함한 일반 data 조회와 device reset |
actual_profile을 읽으면 현재 profile 번호를 반환한다. persistent 값이므로 mouse power를 다음에 켤 때 활성화될 profile과 같다. 값을 쓰면 startup profile을 저장하고 mouse가 그 profile을 즉시 활성화한다.
startup_profile도 0-4 범위에서 정확히 같은 동작을 한다. 중복 interface이므로 actual_profile을 사용해야 한다.
firmware_version은 mouse가 보고한 firmware version을 raw integer로 반환한다. 다른 program에서 다루기 쉽게 integer를 사용하며 실제 version은 decimal point를 왼쪽으로 두 자리 옮겨 구한다. 예를 들어 121은 1.21이다. 이 file 대신 firmware version이 포함된 binary info attribute를 읽는 것이 권장된다.
info를 읽으면 firmware version 같은 일반 data 8 byte를 반환한다. 8-byte data를 쓰면 device를 reset할 수 있다.
Macro와 profile button layout
44-80$BASE/macro
$BASE/profile_buttons
$BASE/profile[1-5]_buttons
| attribute | Date | payload | access |
|---|---|---|---|
| macro | 2010년 10월 | 2082 byte | write-only |
| profile_buttons | 2010년 8월 | 77 byte | read/write |
| profile[1-5]_buttons | 2010년 8월 | 77 byte | read-only |
mouse는 최대 500번의 key 또는 button stroke로 이루어진 macro를 내부에 저장할 수 있다. macro에 쓰면 특정 profile의 특정 button sequence를 설정한다. 2082-byte payload에 button 번호와 profile 번호가 포함되어야 한다.
mouse는 button press로 전환할 수 있는 profile 다섯 개를 저장한다. 각 profile은 settings와 buttons 두 부분으로 나뉘며 profile_buttons는 button layout을 담는다.
profile_buttons에 77 byte를 쓰면 payload 내부 profile 번호가 지정하는 profile의 button data를 mouse에 기록한다. mouse는 잘못된 data를 거부한다. 읽기 전에는 control에 써서 읽을 profile을 선택해야 한다.
profile1_buttons부터 profile5_buttons까지의 file은 각 profile button data 77 byte를 직접 읽는 기존 read-only interface다. 이제 control로 profile을 선택하고 profile_buttons를 읽는 방식을 사용해야 한다.
Profile settings
82-109$BASE/profile_settings
$BASE/profile[1-5]_settings
| attribute | Date | payload | access |
|---|---|---|---|
| profile_settings | 2010년 10월 | 43 byte | read/write |
| profile[1-5]_settings | 2010년 8월 | 43 byte | read-only |
profile_settings는 resolution, sensitivity, light effect 같은 profile 설정을 담는다. 43-byte payload를 쓰면 payload의 profile 번호가 지정한 settings를 mouse에 기록하며 invalid data는 mouse가 거부한다. 읽기 전에는 control에 써서 profile을 선택해야 한다.
profile1_settings부터 profile5_settings까지는 각 profile settings 43 byte를 직접 반환하는 기존 read-only interface다. control로 profile을 선택한 뒤 profile_settings를 읽는 방식으로 대체되었다.
Sensor, Talk와 TCU calibration
111-145$BASE/sensor
$BASE/talk
$BASE/tcu
$BASE/tcu_image
| attribute | Date | payload | access | 동작 |
|---|---|---|---|---|
| sensor | 2010년 10월 | 6 byte | write-only | tracking·distance control unit와 lift-off distance 설정 |
| talk | 2011년 5월 | 16 byte | write-only | mouse의 일부 easy* 기능을 외부에서 활성화 |
| tcu | 2010년 10월 | 4 byte | read/write | TCU calibration 시작·취소와 sensor register 접근 |
| tcu_image | 2010년 10월 | 1028 byte | read-only | calibration 중 sample surface의 30×30 pixel image |
mouse에는 tracking control unit와 distance control unit가 있다. sensor에 6 byte를 쓰면 두 unit을 활성화하거나 비활성화하고 lift-off distance를 설정할 수 있다.
talk에 16 byte를 쓰면 mouse의 일부 easy* 기능을 외부 host에서 활성화한다.
tcu에 4 byte를 쓰면 tracking control unit calibration을 시작하거나 취소할 수 있다. 같은 attribute로 sensor register를 읽고 쓸 수도 있다.
tcu_image를 읽으면 mouse가 sample한 아래 표면의 30×30 pixel image를 반환한다. tcu로 시작한 calibration 과정 중에만 동작하며 반환 data 크기는 1028 byte다.
tcu command로 calibration context를 만든 동안에만 tcu_image가 sample surface data를 반환한다.
Profile 선택과 binary profile data
sysfs-driver-hid-roccat-koneplus:1-1090-4 startup profile, firmware info, 500-stroke macro와 5개 profile의 button·resolution·sensitivity·light 설정을 고정 길이 payload로 관리합니다.