Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 4.97 KB

week_2~3.md

File metadata and controls

101 lines (70 loc) · 4.97 KB

2~3주차

라즈베리 파이에서 UV4L 서버 연결까지 진행 과정 중 issue 메모

1. 모니터 오류

/boot/config.txt

- hdmi_group=1
- config_hdmi_boost=4
- hdmi_force_hotpulg=1  //hdmi 신호 강제 출력
- hdmi_drive=2  //raspbmc를 일반 hdmi 모드로 설정
                //DVI 만 출력하는 옵션으로 사운드가 안들린다고 함

2. 계정, 비밀 번호

    pi / raspberry

3. UV4L 설치 오류 (03.15~16)

    0. 저장소 미러 변경 (-> 카이스트) 
        {참고} https://engineeringcode.tistory.com/48
    
    1. `curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add -`
        {원인} 키보드 국적이 타국으로 설정되어 있어 |가 아닌 ~로 출력
        {해결} raspberry OS 에서 키보드 설정 Korean으로 변경해줌
        
    2. `/etc/resolv.conf: No such file or directory`
        {해결} 파일 지우고 재생성
        root 자격 얻기 : sudo su / exit
        $rm /etc/resolv.conf
        $echo "nameserver 8.8.8.8" > /etc/resolv.conf
        (다음 줄에 적으려면) ($echo "nameserver 8.8.4.4" >> /etc/resolv.conf)
        {참고} https://nhj12311.tistory.com/152
        
    3. 라즈베리파이 시간 수동 변경 : date -s "2021-03-16 00:00:00"
        {해결} 라즈베리파이 시간 동기화
        {참고} https://robotbef.tistory.com/105
        
    4. `curl: could not resolv host`
        {해결} WIFI 변경 (sejong -> T free wifi zone)
        
    5. gpg: no valid opengpg data found
        {해결} $ gpg -a --export [오류 뜨는 퍼블릭 키 번호] | sudo apt-key add-
  • 와이파이 문제 참고

    (1) 라즈베리파이3에 기존 strech 버전의 OS를 사용하고 있다면 wifi-country를 GB로 설정해야한다.

    (2) 라즈베리파이3에 기존 strech 버전의 OS를 사용하고 있다면 wifi 공유기의 무선랜 채널이 11을 초과해서는 안된다.

    (3) 라즈베리파이4에 buster버전의 OS를 사용한다면 wifi공유기가 5G를 지원한다면 wifi-country를 대한민국으로 설정하고 %G로 된 wifi만 연결이 가능하다.

    (4) 라즈베리파이4에 buster버전의 OS를 사용한다면 wifi공유기가 5G를 지원하지 않는다면 wifi-country를 GB로 설정하여야 wifi가 검색된다. GB로 설정하고 연결하면 된다.

  • apt와 apt-get의 차이

    apt-get은 패키지 설치를 담당하고, apt-cache는 패키지 검색을 담당하는 tool이다. 결론적으로 apt-get이 아닌 apt를 사용하는 것이 사용성 측면에서 유리하다.

  • ssid 수정

    `$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf`
    

UV4L-WebRTC 오류 (03.17~19)

  1. `gpg: no valid OpenPGP data found`
      {해결} nameserver 확인
      $ cat /etc/resolv.conf 확인 후 127.0.0.1 이면
      $ sudo nano /etc/resolv.conf에서 nameserver을 8.8.8.8로 수정해줌
  
  2. UV4L 서버 연결이 안될 경우
      {해결} 장치 활성화 
      $ sudo pkill uv4l
      $ sudo uv4l -nopreview --auto-video_nr --driver raspicam --encoding mjpeg --width 1280 --height 720 --framerate 25 --server-option '--port=9090' --server-option '--max-queued-connections=30' --server-option '--max-streams=25' --server-option '--max-threads=29' 
      {참고} https://inmile.tistory.com/24?category=793890
      {주요} $ sudo uv4l --driver raspicam --auto-video_nr --wiidth 640 --height 480 --encoding jpeg
      
  3. Camera 연결 여부
      {오류} Raspicam인 줄 알고, raspicam에 대해 연결 방법 강구
             `vcgencmd get_camera` 명령어에서 detected와 supported가 동일해야 라즈파이캠 연결 
      {해결} 사용하는 웹캠은 USB 캠이었음. (uvc)
              `lsusb' 라즈베리파이에 연결된 usb 정보 확인
              `dmseg` 라즈베리파이 정보 확인
              dmseg 내의 usb 1-1.3 : Product : USB 2.0 Camera 확인
              idVendor=0c33, idProduct=6344
              
 4. UV4L streaming server 연결 오류
     ` sudo nano /etc/uv4l/uv4l-raspicam.conf `는 raspicam.conf를 수정할 수 있는 명령어
     uv4l-uvc.conf가 USB 웹캠 conf 파일인지 인지하기 전, raspicam과 웹캠을 연결하기 위해 
     raspicam.conf에서 driver=uvc로 변경함
     {해결} uv4l-raspi.conf 내에 있는 ##streaming server option의 webRTC 주석부분을 모두 해제해줌
     {참고} https://www.dropbox.com/s/42cfyfgrjccl7jn/Reef%20Nerd%20Tutorial%20-%20Setting%20up%20a%20Raspberry%20Pi%20Reef%20Cam%20and%20Website.pdf?dl=0
  • 비디오 연결 정상적인지 확인 코드

v4l2-ctl -V

dd if=/dev/video0 of=snapshot.jpeg bs=11M count=1