리눅스 S.Bus 드라이버
리눅스 S.Bus드라이버 는 리눅스 기반 자동조종장치가 시리얼 포트를 통해 후타바 S.Bus수신기의 최대 16채널까지 엑세스할 수 있습니다. 드라이버는 FrSky와 RadioLink, S.Bus 인코더와 같은 S.Bus 프로토콜을 사옹하는 다른 수신기들에서도 작동된다.
A signal inverter circuit is required (described below) to enable the device serial port to read data from the receiver.
The driver has been tested on Raspberry Pi running Rasbian Linux, when connected to the receiver through the onboard serial port or via a USB to TTY serial cable. It is expected to work on all Linux versions, and through all serial ports.
Signal inverter circuit
S.Bus is an inverted UART communication signal. As many serial ports/flight controllers cannot read an inverted UART signal, a signal inverter circuit is required between the receiver and serial port un-invert the signal. This section shows how to create an appropriate circuit.
This circuit is required for Raspberry Pi to read S.Bus remote control signals through the serial port or USB-to-TTY serial converter. It will also be required for many other flight controllers.
- 1x NPN transistor (e.g. NPN S9014 TO92)
- 1x 10K resistor
- 1x 1K resistor
Any type/model of transistor can be used because the current drain is very low.
Raspberry Pi only has a single serial port. If this is already being used you can alternatively connect your S.Bus receiver to the RaPi USB port, via a USB to TTY serial cable (e.g. PL2302 USB to TTL serial converter)
Connect the components as described below (and shown in the circuit diagram):
- S.Bus signal → 1K resistor → NPN transistor base
- NPN transistor emit → GND
- 3.3VCC → 10K resistor → NPN transistor collection → USB-to-TTY rxd
- 5.0VCC → S.Bus VCC
- GND → S.Bus GND
The image below shows the connections on a breadboard.
The command syntax is:
linux_sbus start|stop|status -d <device> -c <channel>
So for example, to automatically start the driver listening to 8 channels on device
/dev/ttyUSB0, you would add the following line to the startup configuration file.
linux_sbus start -d /dev/ttyUSB0 -c 8
The original configuration files are located in Firmware/posix-configs. According to the official documentation, after you finish
make uploadrelated operations, all posix related configuration files will be placed in /home/pi. You can modify the file you want to use there.