USRP Client 프로그램은 DS5QDR 오엠께서 만드셨고, DVSwitch의 파생 프로그램으로 DVPi와 어느 정도 호환성이 있습니다.
DS5QDR 홈페이지 : https://ds5qdr-dv.tistory.com/
이번에 만든 DVPi 하드웨어에 USRP Client 프로그램 만 SD카드에 구워 넣어서 구동해 보았습니다.
원래 QDR 오엠님께서 7인치 HDMI 터치스크린에 맞추어 만든 것을 3.5인치 GPIO 터치스크린으로 해상도를 변경하고, 터치스크린 Calibration을 하여 사용하였습니다.
PTT 회로도 DVPi와 동일하므로 호환되고, USB 사운드 카드도 역시 호환되어 스피커 및 마이크도 사용에 지장이 없습니다.
다음은 조정한 부분들에 대한 설명입니다.
1) 3.5인치 GPIO 터치스크린 사용
pi/usrp 로 로그인하여
cd /home/pi/LCD-show && ./LCD35-show 180 를 실행합니다.
3.5인치 GPIO 방식 터치스크린을 위아래 반전시켜 사용하게 하는 명령어 입니다.
반전이 안되는 터치스크린을 사용시에는 맨 뒤의 180을 생략합니다.
실행후 라즈베리파이는 자동적으로 리부팅됩니다.
HDMI 터치스크린을 사용할 때에는 동일 디렉토리 내의 해당하는 파일을 실행시키면 됩니다.
2) 화면 표시 설정
화면 표시 설정에 관련된 /boot/config.txt 파일입니다. DVPi 에 쓰인 것을 보고 수정했습니다.
sudo nano /boot/config.txt 를 치고 수정합니다.
----------------------
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
framebuffer_width=800
framebuffer_height=480
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
enable_uart=1
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=waveshare35a
#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,sw$
hdmi_force_hotplug=1
#max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2
display_rotate=2
----------------------
이렇게 수정하고 저장합니다. Ctrl-C > Y > 엔터
위 내용중 붉은색으로 표시한 부분은 X-window (GUI) 상에서 표시되는 USRP Client 화면의 크기를 조정하는 부분입니다. 원래 3.5인치 터치스크린의 해상도가 480x320인데 GUI 화면은 위와 같이 5인치 터치스크린의 해상도와 같은 800x480으로 설정해야 화면에 꽉 차는군요.
파일 내용중 hdmi로 시작하는 것들은 HDMI 터치스크린을 사용할 때 적용되는 것들이므로 무시해도 됩니다.
3) 터치스크린 교정
반전되는 터치스크린을 바로 표시되게 하기위하여 위와 같이 상하를 반전시키면 수평축 및 수직축 터치 포인트도 반전되어 스타일러스 펜을 화면상에서 드래그해 보면 포인터가 반대방향으로 움직여서 제대로 된 포인트를 찍을 수 없게 됩니다.
이를 교정하기 위한 방법입니다.
USRP 프로그램을 종료하고, X-window 바탕화면으로 나갑니다.
라즈베리(딸기) 모양 아이콘을 클릭하고 Preference > Calibrate Touchscreen 을 클릭합니다.
화면 모서리 4군데에 순차적으로 작은 십자선이 나오면 제한 시간이 지나기 전에 스타일러스 펜으로 찍어야 합니다. 완료되면 다음과 같은 화면이 나옵니다.
일회성이 아니고 리부팅 후에도 이 교정값이 유효하게 하려면 화면에 표시된 교정값을 특정파일에 저장하라는 안내 글입니다.
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf 으로 파일을 편집합니다.
-------
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "230 3901 3881 221"
Option "SwapAxes" "1"
EndSection
-------
이렇게 수정하고 저장합니다. Ctrl-C > Y > 엔터
sudo reboot 로 라즈베리파이를 리부팅합니다.
상하반전 터치스크린인 경우 Option "SwapAxes" "1" 을 넣어줘야 X축과 Y축 포인터 움직임 방향이 맞게되어 제대로 포인트를 찍을 수 있게 됩니다.
첫댓글 감사합니다
정리 잘 된 것 같습니다
저도 DVPi 시스템에 USRP 수동 설치하여 사용하고 있습니다
위에서도 언급한 것처럼
- 해상도 DVPi 480x320 을 USRP 800x480
차이만 나고 나머지 하드웨어는 호환성 되게 구성되어 있습니다
상세 설명 감사합니다