'모종의 음모'에 해당되는 글 145건

  1. 2024.10.07 ffb (force feedback) linux driver
  2. 2024.01.09 can invader
  3. 2023.10.31 CAN(controller area network)
  4. 2023.10.31 MCP2515 on rpi
  5. 2023.10.30 mcp2515 can
  6. 2023.08.25 ffb - force feedback
  7. 2022.08.29 HDLC bit stuff
  8. 2022.08.29 hdlc nrzi encoder / decoder (bit stuff 제외)
  9. 2022.08.26 hdlc 프로토콜 - bit stuffing, endian?
  10. 2021.12.06 HDLC FCS ccitt-1 16bit crc

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

 

하나는 커널 드라이버 이고

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 on rpi  (0) 2023.10.31
mcp2515 can  (0) 2023.10.30
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' 카테고리의 다른 글

can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
MCP2515 on rpi  (0) 2023.10.31
mcp2515 can  (0) 2023.10.30
CAN 통신 우선순위  (0) 2015.01.23
Posted by 구차니
모종의 음모/CAN2023. 10. 31. 23:05

MCP2515를 라즈베리에서 쓰려면 개조가 필요하다는데

아두이노가 5V IO 레벨이고 라즈베리가 3.3V 레벨이라 그런가? 왜 저렇게 복잡하게 개조하는건진 찾아봐야겠고

집에 16MHz OSC가 있나도 찾아봐야겠다.(12MHz 24MHz는 있는데 16MHz 만 없네 -_-)

