force feedback과는 별개로 진동이 되는 녀석은 진동만 시킬수 있나 본데?

 

fftest /dev/input/event16
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event16 opened
Features:
  * Absolute axes: X, Y, Z, RX, RY, RZ, Hat 0 X, Hat 0 Y, 
    [3F 00 03 00 00 00 00 00 ]
  * Relative axes: 
    [00 00 ]
  * Force feedback effects types: Periodic, Rumble, Gain, 
    Force feedback periodic effects: Square, Triangle, Sine, 
    [00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ]
  * Number of simultaneous effects: 16

Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... Error: Invalid argument
Uploading effect #2 (Spring) ... Error: Invalid argument
Uploading effect #3 (Damper) ... Error: Invalid argument
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
Enter effect number, -1 to exit
Use effects 4 and 5 to test rumble effects:

Enter effect number, -1 to exit
4
Now Playing: Strong Rumble
Enter effect number, -1 to exit
5
Now Playing: Weak Rumble
Enter effect number, -1 to exit

[링크 : https://askubuntu.com/questions/1139960/how-to-enable-a-vibration-in-a-pc-gamepad-in-xubuntu-18-10]

 

evtest와는 별개라 설치를 해주어야 한다.

$ fftest
명령어 'fftest' 을(를) 찾을 수 없습니다. 그러나 다음을 통해 설치할 수 있습니다:
sudo apt install joystick

 

설치하고 해보니 권한이 부족하댄다 -_-

$ fftest
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Open device file: Permission denied

 

그래서 sudo로 해주니 뜬금없이(?) event0를 붙여 버리네?

$ sudo fftest
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event0 opened
Features:
  * Absolute axes: 
    [00 00 00 00 00 00 00 00 ]
  * Relative axes: 
    [00 00 ]
  * Force feedback effects types: 
    Force feedback periodic effects: 
    [00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
  * Number of simultaneous effects: 0

Uploading effect #0 (Periodic sinusoidal) ... Error:: Function not implemented
Uploading effect #1 (Constant) ... Error: Function not implemented
Uploading effect #2 (Spring) ... Error: Function not implemented
Uploading effect #3 (Damper) ... Error: Function not implemented
Uploading effect #4 (Strong rumble, with heavy motor) ... Error: Function not implemented
Uploading effect #5 (Weak rumble, with light motor) ... Error: Function not implemented
Enter effect number, -1 to exit

 

그래서 0이 먼가 봤는데 어라.. sleep button.. 야이 -_-

$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Sleep Button
/dev/input/event1: Lid Switch
/dev/input/event10: HDA Intel PCH Line
/dev/input/event11: HDA Intel PCH Dock Line Out
/dev/input/event12: HDA Intel PCH Headphone
/dev/input/event13: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event14: Wacom Serial Penabled 2FG Touchscreen Pen
/dev/input/event15: Wacom Serial Penabled 2FG Touchscreen Finger
/dev/input/event16: GreenAsia Inc.    USB Joystick     
/dev/input/event2: Power Button
/dev/input/event3: AT Translated Set 2 keyboard
/dev/input/event4: PS/2 Generic Mouse
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: HP WMI hotkeys
/dev/input/event7: ST LIS3LV02DL Accelerometer
/dev/input/event8: Video Bus
/dev/input/event9: HDA Intel PCH Mic
Select the device event number [0-16]: ^C

 

일반 사용자로 하니 지금 새로 추가된 조이스틱만 뜬다.

아무튼 이렇게 event 번호를 획득하고

$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event16: GreenAsia Inc.    USB Joystick     
Select the device event number [0-16]:

 

fftest 뒤에 장치명을 붙여주면 된다니까

$ fftest --help
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Usage: fftest /dev/input/eventXX
Tests the force feedback driver

 

일반 사용자 권한으로 조이스틱을 연결하면 똭!

ok 뜨는게 0,4,5 뿐인데

먼가 진동이 오긴한다!

$ fftest /dev/input/event16
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event16 opened
Features:
  * Absolute axes: X, Y, Z, RZ, Hat 0 X, Hat 0 Y, Misc ,
    [27 00 03 00 00 01 00 00 ]
  * Relative axes: 
    [00 00 ]
  * Force feedback effects types: Periodic, Rumble, Gain, 
    Force feedback periodic effects: Square, Triangle, Sine, 
    [00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ]
  * Number of simultaneous effects: 16

Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... Error: Invalid argument
Uploading effect #2 (Spring) ... Error: Invalid argument
Uploading effect #3 (Damper) ... Error: Invalid argument
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
Enter effect number, -1 to exit

 

 

'모종의 음모 > motion simulator' 카테고리의 다른 글

ffb window api  (0) 2024.10.20
fftest 소스코드와 설정 값  (0) 2024.10.13
ffbchecker 컴파일 및 설치  (0) 2024.10.12
new-lg4ff 와 oversteer 설치 시도  (0) 2024.10.12
플심용 자작 시뮬레이터  (2) 2024.10.11
Posted by 구차니

qt로 되어서 빌드가 조금 귀찮았는데

문제는 인터넷 상에 문서가 별로 없어서

어떻게 써야지 핸들이 턱에 걸려서 휙~ 돌아가게 제어할수 있는지 모르겠다

 

 

qt 때문에 설치해야 할 패키지

$ sudo apt-get install qtbase5-dev

[링크 : https://askubuntu.com/questions/374755/what-package-do-i-need-to-build-a-qt-5-cmake-application]

 

빌드는 아래 명령으로 하면 된다.

$ git clone https://github.com/MadCatX/FFBChecker
$ cd FFBChecker
$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_BUILD_TYPE=Release
$ make
$ ./FFBChecker

[링크 : https://github.com/MadCatX/FFBChecker]

 

+

Type을 periodic force로 하면, waveform에 따라서 하위 항목이 변하진 않는다.

설정값을 어떻게 넣어야 하나..

[링크 :https://vru.vibrationresearch.com/lesson/sine-test-control-parameters/]

Posted by 구차니

 

[링크 : https://github.com/berarma/new-lg4ff]

[링크 : https://github.com/berarma/oversteer]

 

$ git clone https://github.com/berarma/new-lg4ff.git
$ git clone https://github.com/berarma/oversteer.git
$ cd new-lg4ff/
$ make
$ sudo make install
$ cd../oversteer
$ sudo apt install python3 python3-gi python3-gi-cairo python3-pyudev python3-xdg python3-evdev gettext meson appstream-util desktop-file-utils python3-matplotlib python3-scipy
$ meson setup build
$ cd build
$ ninja install
$ oversteer

 

force feedback 항목이 궁금했는데

gain만 조정이 가능하고 별다른 진동생성은 안되는 것 같기도 하...다?

 

장치 연결

[   77.978347] usb 2-1.1: new full-speed USB device number 4 using ehci-pci
[   78.062096] usb 2-1.1: New USB device found, idVendor=046d, idProduct=c294, bcdDevice=13.27
[   78.062122] usb 2-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[   78.062130] usb 2-1.1: Product: Driving Force GT
[   78.098925] hid: raw HID events driver (C) Jiri Kosina
[   78.110749] usbcore: registered new interface driver usbhid
[   78.110757] usbhid: USB HID core driver
[   78.131441] input: Driving Force GT as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/0003:046D:C294.0001/input/input22
[   78.131592] logitech 0003:046D:C294.0001: input,hidraw0: USB HID v1.00 Joystick [Driving Force GT] on usb-0000:00:1d.0-1.1/input0
[   78.316051] usb 2-1.1: USB disconnect, device number 4
[   78.526300] usb 2-1.1: new full-speed USB device number 5 using ehci-pci
[   78.612544] usb 2-1.1: New USB device found, idVendor=046d, idProduct=c29a, bcdDevice=13.27
[   78.612570] usb 2-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[   78.612579] usb 2-1.1: Product: Driving Force GT
[   78.621082] input: Driving Force GT as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/0003:046D:C29A.0002/input/input23
[   78.622541] logitech 0003:046D:C29A.0002: input,hidraw0: USB HID v1.11 Joystick [Driving Force GT] on usb-0000:00:1d.0-1.1/input0
[   78.622611] logitech 0003:046D:C29A.0002: Force feedback support for Logitech Gaming Wheels

 

$ lsusb -t -v
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/3p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/6p, 480M
        ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/3p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/8p, 480M
        ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        |__ Port 001: Dev 005, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c29a Logitech, Inc. 
        |__ Port 004: Dev 003, If 0, Class=Video, Driver=uvcvideo, 480M
            ID 04f2:b242 Chicony Electronics Co., Ltd 
        |__ Port 004: Dev 003, If 1, Class=Video, Driver=uvcvideo, 480M
            ID 04f2:b242 Chicony Electronics Co., Ltd 

 

oversteer 상에는 특별한(?) 게 활성화 되진 않는다.

Posted by 구차니

'모종의 음모 > motion simulator' 카테고리의 다른 글

ffbchecker 컴파일 및 설치  (0) 2024.10.12
new-lg4ff 와 oversteer 설치 시도  (0) 2024.10.12
ffb (force feedback) linux driver  (0) 2024.10.07
ffb - force feedback  (0) 2023.08.25
AVR FFB(force feedback)  (0) 2021.06.29
Posted by 구차니

리눅스용 드라이버인데.. 같은 사람이 개발했나 본데

 

하나는 커널 드라이버 이고

Improved Linux module driver for Logitech driving wheels.

[링크 :https://github.com/berarma/new-lg4ff]

 

다른 하나는 python-gtk를 이용한 상태 확인 및 force feedback 확인용 프로그램 인 듯.

그 외에 소소하게(?) 다른 ffb 드라이버를 확인 할 수 있다.

Oversteer manages steering wheels on Linux using the features provided by the loaded modules. It doesn't provide hardware support, you'll still need a driver module that enables the hardware on Linux.

Oversteer recognizes the following Logitech wheels which are supported by the default in-kernel module:
  • Wingman Formula GP
  • Wingman Formula Force GP
  • Driving Force / Formula EX
  • Driving Force Pro
  • Driving Force GT
  • Momo Force
  • Momo Racing Force
  • Speed Force Wireless
  • G25 Racing Wheel
  • G27 Racing Wheel
  • G29 Driving Force Racing Wheel (PS3 mode)
  • G920 Driving Force Racing Wheel
  • Logitech G923 for XBox (since Linux 6.3)
  • OpenFFBoard, (https://github.com/Ultrawipf/OpenFFBoard).
Wheels using the Logitech driver (except XBOX/PC versions) can get improved support using new-lg4ff, with more effects and features. Some games won't have full FFB without it.
The following wheels will need custom driver modules for FFB support. These drivers are still being worked on. (I'm NOT claiming they will fully work. Please, check the related projects for more information.):
These wheels are recognized but don't have driver support (Force Feedback and other features won't work):
  • Thrustmaster Force Feedback Racing Wheel
  • Thrustmaster TX Racing Wheel
  • Thrustmaster T500 RS
  • Thrustmaster T80
  • Thrustmaster Ferrari 458

[링크 : https://github.com/berarma/oversteer]

    [링크 : https://www.reddit.com/r/linux_gaming/comments/19cyvwe/does_anyone_know_how_to_get_force_feedback_to/]

 

QT로 만든 테스트 프로그램

Qt5-based tool to create force feedback effects intended mainly for force-feedback implementation testing purposes

[링크 : https://github.com/MadCatX/FFBChecker]

    [링크 : https://steamcommunity.com/groups/linuxff/discussions/0/487877107138026764/]

 

fftest_buffer_overun 프로그램으로 휠을 돌리거나 진동을 생성할 수 있어 보임

[링크 : https://github.com/Eliasvan/Linux-Force-Feedback/blob/master/tools/RateLimiting/fftest_buffer_overrun.c]

  [링크 : https://www.youtube.com/watch?v=JG5HUPLuS1s]

 

 

 

 

'모종의 음모 > motion simulator' 카테고리의 다른 글

new-lg4ff 와 oversteer 설치 시도  (0) 2024.10.12
플심용 자작 시뮬레이터  (2) 2024.10.11
ffb - force feedback  (0) 2023.08.25
AVR FFB(force feedback)  (0) 2021.06.29
usb joystick DIY / Force Feedback  (2) 2018.03.04
Posted by 구차니
모종의 음모/CAN2024. 1. 9. 11:29

렉서스랑 토요타 차량 두가지 종류가 타이어 옆으로 해서 헤드라이트의 커넥터에 접근이 가능하도록

물리보안적인 측면에서 허술하게 만들어져 발생한 사건으로 보인다.

can이라서 접근성이 좋지 않아 이정도인데

현재~근미래에 can에서 ethernet으로 전환하게 되면 너무 손쉽게 뚫리지 않을까 걱정된다.

기본적으로 통신은 보안채널로 하게 되려나?

 

렉서스 차량 99대와 토요타 랜드크루저 92대가 도난

[링크 : https://v.daum.net/v/1OAq5WD7kL]

 

 

+

BroadR-Reach

 

BroadR-Reach technology is an Ethernet physical layer standard designed for automotive connectivity applications

[링크 : https://en.wikipedia.org/wiki/BroadR-Reach]

 

 

[링크 : https://m.blog.naver.com/lecroykorea/221105708892]

[링크 : https://m.blog.naver.com/lecroykorea/221065291291]

[링크 : https://m.blog.naver.com/lecroykorea/221069260339]

'모종의 음모 > CAN' 카테고리의 다른 글

linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can-utils(cansend, candump)  (0) 2025.02.18
CAN(controller area network)  (0) 2023.10.31
mcp2515 can  (0) 2023.10.30
CAN 통신 우선순위  (0) 2015.01.23
Posted by 구차니
모종의 음모/CAN2023. 10. 31. 23:15

TJA1050 입력 전압을 보는데  dominant / recessive란게 나와서 보니

[링크 : https://www.nxp.com/docs/en/data-sheet/TJA1050.pdf]

 

CAN은 H 와 L 라인의 전위차로 0과 1을 구분한다고 한다.

0이  dominant 라는데 어째 0과 1이 반대인 느낌이다?

아무튼 3.3V면 bus state가 recessive로 잡힌다는건가?

[링크 : https://m.blog.naver.com/lagrange0115/221941482740]

 

[링크 : https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf]

'모종의 음모 > CAN' 카테고리의 다른 글

linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
mcp2515 can  (0) 2023.10.30
CAN 통신 우선순위  (0) 2015.01.23
Posted by 구차니
모종의 음모/CAN2023. 10. 30. 19:11

아두이노나 라즈베리 CAN HAT 은 3~4만원은 해서 구매하기 부담스러웠는데

MCP2515 라는 녀석은 CAN to SPI 라고 해야하나?

CAN 통신을 독립적으로 수행해주는 원칩 솔루션이 있으니 다음에 사봐야겠다.

 

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B509249430] 3700

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=C297097222] 2700

 

차량에 OBD 연결하기도 한다는데 의외로 2.54mm 핀 헤더와 잘 맞는듯?

[링크 : https://clemencyking.tistory.com/26]

 

보드가 8MHz와 16Mhz가 있다는데

크리스탈은 4 / 8 / 20 MHz 권장인가?

HS SPI의 경우 10Mbps 라는데 아무래도 클럭 멀티플라이어가 없다면

20MHz를 넣어줘야 HS SPI 로 작동하게 될 것 같긴하네.

[링크 : https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf]

'모종의 음모 > CAN' 카테고리의 다른 글

linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
CAN 통신 우선순위  (0) 2015.01.23
Posted by 구차니

 

 

[링크 : https://learn.microsoft.com/en-us/windows/uwp/gaming/racing-wheel-and-force-feedback]

 

$ apt-cache search fftest
joystick - set of testing and calibration tools for joysticks

[링크 : https://www.kernel.org/doc/html/v4.12/input/ff.html]

 

[링크 : https://github.com/tloimu/adapt-ffb-joy]

 

 

2024.10.07

https://github.com/flosse/linuxconsole/blob/master/utils/fftest.c

'모종의 음모 > motion simulator' 카테고리의 다른 글

new-lg4ff 와 oversteer 설치 시도  (0) 2024.10.12
플심용 자작 시뮬레이터  (2) 2024.10.11
ffb (force feedback) linux driver  (0) 2024.10.07
AVR FFB(force feedback)  (0) 2021.06.29
usb joystick DIY / Force Feedback  (2) 2018.03.04
Posted by 구차니
모종의 음모/HDLC2022. 8. 29. 14:42

 

Flag field가 아닌 Data에 0x7E가 있는지 확인

0x7E -< 0x7D, 0x5E를 삽입

[링크 : https://blog.daum.net/trts1004/12109121]

 

232와 같은 비동기 전송일 경우 bit stuff를 적용하지 않는다고..?

Synchronous framing
Because a flag sequence consists of six consecutive 1-bits, other data is coded to ensure that it never contains more than five 1-bits in a row. This is done by bit stuffing: any time that five consecutive 1-bits appear in the transmitted data, the data is paused and a 0-bit is transmitted.


Asynchronous framing
When using asynchronous serial communication such as standard RS-232 serial ports, synchronous-style bit stuffing is inappropriate for several reasons:

Bit stuffing is not needed to ensure an adequate number of transitions, as start and stop bits provide that,
Because the data is NRZ encoded for transmission, rather than NRZI encoded, the encoded waveform is different,
RS-232 sends bits in groups of 8, making adding single bits very awkward, and
For the same reason, it is only necessary to specially code flag bytes; it is not necessary to worry about the bit pattern straddling multiple bytes.
Instead asynchronous framing uses "control-octet transparency", also called "byte stuffing" or "octet stuffing". The frame boundary octet is 01111110, (0x7E in hexadecimal notation). A "control escape octet", has the value 0x7D (bit sequence '10111110', as RS-232 transmits least-significant bit first). If either of these two octets appears in the transmitted data, an escape octet is sent, followed by the original data octet with bit 5 inverted. For example, the byte 0x7E would be transmitted as 0x7D 0x5E ("10111110 01111010"). Other reserved octet values (such as XON or XOFF) can be escaped in the same way if necessary.

The "abort sequence" 0x7D 0x7E ends a packet with an incomplete byte-stuff sequence, forcing the receiver to detect an error. This can be used to abort packet transmission with no chance the partial packet will be interpreted as valid by the receiver.

[링크 : https://en.wikipedia.org/wiki/High-Level_Data_Link_Control]

Posted by 구차니