[링크 : https://blog.naver.com/mts90/221644429413]

 

반대로 SPI 를 위한 레벨시프터가 있으면 해결되려나?

[링크 : https://www.devicemart.co.kr/goods/view?no=1384307] 2채널 3.3V<->5V 레벨 시프터 / 1000원

 

구매시 16MHz 인지 확인하는것도 방법이려나

[링크 : https://m.blog.naver.com/kimhj9/221790064284]

 

트랜시버의 전압을 바꾸어 주는거라면 라즈베리 끼리 테스트 할때 그냥 3.3V 넣어서

양쪽다 동일 전압레벨로 맞추면 통신이 안되려나?

 

설정 내용을 보니 spi를 통해서 can 통신 장치 추가 까지 문제 없어 보인다.

$ vi /boot/config.txt
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=12
dtoverlay=spi-bcm2835-overlay

$ sudo apt-get install can-utils

$ ls /sys/bus/spi/devices/spi0.0/net
can0

$ ls /sys/bus/spi/devices/spi0.0
driver  modalias  net  of_node  subsystem  uevent

$ ls /sys/bus/spi/devices/spi0.0/net/
can0

$ ls /sys/bus/spi/devices/spi0.0/net/can0/
addr_assign_type  carrier_changes  duplex             iflink            operstate       speed         uevent
address           device           flags              link_mode         phys_port_id    statistics
addr_len          dev_id           gro_flush_timeout  mtu               phys_port_name  subsystem
broadcast         dev_port         ifalias            name_assign_type  phys_switch_id  tx_queue_len
carrier           dormant          ifindex            netdev_group      queues          type

// 5. Setup CAN interface, I use 125k baudrate.
$ sudo ip link set can0 up type can bitrate 125000
$ sudo ifconfig
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

[링크 : https://forums.raspberrypi.com/viewtopic.php?t=141052]

 

TJA1050 - High speed CAN tranceiver

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

 

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

can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
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' 카테고리의 다른 글

can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
MCP2515 on rpi  (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 구차니
모종의 음모/HDLC2022. 8. 29. 14:28

잘 작동하는지 모름, 걍 밑바닥에서 부터 작성함

 

$ cat hdlc_nrzi_enc.c
#include <stdio.h>

void main()
{
        unsigned char data[10] =                {0x7E, 0x11, 0x22, 0x33, 0x1E, 0x0A, 0x7E, 0x00, 0x00, 0x00};
        unsigned char lsbmsb[10] =              {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
        unsigned char bitstuff[10] =    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
        unsigned char nrzi[10] =                {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

        int i = 0;
        int b = 0;

        // msb to lsb, data order change
        printf("bitwise LSB convert ----------------------------------------\n");
        for(i = 0; i < 10; i++)
        {
                unsigned char tempval = 0;
                unsigned char orival = 0;
                orival = data[i];
                for(b = 0; b < 8; b++)
                {
                        tempval |= ((orival & 0x01) << (7 - b));
                        orival = orival >> 1;
                }
                lsbmsb[i] = tempval;
                printf("%02X -> %02X\n",data[i],lsbmsb[i]);
        }

        // zrzi
        printf("NRZ-I ----------------------------------------\n");
        unsigned char last = 0;
        unsigned char out = 0;
        for(i = 0; i < 80; i++)
        {
                last = (lsbmsb[i / 8] >> (7 - (i % 8))) & 0x01;
//              printf("i:%d l:%d ", i, last);
                if(last == 0)
                        out=(out==0?1:0);
//              printf("o:%d\n", out);
                nrzi[i / 8] |= out << (7 - (i % 8));

                if(i % 8 == 7)
                        printf("%02X -> %02X\n", lsbmsb[i/8],nrzi[i/8]);
        }
}
$ ./enc
bitwise LSB convert ----------------------------------------
7E -> 7E
11 -> 88
22 -> 44
33 -> CC
1E -> 78
0A -> 50
7E -> 7E
00 -> 00
00 -> 00
00 -> 00
NRZ-I ----------------------------------------
7E -> FE
88 -> 5A
44 -> D2
CC -> 22
78 -> FA
50 -> CA
7E -> FE
00 -> AA
00 -> AA
00 -> AA

 

 

$ cat hdlc_nrzi_dec.c
#include <stdio.h>

void main()
{
        unsigned char data[10] =                {0xFE, 0x5A, 0xD2, 0x22, 0xFA, 0xCA, 0xFE, 0x00, 0x00, 0x00};
        unsigned char lsbmsb[10] =              {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
        unsigned char bitstuff[10] =    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
        unsigned char nrzi[10] =                {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

        int i = 0;
        int b = 0;

        // zrzi
        printf("NRZ-I ----------------------------------------\n");
        unsigned char last = 0;
        unsigned char curr = 0;
        unsigned char out = 0;
        for(i = 0; i < 80; i++)
        {
                curr = (data[i / 8] >> (7 - (i % 8))) & 0x01;
//              printf("i:%d l:%d c:%d ", i, last, curr);
                if(last != curr)
                        out = 0;
                else out = 1 ;
                last = curr;
//              printf("o:%d\n", out);
                nrzi[i / 8] |= out << (7 - (i % 8));

                if(i % 8 == 7)
                        printf("%02X -> %02X\n", data[i/8],nrzi[i/8]);
        }

        // msb to lsb, data order change
        printf("bitwise LSB convert ----------------------------------------\n");
        for(i = 0; i < 10; i++)
        {
                unsigned char tempval = 0;
                unsigned char orival = 0;
                orival = nrzi[i];
                for(b = 0; b < 8; b++)
                {
                        tempval |= ((orival & 0x01) << (7 - b));
                        orival = orival >> 1;
                }
                lsbmsb[i] = tempval;
                printf("%02X -> %02X\n",nrzi[i],lsbmsb[i]);
        }

}
$ ./dec
NRZ-I ----------------------------------------
FE -> 7E
5A -> 88
D2 -> 44
22 -> CC
FA -> 78
CA -> 50
FE -> 7E
00 -> FF
00 -> FF
00 -> FF
bitwise LSB convert ----------------------------------------
7E -> 7E
88 -> 11
44 -> 22
CC -> 33
78 -> 1E
50 -> 0A
7E -> 7E
FF -> FF
FF -> FF
FF -> FF

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

HDLC bit stuff  (0) 2022.08.29
hdlc 프로토콜 - bit stuffing, endian?  (0) 2022.08.26
HDLC FCS ccitt-1 16bit crc  (0) 2021.12.06
HDLC 프로토콜(High level Data Link Control)  (0) 2021.07.27
Posted by 구차니
모종의 음모/HDLC2022. 8. 26. 15:47

아.. 이런 변수가 하나 더 있었던 건가..

111111 가 전송되려면 1111101 이런식으로 전송되어야 한다.

(그런데.. 진짜 데이터가 111110 이면 어떡해야 하지? 어짜피 5개가 되었으니 1111100이 되는건가?)

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.

HDLC transmits bytes of data with the least significant bit first (not to be confused with little-endian order, which refers to byte ordering within a multi-byte field).

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

 

The NRZI coding scheme transmits a 0 bit as a signal transition, and a 1 bit as no change. In this case, bit stuffing is most easily described as the insertion of a 0 bit after a long run of 1 bits.

[링크 : https://en.wikipedia.org/wiki/Bit_stuffing]

 

[링크 : https://copycode.tistory.com/79]

[링크 : https://itwiki.kr/w/HDLC]

[링크 : https://goodgid.github.io/What-is-HDLC/]

 

+

 

 

0,1 눈대중으로 변환해서 연속된 0이나 1에 대한 오류가 존재하지만

전반적으로 비트가 뒤집힌 형태로 전송됨을 확인함. (바이트 내에서 LSB가 MSB에 존재함)

7E 11 22 33 1E 0A 7F
01111110 00010001 00100010 00110011 00011110 00001010 01111111 (raw)
01111110 10110100 10010110 10001000 10111110 10100110 01111111 (nrzi)

11111110 01011010 11010010 00100010 11111010 11001010 11111110 (수신데이터)
01111111 01011010 01001011 01000100 01011111 01010011 01111111 (수신데이터 바이트 단위 순서 변경)

 

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

HDLC bit stuff  (0) 2022.08.29
hdlc nrzi encoder / decoder (bit stuff 제외)  (0) 2022.08.29
HDLC FCS ccitt-1 16bit crc  (0) 2021.12.06
HDLC 프로토콜(High level Data Link Control)  (0) 2021.07.27
Posted by 구차니
모종의 음모/HDLC2021. 12. 6. 18:22
Posted by 구차니