embeded/raspberry pi2015. 8. 9. 12:13

라즈베리 파이 기본 시간설정은 Etc/UTC인데

이걸 바꾸러면 raspbi-config를 통해 바꾸거나 수작업으로 바꿔도 될 듯

이걸 안바꾸고 rdate를 통해 시간대를 변경하려고 하면

UTC를 기준으로 변경되어 버린다. -_-a


$ cat /etc/timezone

Etc/UTC


$ sudo raspbi-config


$ cat /etc/timezone

Asia/Seoul


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=4977&f=5]

Posted by 구차니
embeded/raspberry pi2015. 8. 9. 10:54

MMAL은 VideoCore 용 멀티미디어 컴포넌트 인터페이스 이다.

MMAL (Multi-Media Abstraction Layer) is a framework which is used to provide a host-side, simple and relatively low-level interface to multimedia components running on VideoCore. It also provides a component interface so that new components can be easily created and integrated into the framework.


There is no requirement that all the components be running on VideoCore as MMAL doesn't put any restriction on where components live. The current implementation for instance provides some components which can be run on both host-side or VideoCore (e.g. the splitter component).


[링크 : http://www.jvcref.com/files/PI/documentation/html/] 


문제(?)는 이녀석은 범용은 아니란거

VideoCore란거 자체가.. Broadcom 꺼다 보니.. 결론은 Broadcom용 제품을 효율적으로 쓰려면 이녀석을 써야 한다?

VideoCore is a low-power mobile multimedia processor architecture originally developed by Alphamosaic Ltd and now owned by Broadcom. Its two-dimensional DSP architecture makes it flexible and efficient enough to decode as well as encode a number of multimedia codecs in software, while maintaining low power usage. The semiconductor intellectual property core (SIP core) has been found so far only on Broadcom SoCs.


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


아무튼.. mmal을 바로 쓰는 motion 프로젝트도 존재

[링크 : http://www.rasplay.org/?p=4910]


다운로드 경로가 dropbox라고 되어 있는데 경로가 안보이길래 검색..

[링크 : https://www.dropbox.com/s/0gzxtkxhvwgfocs/motion-mmal.tar.gz]

    [링크 : http://embeddedday.com/projects/raspberry-pi/a-step-further/install-motion-mmal/]

Posted by 구차니
embeded/raspberry pi2015. 8. 9. 10:08

하드웨어 가속을 받아서 그런가 CPU점유율이 실질적으로 0!!

ㄷㄷㄷ

pi@raspberrypi ~ $ raspivid -t 0 -v


raspivid Camera App v1.3.12


Width 1920, Height 1080, filename (null)

bitrate 17000000, framerate 30, time delay 0

H264 Profile high

H264 Quantisation level 0, Inline headers No

H264 Intra refresh type (null), period -1

Wait method : Capture forever

Initial state 'record'



Preview Yes, Full screen Yes

Preview window 0,0,1024,768

Opacity 255

Sharpness 0, Contrast 0, Brightness 50

Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0

Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'

Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128

Rotation 0, hflip No, vflip No

ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000

Camera component done

Encoder component done

Starting component connection stage

Connecting camera preview port to preview input port

Starting video preview

Connecting camera stills port to encoder input port

Enabling encoder output port


raspivid 프로세스가 왕창 떠있는데 cpu는 하나도 안먹네.. ㄷㄷㄷ

화면을 흔들던 말던 cpu 점유율은 0에서 움직이질 않는다.

raw를 받아서 fb에 덮어 버리는건가? ㄷㄷㄷ



Posted by 구차니
embeded/raspberry pi2015. 8. 9. 01:02

CSI 를 통한 카메라가 v4l을 지원하지 않아 좀 불편해서..

(현재까진 raspivid 툴을 통해서 stdin으로 받는 수 밖에..)

이리저리 방법을 찾는중


음? MMAL은 또 머지?

The camera works with all models of Raspberry Pi 1 and 2. It can be accessed through the MMAL and V4L APIs, and there are numerous third-party libraries built for it, including the Picamera Python library.

[링크 : https://www.raspberrypi.org/products/camera-module/]


머.. 쉽게 될리가 없나? ㅋㅋㅋ

일단 automake에서 파일이 없다고 배째는 지라 확인필요 ㅠㅠ


---

빌드 명령어 모음

$ git clone git://git.linuxtv.org/v4l-utils.git

$ cd v4l-utils/

$ sudo apt-get install autoconf gettext libtool libjpeg62-dev

$ ./bootstrap.sh

$ ./configure

$ vi utils/dvb/Makefile

LIBS = -lrt

$ make -j 4

$ sudo make install

$ sudo modprobe bcm2835-v4l2

$ sudo v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=4

$ vlc


set은 sudo를 통해 되지만.

vlc로 받는 순간 다시 원복된다 머지...


$ v4l2-ctl --get-fmt-video

Format Video Capture:

        Width/Height      : 2592/16

        Pixel Format      : 'YU12'

        Field             : None

        Bytes per Line    : 3888

        Size Image        : 62208

        Colorspace        : SMPTE 170M

        Transfer Function : Default

        YCbCr Encoding    : Default

        Quantization      : Default

        Flags             :


---




pi@raspberrypi ~/src/v4l-utils $ lsmod | grep -i v4l

pi@raspberrypi ~/src/v4l-utils $ sudo modprobe bcm2835-v4l2

pi@raspberrypi ~/src/v4l-utils $ lsmod | grep -i v4l

bcm2835_v4l2           37225  0

videobuf2_vmalloc       3009  1 bcm2835_v4l2

videobuf2_core         33578  1 bcm2835_v4l2

v4l2_common             5077  2 bcm2835_v4l2,videobuf2_core

videodev              122487  3 bcm2835_v4l2,v4l2_common,videobuf2_core

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --overlay=1

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --stream-mmap=3 --stream-count=100 --stream-to=somefile.264

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27 fps

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29 fps

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 28 fps

<<<<<<<<<<<<<

pi@raspberrypi ~/src/v4l-utils $ file somefile.264

somefile.264: JVT NAL sequence, H.264 video @ L 40

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --list-formats

ioctl: VIDIOC_ENUM_FMT

        Index       : 0

        Type        : Video Capture

        Pixel Format: 'YU12'

        Name        : 4:2:0, packed YUV


        Index       : 1

        Type        : Video Capture

        Pixel Format: 'YUYV'

        Name        : 4:2:2, packed, YUYV


        Index       : 2

        Type        : Video Capture

        Pixel Format: 'RGB3'

        Name        : RGB24 (LE)


        Index       : 3

        Type        : Video Capture

        Pixel Format: 'JPEG' (compressed)

        Name        : JPEG


        Index       : 4

        Type        : Video Capture

        Pixel Format: 'H264' (compressed)

        Name        : H264


        Index       : 5

        Type        : Video Capture

        Pixel Format: 'MJPG' (compressed)

        Name        : MJPEG


        Index       : 6

        Type        : Video Capture

        Pixel Format: 'YVYU'

        Name        : 4:2:2, packed, YVYU


        Index       : 7

        Type        : Video Capture

        Pixel Format: 'VYUY'

        Name        : 4:2:2, packed, VYUY


        Index       : 8

        Type        : Video Capture

        Pixel Format: 'UYVY'

        Name        : 4:2:2, packed, UYVY


        Index       : 9

        Type        : Video Capture

        Pixel Format: 'NV12'

        Name        : 4:2:0, packed, NV12


        Index       : 10

        Type        : Video Capture

        Pixel Format: 'BGR3'

        Name        : RGB24 (BE)


        Index       : 11

        Type        : Video Capture

        Pixel Format: 'YV12'

        Name        : 4:2:0, packed YVU


        Index       : 12

        Type        : Video Capture

        Pixel Format: 'NV21'

        Name        : 4:2:0, packed, NV21


        Index       : 13

        Type        : Video Capture

        Pixel Format: 'BGR4'

        Name        : RGB32 (BE)


pi@raspberrypi ~ $ v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4

pi@raspberrypi ~ $ vlc





+

User space v4l driver

[링크 : http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14]


+

Kernel v4l driver / module

pi@raspberrypi ~/src $ git clone git://git.linuxtv.org/v4l-utils.git

Cloning into 'v4l-utils'...

remote: Counting objects: 21249, done.

remote: Compressing objects: 100% (4162/4162), done.

remote: Total 21249 (delta 16889), reused 21249 (delta 16889)

Receiving objects: 100% (21249/21249), 3.55 MiB | 699 KiB/s, done.

Resolving deltas: 100% (16889/16889), done.


pi@raspberrypi ~/src $ cd v4l-utils/

pi@raspberrypi ~/src/v4l-utils $ sudo apt-get install autoconf gettext libtool libjpeg62-dev

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다

상태 정보를 읽는 중입니다... 완료

다음 패키지를 더 설치할 것입니다:

  automake autopoint autotools-dev libgettextpo0 libjpeg62 libltdl-dev

  libunistring0 m4

제안하는 패키지:

  autoconf2.13 autoconf-archive gnu-standards autoconf-doc gettext-doc

  libtool-doc automaken gfortran fortran95-compiler gcj

다음 새 패키지를 설치할 것입니다:

  autoconf automake autopoint autotools-dev gettext libgettextpo0 libjpeg62

  libjpeg62-dev libltdl-dev libtool libunistring0 m4

0개 업그레이드, 12개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.

5,660 k바이트 아카이브를 받아야 합니다.

이 작업 후 15.2 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까 [Y/n]?

받기:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libunistring0 armhf 0.9.3-5 [408 kB]

받기:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgettextpo0 armhf 0.18.1.1-9 [130 kB]

받기:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libjpeg62 armhf 6b1-3+deb7u1 [85.9 kB]

받기:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main m4 armhf 1.4.16-3 [246 kB]

받기:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autoconf all 2.69-1 [589 kB]

받기:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autotools-dev all 20120608.1 [73.0 kB]

받기:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main automake all 1:1.11.6-1 [607 kB]

받기:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autopoint all 0.18.1.1-9 [629 kB]

받기:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main gettext armhf 0.18.1.1-9 [1,879 kB]

받기:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libltdl-dev armhf 2.4.2-1.1 [203 kB]

받기:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libtool armhf 2.4.2-1.1 [618 kB]

받기:12 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libjpeg62-dev armhf 6b1-3+deb7u1 [191 kB]

내려받기 5,660 k바이트, 소요시간 6초 (825 k바이트/초)

Selecting previously unselected package libunistring0:armhf.

(데이터베이스 읽는중 ...현재 92899개의 파일과 디렉터리가 설치되어 있습니다.)

libunistring0:armhf 패키지를 푸는 중입니다 (.../libunistring0_0.9.3-5_armhf.deb에서) ...

Selecting previously unselected package libgettextpo0:armhf.

libgettextpo0:armhf 패키지를 푸는 중입니다 (.../libgettextpo0_0.18.1.1-9_armhf.deb에서) ...

Selecting previously unselected package libjpeg62:armhf.

libjpeg62:armhf 패키지를 푸는 중입니다 (.../libjpeg62_6b1-3+deb7u1_armhf.deb에서) ...

Selecting previously unselected package m4.

m4 패키지를 푸는 중입니다 (.../archives/m4_1.4.16-3_armhf.deb에서) ...

Selecting previously unselected package autoconf.

autoconf 패키지를 푸는 중입니다 (.../autoconf_2.69-1_all.deb에서) ...

Selecting previously unselected package autotools-dev.

autotools-dev 패키지를 푸는 중입니다 (.../autotools-dev_20120608.1_all.deb에서) ...

Selecting previously unselected package automake.

automake 패키지를 푸는 중입니다 (.../automake_1%3a1.11.6-1_all.deb에서) ...

Selecting previously unselected package autopoint.

autopoint 패키지를 푸는 중입니다 (.../autopoint_0.18.1.1-9_all.deb에서) ...

Selecting previously unselected package gettext.

gettext 패키지를 푸는 중입니다 (.../gettext_0.18.1.1-9_armhf.deb에서) ...

Selecting previously unselected package libltdl-dev:armhf.

libltdl-dev:armhf 패키지를 푸는 중입니다 (.../libltdl-dev_2.4.2-1.1_armhf.deb에서) ...

Selecting previously unselected package libtool.

libtool 패키지를 푸는 중입니다 (.../libtool_2.4.2-1.1_armhf.deb에서) ...

Selecting previously unselected package libjpeg62-dev:armhf.

libjpeg62-dev:armhf 패키지를 푸는 중입니다 (.../libjpeg62-dev_6b1-3+deb7u1_armhf.deb에서) ...

install-info에 대한 트리거를 처리하는 중입니다 ...

man-db에 대한 트리거를 처리하는 중입니다 ...

libunistring0:armhf (0.9.3-5) 설정하는 중입니다 ...

libgettextpo0:armhf (0.18.1.1-9) 설정하는 중입니다 ...

libjpeg62:armhf (6b1-3+deb7u1) 설정하는 중입니다 ...

m4 (1.4.16-3) 설정하는 중입니다 ...

autoconf (2.69-1) 설정하는 중입니다 ...

autotools-dev (20120608.1) 설정하는 중입니다 ...

automake (1:1.11.6-1) 설정하는 중입니다 ...

update-alternatives: using /usr/bin/automake-1.11 to provide /usr/bin/automake (automake) in 자동 모드

autopoint (0.18.1.1-9) 설정하는 중입니다 ...

gettext (0.18.1.1-9) 설정하는 중입니다 ...

libltdl-dev:armhf (2.4.2-1.1) 설정하는 중입니다 ...

libtool (2.4.2-1.1) 설정하는 중입니다 ...

libjpeg62-dev:armhf (6b1-3+deb7u1) 설정하는 중입니다 ...


pi@raspberrypi ~/src/v4l-utils $  autoreconf -vfi

autoreconf: Entering directory `.'

autoreconf: configure.ac: not using Gettext

autoreconf: running: aclocal --force -I m4

autoreconf: configure.ac: tracing

autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION

autoreconf: configure.ac: creating directory build-aux

autoreconf: running: libtoolize --copy --force

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.

libtoolize: copying file `build-aux/ltmain.sh'

libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.

libtoolize: copying file `m4/libtool.m4'

libtoolize: copying file `m4/ltoptions.m4'

libtoolize: copying file `m4/ltsugar.m4'

libtoolize: copying file `m4/ltversion.m4'

libtoolize: copying file `m4/lt~obsolete.m4'

autoreconf: running: /usr/bin/autoconf --force

autoreconf: running: /usr/bin/autoheader --force

autoreconf: running: automake --add-missing --copy --force-missing

configure.ac:76: installing `build-aux/config.guess'

configure.ac:83: required file `build-aux/config.rpath' not found

configure.ac:76: installing `build-aux/config.sub'

configure.ac:67: installing `build-aux/install-sh'

configure.ac:67: installing `build-aux/missing'

contrib/cobalt/Makefile.am: installing `build-aux/depcomp'

autoreconf: automake failed with exit status: 1


pi@raspberrypi ~/src/v4l-utils $ ./configure

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking minix/config.h usability... no

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking whether to enable maintainer-specific portions of Makefiles... no

checking whether make supports nested variables... yes

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking for gcc option to accept ISO C99... -std=gnu99

checking build system type... armv7l-unknown-linux-gnueabihf

checking host system type... armv7l-unknown-linux-gnueabihf

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by gcc -std=gnu99... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop

checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... @

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok

checking for sysroot... no

checking for mt... mt

checking if mt is a manifest tool... no

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no

checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC

checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes

checking if gcc -std=gnu99 static flag -static works... yes

checking if gcc -std=gnu99 supports -c -o file.o... yes

checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes

checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking how to run the C++ preprocessor... g++ -E

checking for ld used by g++... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC -DPIC

checking if g++ PIC flag -fPIC -DPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... (cached) GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether ln -s works... yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for doxygen... no

configure: WARNING: doxygen not found - will not generate any doxygen documentation

checking for perl... /usr/bin/perl

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for msgmerge... /usr/bin/msgmerge

checking for ld used by GCC... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for shared library run path origin... /bin/bash: build-aux/config.rpath: No such file or directory

done

checking for CFPreferencesCopyAppValue... no

checking for CFLocaleCopyCurrent... no

checking for GNU gettext in libc... yes

checking whether to use NLS... yes

checking where the gettext function comes from... libc

checking for mode_t... yes

checking for promoted mode_t type... mode_t

checking whether the -Werror option is usable... yes

checking for simple visibility declarations... yes

checking sys/klog.h usability... yes

checking sys/klog.h presence... yes

checking for sys/klog.h... yes

checking for klogctl... yes

checking for ioctl with POSIX signature... no

checking for __secure_getenv... yes

checking for secure_getenv... no

checking for X11... yes

checking for GL... yes

checking for GLU... yes

checking jpeglib.h usability... yes

checking jpeglib.h presence... yes

checking for jpeglib.h... yes

checking for jpeg_read_header in -ljpeg... yes

checking for QT5... no

checking for QT... no

configure: WARNING: Qt4 or higher is not available

checking for ALSA... no

configure: WARNING: ALSA library not available

checking for library containing dlopen... -ldl

checking argp.h usability... yes

checking argp.h presence... yes

checking for argp.h... yes

checking for library containing argp_parse... none required

checking linux/i2c-dev.h usability... yes

checking linux/i2c-dev.h presence... yes

checking for linux/i2c-dev.h... yes

checking for iconv... yes

checking for working iconv... yes

checking for iconv declaration...

         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);

./configure: line 21526: test: =: unary operator expected

configure: creating ./config.status

config.status: error: cannot find input file: `Makefile.in'


[링크 : http://www.ics.com/blog/raspberry-pi-camera-module] 


+

INSTALL 문서를 보니

Building:

---------


If you checked out the source repository you need to install the autotools

environment and gettext first.


The autotools/gettext should be updated to the version that are shipped

on your distro. This can be done by running:

        $ ./bootstrap.sh


Then you need to configure any any desired options with:

        $ ./configure


You can get a summary of possible configurations via the --help option.

If used without arguments, it will set the install prefix to /usr/local/.


After configuration you need to start the build process with:

        $ make


Installing:

-----------


To install it at the prefix configured by ./configure, do, as root:

        # make install


Note that v4l-utils' "make install" supports DESTDIR for installing into

a build root for example:

        # make install DESTDIR=/mnt/sysimage 


$ ./bootstrap.sh

를 실행하래서 쿨하게 실행중 


pi@raspberrypi ~/src/v4l-utils $ ./bootstrap.sh

autoreconf: Entering directory `.'

autoreconf: configure.ac: not using Gettext

autoreconf: running: aclocal --force -I m4

autoreconf: configure.ac: tracing

autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION

autoreconf: running: libtoolize --copy --force

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.

libtoolize: copying file `build-aux/ltmain.sh'

libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.

libtoolize: copying file `m4/libtool.m4'

libtoolize: copying file `m4/ltoptions.m4'

libtoolize: copying file `m4/ltsugar.m4'

libtoolize: copying file `m4/ltversion.m4'

libtoolize: copying file `m4/lt~obsolete.m4'

autoreconf: running: /usr/bin/autoconf --force

autoreconf: running: /usr/bin/autoheader --force

autoreconf: running: automake --add-missing --copy --force-missing

autoreconf: Leaving directory `.'

Generating locale v4l-utils-po build files for gettext version 0.18.1

Generating locale libdvbv5-po build files for gettext version 0.18.1 


오예!!!

pi@raspberrypi ~/src/v4l-utils $ ./configure

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking minix/config.h usability... no

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking whether to enable maintainer-specific portions of Makefiles... no

checking whether make supports nested variables... yes

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking for gcc option to accept ISO C99... -std=gnu99

checking build system type... armv7l-unknown-linux-gnueabihf

checking host system type... armv7l-unknown-linux-gnueabihf

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by gcc -std=gnu99... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop

checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... @

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok

checking for sysroot... no

checking for mt... mt

checking if mt is a manifest tool... no

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no

checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC

checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes

checking if gcc -std=gnu99 static flag -static works... yes

checking if gcc -std=gnu99 supports -c -o file.o... yes

checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes

checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking how to run the C++ preprocessor... g++ -E

checking for ld used by g++... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC -DPIC

checking if g++ PIC flag -fPIC -DPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... (cached) GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether ln -s works... yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for doxygen... no

configure: WARNING: doxygen not found - will not generate any doxygen documentation

checking for perl... /usr/bin/perl

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for msgmerge... /usr/bin/msgmerge

checking for ld used by GCC... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for shared library run path origin... done

checking for CFPreferencesCopyAppValue... no

checking for CFLocaleCopyCurrent... no

checking for GNU gettext in libc... yes

checking whether to use NLS... yes

checking where the gettext function comes from... libc

checking for mode_t... yes

checking for promoted mode_t type... mode_t

checking whether the -Werror option is usable... yes

checking for simple visibility declarations... yes

checking sys/klog.h usability... yes

checking sys/klog.h presence... yes

checking for sys/klog.h... yes

checking for klogctl... yes

checking for ioctl with POSIX signature... no

checking for __secure_getenv... yes

checking for secure_getenv... no

checking for X11... yes

checking for GL... yes

checking for GLU... yes

checking jpeglib.h usability... yes

checking jpeglib.h presence... yes

checking for jpeglib.h... yes

checking for jpeg_read_header in -ljpeg... yes

checking for QT5... no

checking for QT... no

configure: WARNING: Qt4 or higher is not available

checking for ALSA... no

configure: WARNING: ALSA library not available

checking for library containing dlopen... -ldl

checking argp.h usability... yes

checking argp.h presence... yes

checking for argp.h... yes

checking for library containing argp_parse... none required

checking linux/i2c-dev.h usability... yes

checking linux/i2c-dev.h presence... yes

checking for linux/i2c-dev.h... yes

checking for iconv... yes

checking for working iconv... yes

checking for iconv declaration...

         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);

./configure: line 21526: test: =: unary operator expected

configure: creating ./config.status

config.status: creating Makefile

config.status: creating lib/Makefile

config.status: creating lib/libv4lconvert/Makefile

config.status: creating lib/libv4l2/Makefile

config.status: creating lib/libv4l1/Makefile

config.status: creating lib/libdvbv5/Makefile

config.status: creating lib/libv4l2rds/Makefile

config.status: creating lib/libv4l-mplane/Makefile

config.status: creating utils/Makefile

config.status: creating utils/libv4l2util/Makefile

config.status: creating utils/libmedia_dev/Makefile

config.status: creating utils/decode_tm6000/Makefile

config.status: creating utils/dvb/Makefile

config.status: creating utils/keytable/Makefile

config.status: creating utils/media-ctl/Makefile

config.status: creating utils/rds/Makefile

config.status: creating utils/v4l2-compliance/Makefile

config.status: creating utils/v4l2-ctl/Makefile

config.status: creating utils/v4l2-dbg/Makefile

config.status: creating utils/v4l2-sysfs-path/Makefile

config.status: creating utils/xc3028-firmware/Makefile

config.status: creating utils/qv4l2/Makefile

config.status: creating utils/rds-ctl/Makefile

config.status: creating contrib/Makefile

config.status: creating contrib/freebsd/Makefile

config.status: creating contrib/test/Makefile

config.status: creating contrib/gconv/Makefile

config.status: creating contrib/cobalt/Makefile

config.status: creating v4l-utils-po/Makefile.in

config.status: creating libdvbv5-po/Makefile.in

config.status: creating v4l-utils.spec

config.status: creating lib/libv4lconvert/libv4lconvert.pc

config.status: creating lib/libv4l1/libv4l1.pc

config.status: creating lib/libv4l2/libv4l2.pc

config.status: creating lib/libdvbv5/libdvbv5.pc

config.status: creating lib/libv4l2rds/libv4l2rds.pc

config.status: creating utils/media-ctl/libmediactl.pc

config.status: creating utils/media-ctl/libv4l2subdev.pc

config.status: creating utils/qv4l2/qv4l2.1

config.status: creating utils/v4l2-compliance/v4l2-compliance.1

config.status: creating utils/v4l2-ctl/v4l2-ctl.1

config.status: creating utils/keytable/ir-keytable.1

config.status: creating utils/dvb/dvb-fe-tool.1

config.status: creating utils/dvb/dvbv5-scan.1

config.status: creating utils/dvb/dvb-format-convert.1

config.status: creating utils/dvb/dvbv5-zap.1

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

config.status: executing po-directories commands

config.status: creating v4l-utils-po/POTFILES

config.status: creating v4l-utils-po/Makefile

config.status: creating libdvbv5-po/POTFILES

config.status: creating libdvbv5-po/Makefile 


$ make

...

make[3]: Entering directory '/home/pi/src/v4l-utils/utils/dvb'

  CC     dvb-fe-tool.o

  CCLD   dvb-fe-tool

../../lib/libdvbv5/.libs/libdvbv5.so: undefined reference to `clock_gettime' 


아으으으으윽 ㅠㅠ


pi@raspberrypi ~/src/v4l-utils $ ./configure --help

`configure' configures v4l-utils 1.7.0 to adapt to many kinds of systems.


Usage: ./configure [OPTION]... [VAR=VALUE]...


To assign environment variables (e.g., CC, CFLAGS...), specify them as

VAR=VALUE.  See below for descriptions of some of the useful variables.


Defaults for the options are specified in brackets.


Configuration:

  -h, --help              display this help and exit

      --help=short        display options specific to this package

      --help=recursive    display the short help of all the included packages

  -V, --version           display version information and exit

  -q, --quiet, --silent   do not print `checking ...' messages

      --cache-file=FILE   cache test results in FILE [disabled]

  -C, --config-cache      alias for `--cache-file=config.cache'

  -n, --no-create         do not create output files

      --srcdir=DIR        find the sources in DIR [configure dir or `..']


Installation directories:

  --prefix=PREFIX         install architecture-independent files in PREFIX

                          [/usr/local]

  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

                          [PREFIX]


By default, `make install' will install all the files in

`/usr/local/bin', `/usr/local/lib' etc.  You can specify

an installation prefix other than `/usr/local' using `--prefix',

for instance `--prefix=$HOME'.


For better control, use the options below.


Fine tuning of the installation directories:

  --bindir=DIR            user executables [EPREFIX/bin]

  --sbindir=DIR           system admin executables [EPREFIX/sbin]

  --libexecdir=DIR        program executables [EPREFIX/libexec]

  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]

  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]

  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]

  --libdir=DIR            object code libraries [EPREFIX/lib]

  --includedir=DIR        C header files [PREFIX/include]

  --oldincludedir=DIR     C header files for non-gcc [/usr/include]

  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]

  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]

  --infodir=DIR           info documentation [DATAROOTDIR/info]

  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]

  --mandir=DIR            man documentation [DATAROOTDIR/man]

  --docdir=DIR            documentation root [DATAROOTDIR/doc/v4l-utils]

  --htmldir=DIR           html documentation [DOCDIR]

  --dvidir=DIR            dvi documentation [DOCDIR]

  --pdfdir=DIR            pdf documentation [DOCDIR]

  --psdir=DIR             ps documentation [DOCDIR]


Program names:

  --program-prefix=PREFIX            prepend PREFIX to installed program names

  --program-suffix=SUFFIX            append SUFFIX to installed program names

  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names


System types:

  --build=BUILD     configure for building on BUILD [guessed]

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]


Optional Features:

  --disable-option-checking  ignore unrecognized --enable/--with options

  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)

  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

  --disable-dependency-tracking  speeds up one-time build

  --enable-dependency-tracking   do not reject slow dependency extractors

  --enable-maintainer-mode  enable make rules and dependencies not useful

                          (and sometimes confusing) to the casual installer

  --enable-silent-rules          less verbose build output (undo: `make V=1')

  --disable-silent-rules         verbose build output (undo: `make V=0')

  --enable-shared[=PKGS]  build shared libraries [default=yes]

  --enable-static[=PKGS]  build static libraries [default=yes]

  --enable-fast-install[=PKGS]

                          optimize for fast installation [default=yes]

  --disable-libtool-lock  avoid locking (might break parallel builds)

  --disable-doxygen-doc   don't generate any doxygen documentation

  --disable-doxygen-dot   don't generate graphics for doxygen documentation

  --enable-doxygen-man    generate doxygen manual pages

  --enable-doxygen-rtf    generate doxygen RTF documentation

  --enable-doxygen-xml    generate doxygen XML documentation

  --enable-doxygen-chm    generate doxygen compressed HTML help documentation

  --enable-doxygen-chi    generate doxygen seperate compressed HTML help index

                          file

  --disable-doxygen-html  don't generate doxygen plain HTML documentation

  --disable-doxygen-ps    don't generate doxygen PostScript documentation

  --disable-doxygen-pdf   don't generate doxygen PDF documentation

  --disable-nls           do not use Native Language Support

  --disable-rpath         do not hardcode runtime library paths

  --disable-libdvbv5      disable experimental dynamic libdvbv5 compilation

  --disable-libv4l        disable dynamic libv4l compilation

  --disable-v4l-utils     disable v4l-utils compilation

  --disable-qv4l2         disable qv4l2 compilation

  --enable-gconv          enable compilation of gconv modules


Optional Packages:

  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]

  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)

  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use

                          both]

  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]

  --with-sysroot=DIR Search for dependent libraries within DIR

                        (or the compiler's sysroot if not specified).

  --with-gnu-ld           assume the C compiler uses GNU ld default=no

  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib

  --without-libiconv-prefix     don't search for libiconv in includedir and libdir

  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib

  --without-libintl-prefix     don't search for libintl in includedir and libdir

  --with-localedir=PATH      Where the locale files are installed

  --without-jpeg          Do not use jpeg library

  --with-libudev          Enable libudev to detect a device name

  --with-libv4l1subdir=DIR

                          set libv4l1 library subdir (default=libv4l)

  --with-libv4l2subdir=DIR

                          set libv4l2 library subdir (default=libv4l)

  --with-libv4lconvertsubdir=DIR

                          set libv4lconvert library subdir (default=libv4l)

  --with-udevdir=DIR      set udev directory

  --with-gconvdir=DIR     set system's gconv directory

                          (default=/usr/lib/gconv)


Some influential environment variables:

  CC          C compiler command

  CFLAGS      C compiler flags

  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a

              nonstandard directory <lib dir>

  LIBS        libraries to pass to the linker, e.g. -l<library>

  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if

              you have headers in a nonstandard directory <include dir>

  CPP         C preprocessor

  CXX         C++ compiler command

  CXXFLAGS    C++ compiler flags

  CXXCPP      C++ preprocessor

  PKG_CONFIG  path to pkg-config utility

  PKG_CONFIG_PATH

              directories to add to pkg-config's search path

  PKG_CONFIG_LIBDIR

              path overriding pkg-config's built-in search path

  DOXYGEN_PAPER_SIZE

              a4wide (default), a4, letter, legal or executive

  X11_CFLAGS  C compiler flags for X11, overriding pkg-config

  X11_LIBS    linker flags for X11, overriding pkg-config

  GL_CFLAGS   C compiler flags for GL, overriding pkg-config

  GL_LIBS     linker flags for GL, overriding pkg-config

  GLU_CFLAGS  C compiler flags for GLU, overriding pkg-config

  GLU_LIBS    linker flags for GLU, overriding pkg-config

  QT5_CFLAGS  C compiler flags for QT5, overriding pkg-config

  QT5_LIBS    linker flags for QT5, overriding pkg-config

  QT5GL_CFLAGS

              C compiler flags for QT5GL, overriding pkg-config

  QT5GL_LIBS  linker flags for QT5GL, overriding pkg-config

  QT_CFLAGS   C compiler flags for QT, overriding pkg-config

  QT_LIBS     linker flags for QT, overriding pkg-config

  QTGL_CFLAGS C compiler flags for QTGL, overriding pkg-config

  QTGL_LIBS   linker flags for QTGL, overriding pkg-config

  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config

  ALSA_LIBS   linker flags for ALSA, overriding pkg-config

  libudev_CFLAGS

              C compiler flags for libudev, overriding pkg-config

  libudev_LIBS

              linker flags for libudev, overriding pkg-config


Use these variables to override the choices made by `configure' or to help

it to find libraries and programs with nonstandard names/locations.


Report bugs to the package provider. 


다시!

$ ./configure --disable-libdvbv5 

pi@raspberrypi ~/src/v4l-utils/utils/dvb $ vi Makefile

LIBS = -lrt


라즈베리 파이 2로 빌드할 경우 -j 4 옵션으로 5분 정도 걸린다.

2015. 08. 09. (일) 23:58:09 KST

2015. 08. 10. (월) 00:03:24 KST


실행은 실패..




pi@raspberrypi ~/src/v4l-utils $ sudo modprobe bcm2835-v4l2

pi@raspberrypi ~/src/v4l-utils $ lsmod | grep v4l

bcm2835_v4l2           37225  0

videobuf2_vmalloc       3009  1 bcm2835_v4l2

videobuf2_core         33578  1 bcm2835_v4l2

v4l2_common             5077  2 bcm2835_v4l2,videobuf2_core

videodev              122487  3 bcm2835_v4l2,v4l2_common,videobuf2_core


pi@raspberrypi ~/src/v4l-utils $ ls -al /dev/video0

crw-rw---T+ 1 root video 81, 0  8월 10 00:16 /dev/video0


pi@raspberrypi ~ $ sudo v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=3

VIDIOC_S_FMT: failed: Device or resource busy


pi@raspberrypi ~ $ v4l2-ctl --list-devices

mmal service 16.1 (platform:bcm2835-v4l2):

        /dev/video0



pi@raspberrypi ~ $ v4l2-ctl -D

Driver Info (not using libv4l2):

        Driver name   : bm2835 mmal

        Card type     : mmal service 16.1

        Bus info      : platform:bcm2835-v4l2

        Driver version: 3.18.11

        Capabilities  : 0x85200005

                Video Capture

                Video Overlay

                Read/Write

                Streaming

                Extended Pix Format

                Device Capabilities

        Device Caps   : 0x05200005

                Video Capture

                Video Overlay

                Read/Write

                Streaming

                Extended Pix Format 


pi@raspberrypi /etc $ vi modules

# /etc/modules: kernel modules to load at boot time.

#

# This file contains the names of kernel modules that should be loaded

# at boot time, one per line. Lines beginning with "#" are ignored.

# Parameters can be specified after the module name.


snd-bcm2835

bcm2835-v4l2


---


Posted by 구차니
embeded/raspberry pi2015. 8. 9. 00:52

/usr/share/X11/xorg.conf.d/99-fbturbo.conf

파일의 출력 프레임버퍼를 수정하던


FRAMEBUFFER-/dev/fb1 start

를 하던

HDMI를 통해서만 raspivid 영상이 출력된다 -_ㅠ


tvservice를 해줘도.. 여전히 HDMI로만 ㅠㅠ
config.txt가 아닌 cmdline.txt를 통해 커널에게 fb를 0이 기본이 아닌 1로 해줘야 할지도? ㅠㅠ

pi@raspberrypi ~/src/v4l-utils $ tvservice -p

Powering on HDMI with preferred settings


/boot/cmdline.txt

fbcon=map:1


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=81150]

fbcon=map:1으로 해줘도 raspivid는 fb0으로만 출력 ㅠㅠ


FRAMEBUFFER=dev/fb1 startx

[링크 : http://rudas5594.tistory.com/272] 


fbtft

Linux Framebuffer drivers for small TFT LCD display modules.


Test

X Windows

FRAMEBUFFER=/dev/fb1 startx

Note: You might need to move an xorg config out of the way if X doesn't start:


sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~

[링크 : https://github.com/notro/fbtft/wiki]


+

아몰랑 현재 포기중..

일다은 cmdline을 통해서 기본 프레임 버퍼를 바꾸는 법만 테스트 완료


+

2017.09.04

2015/08/12 - [embeded/raspberry pi] - 라즈베리 파이 xorg.conf 설정으로 SPI/HDMI 모니터 연결


Posted by 구차니
embeded/raspberry pi2015. 8. 8. 19:39

아쉽게도 라즈베리 파이에 있는 DSI 인터페이스는 아니고

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


SPI를 이용한 터치 + 320x480 해상도의 LCD 이다.

DVD 하나가 들어있는데 라즈베리 img 파일이 거의 대부분의 용량을 차지하는데..

microSD의 용량이 참.. 많이도 커졌구나 싶은느낌...



이렇게 깔끔하게 장착된다 +_+


[링크 : http://eleparts.co.kr/EPXDR9TM]

    [링크 : http://cafe.naver.com/pipc/11690]


┌──────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                               │

│    1 Expand Filesystem              Ensures that all of the SD card s         │

│    2 Change User Password           Change password for the default u         │

│    3 Enable Boot to Desktop/Scratch Choose whether to boot into a des         │

│    4 Internationalisation Options   Set up language and regional sett         │

│    5 Enable Camera                  Enable this Pi to work with the R         │

│    6 Add to Rastrack                Add this Pi to the online Raspber         │

│    7 Overclock                      Configure overclocking for your P         │

│    8 Advanced Options               Configure advanced settings               │

│    9 About raspi-config             Information about this configurat         │

│                                                                               │

│                                                                               │

│                                                                               │

│                     <Select>                     <Finish>                     │

│                                                                               │

└───────────────────────────────────────────────────────────────────────────────┘


┌──────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                               │

│    A1 Overscan                      You may need to configure oversca         │

│    A2 Hostname                      Set the visible name for this Pi          │

│    A3 Memory Split                  Change the amount of memory made          │

│    A4 SSH                           Enable/Disable remote command lin         │

│    A5 Device Tree                   Enable/Disable the use of Device          │

│    A6 SPI                           Enable/Disable automatic loading          │

│    A7 I2C                           Enable/Disable automatic loading          │

│    A8 Serial                        Enable/Disable shell and kernel m         │

│    A9 Audio                         Force audio out through HDMI or 3         │

│    A0 Update                        Update this tool to the latest ve         │

│                                                                               │

│                                                                               │

│                     <Select>                     <Back>                       │

│                                                                               │

└───────────────────────────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐

          │                                                          │

          │ Would you like the SPI interface to be enabled?          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │               <>                   <아니오>            │

          │                                                          │

          └──────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ The SPI interface will be enabled after a reboot         │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                          <확인>                          │
          │                                                          │
          └──────────────────────────────────────────────────────────┘

          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ Would you like the SPI kernel module to be loaded by     │
          │ default?                                                 │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │               <>                   <아니오>            │
          │                                                          │
          └──────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ SPI kernel module will now be loaded by default          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                          <확인>                          │
          │                                                          │
          └──────────────────────────────────────────────────────────┘ 


pi@raspberrypi ~/src/lcd $ git clone https://github.com/swkim01/waveshare-dtoverlays.git
Cloning into 'waveshare-dtoverlays'...
remote: Counting objects: 39, done.
remote: Total 39 (delta 0), reused 0 (delta 0), pack-reused 39
Unpacking objects: 100% (39/39), done.

3.5인치 모델이니까 waveshare35a 로 설정
pi@raspberrypi ~/src/lcd $ sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/
pi@raspberrypi ~/src/lcd $ sudo vi /boot/config.txt
dtparam=spi=on
dtoverlay=waveshare35a

pi@raspberrypi ~ $ sudo vi /usr/share/X11/xorg.conf.d/99-fbturbo.conf
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
        Identifier      "Allwinner A10/A13 FBDEV"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb1"

        Option          "SwapbuffersWait" "true"
EndSection

pi@raspberrypi ~/src/lcd $ sudo reboot

원래 전원인가 되면 이렇게 밝던 녀석이


dtoverlay 설정이 되면 약간 흐리게 화면이 나온다.


일단은.. HDMI가 위쪽으로 가는게 기본 방향인데..

터치랑 화면이랑 각도가 안 맞아서 이래저래 캘리브레이션을 해야 할 듯 ㅠㅠ


pi@raspberrypi ~ $ sudo apt-get install xinput
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  xinput
0개 업그레이드, 1개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
26.2 k바이트 아카이브를 받아야 합니다.
이 작업 후 84.0 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main xinput armhf 1.6.0-1 [26.2 kB]
내려받기 26.2 k바이트, 소요시간 1초 (19.1 k바이트/초)
Selecting previously unselected package xinput.
(데이터베이스 읽는중 ...현재 92893개의 파일과 디렉터리가 설치되어 있습니다.)
xinput 패키지를 푸는 중입니다 (.../xinput_1.6.0-1_armhf.deb에서) ...
man-db에 대한 트리거를 처리하는 중입니다 ...
xinput (1.6.0-1) 설정하는 중입니다 ...


pi@raspberrypi ~ $ sudo service lightdm restart
[ ok ] Stopping Light Display Manager: lightdm.
[ ok ] Starting Light Display Manager: lightdm.


pi@raspberrypi /boot/overlays $ ls -al /dev/fb*
crw-rw---T 1 root video 29, 0  1월  1  1970 /dev/fb0
crw-rw---T 1 root video 29, 1  1월  1  1970 /dev/fb1


그나저나.. fb0가 HDMI나 composite로 되어있어서
카메라 출력해보면 LCD로는 출력이 되지 않는다 -_-



+

2015.08.09 추가

으으 로컬에서 해야 하는거 느므시러 ㅠㅠ

$ wget http://tronnes.org/downloads/xinput-calibrator_0.7.5-1_armhf.deb

$ sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb

$ xinput_calibrator

Unable to connect to X server 


그나저나 SPI라서 그런지 화면 갱신이 꽤나 느리네..

pi@raspberrypi ~ $ xinput_calibrator 

Calibrating EVDEV driver for "ADS7846 Touchscreen" id=9

current calibration values (from XInput): min_x=0, max_x=4095 and min_y=0, max_y=4095


Doing dynamic recalibration:

Swapping X and Y axis...

Setting new calibration data: 237, 3965, 3888, 214



--> Making the calibration permanent <--

  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'

Section "InputClass"

Identifier "calibration"

MatchProduct "ADS7846 Touchscreen"

Option "Calibration" "237 3965 3888 214"

Option "SwapAxes" "1"

EndSection 


위에 예제 대로 했더니 잘 안되서

X/Y 모두 스왑 / 축 바꾸기 전부 시전 ㄷㄷ

$ cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf

# This is a minimal sample config file, which can be copied to

# /etc/X11/xorg.conf in order to make the Xorg server pick up

# and load xf86-video-fbturbo driver installed in the system.

#

# When troubleshooting, check /var/log/Xorg.0.log for the debugging

# output and error messages.

#

# Run "man fbturbo" to get additional information about the extra

# configuration options for tuning the driver.


Section "Device"

        Identifier      "Allwinner A10/A13 FBDEV"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb1"


        Option          "SwapbuffersWait" "true"

EndSection


Section "InputClass"

        Identifier      "calibration"

        MatchProduct    "ADS7846 Touchscreen"

        Option  "Calibration"   "237 3965 3888 214"

        Option  "SwapAxes"      "1"

        Option "InvertX" "1"

        Option "InvertY" "1"

EndSection 


$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1



SPI로 하기 때문에 어쩔수 없이.. 16bit color인건가? RGB565로 걸리네



fbtft 의 덕택으로 편하게 쓰는.. 로그? ㅋ

pi@raspberrypi ~ $ dmesg | grep -i tft

[    3.611085] fbtft: module is from the staging directory, the quality is unknown, you have been warned.

[    3.700666] fbtft_of_value: regwidth = 16

[    3.709297] fbtft_of_value: buswidth = 8

[    3.716195] fbtft_of_value: debug = 0

[    3.733842] fbtft_of_value: rotate = 90

[    3.748195] fbtft_of_value: fps = 30 


dts 파일을 열어보니.. 먼소리인지 모르겠다? ㅋㅋ

아무튼

LCD는 16MHz SPI clk

터치는 2MHz SPI clk로 작동이라.. 저걸 변경해서 LCD쪽 SPI 클럭 올려주면 좀더 빠르려나?

pi@raspberrypi ~/src/lcd/waveshare-dtoverlays $ cat waveshare35a-overlay.dts

/*

 * Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker

 *

 */


/dts-v1/;

/plugin/;


/ {

        compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";


        fragment@0 {

                target = <&spi0>;

                __overlay__ {

                        status = "okay";


                        spidev@0{

                                status = "disabled";

                        };


                        spidev@1{

                                status = "disabled";

                        };

                };

        };


        fragment@1 {

                target = <&gpio>;

                __overlay__ {

                        waveshare35a_pins: waveshare35a_pins {

                                brcm,pins = <17 25 24>;

                                brcm,function = <0 0 0>; /* in in in */

                        };

                };

        };


        fragment@2 {

                target = <&spi0>;

                __overlay__ {

                        /* needed to avoid dtc warning */

                        #address-cells = <1>;

                        #size-cells = <0>;


                        waveshare35a: waveshare35a@0{

                                compatible = "ilitek,ili9486";

                                reg = <0>;

                                pinctrl-names = "default";

                                pinctrl-0 = <&waveshare35a_pins>;


                                spi-max-frequency = <16000000>;

                                rotate = <90>;

                                bgr;

                                fps = <30>;

                                buswidth = <8>;

                                regwidth = <16>;

                                reset-gpios = <&gpio 25 0>;

                                dc-gpios = <&gpio 24 0>;

                                debug = <0>;


                                init = <0x10000b0 0x00

                                        0x1000011

                                        0x20000ff

                                        0x100003a 0x55

                                        0x1000036 0x28

                                        0x10000c2 0x44

                                        0x10000c5 0x00 0x00 0x00 0x00

                                        0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00

                                        0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00

                                        0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00

                                        /* piscreen -> waveshare35a */

                                        0x1000036 0x28

                                        0x1000011

                                        0x1000029>;

                        };


                        waveshare35a-ts@1 {

                                compatible = "ti,ads7846";

                                reg = <1>;


                                spi-max-frequency = <2000000>;

                                interrupts = <17 2>; /* high-to-low edge triggered */

                                interrupt-parent = <&gpio>;

                                pendown-gpio = <&gpio 17 0>;

                                ti,x-plate-ohms = /bits/ 16 <60>;

                                ti,pressure-max = /bits/ 16 <255>;

                        };

                };

        };

        __overrides__ {

                speed =         <&waveshare35a>,"spi-max-frequency:0";

                rotate =        <&waveshare35a>,"rotate:0";

                fps =           <&waveshare35a>,"fps:0";

                debug =         <&waveshare35a>,"debug:0";

        };

}; 


+
2015.08.11
스케마틱은 안보이니 이거라도..
아무튼.. 


어느게 몇번 핀인지 알게 머야 ㅠㅠ

[링크 : http://www.wvshare.com/product/3.5inch-RPi-LCD-A.htm]


핀번호로 매칭해보니.. 왼쪽의 SPI는 LCD 오른쪽의 SPI가 터치구나..


Posted by 구차니
embeded/raspberry pi2015. 8. 8. 19:37

Camera Serial Interface - CSI

Mobile Industry Processor Interface - MIPI

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


라즈베리 파이에 장착된 인터페이스로 CSI DSI중에

DSI는 구하기 드럽게 힘들고 -_-a

아무튼 카메라는 구할 수 있으니 일단 이녀석부터!


사이즈는 이정도!


CAMERA 라고 써있는 녀석을 손톱으로 톡! 해서 들어 올리고


핀 방향을 잘 맞춰서 꼽고


걸쇠를 다시 내려주면 끝!



$ sudo raspi-config


┌─────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                              │

│    1 Expand Filesystem              Ensures that all of the SD card s        │

│    2 Change User Password           Change password for the default u        │

│    3 Enable Boot to Desktop/Scratch Choose whether to boot into a des        │

│    4 Internationalisation Options   Set up language and regional sett        │

│    5 Enable Camera                  Enable this Pi to work with the R        │

│    6 Add to Rastrack                Add this Pi to the online Raspber        │

│    7 Overclock                      Configure overclocking for your P        │

│    8 Advanced Options               Configure advanced settings              │

│    9 About raspi-config             Information about this configurat        │

│                                                                              │

│                                                                              │

│                                                                              │

│                     <Select>                     <Finish>                    │

│                                                                              │

└──────────────────────────────────────────────────────────────────────────────┘ 


          ┌──────────────────────────────────────────────────────────┐

          │                                                          │

          │ Enable support for Raspberry Pi camera?                  │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │               <Disable>              <Enable>            │

          │                                                          │

          └──────────────────────────────────────────────────────────┘ 


Enable 해주고 나면 강제로 리부팅 된다.


pi@raspberrypi ~ $ raspi

raspi-config  raspistill    raspivid      raspiyuv

pi@raspberrypi ~ $ whereis raspistill

raspistill: /usr/bin/raspistill /usr/bin/X11/raspistill /opt/vc/bin/raspistill

pi@raspberrypi ~ $ whereis raspivid

raspivid: /usr/bin/raspivid /usr/bin/X11/raspivid /opt/vc/bin/raspivid


raspivid는 5초간만 출력하는것이 기본값이니 -t 0 으로 해주면 종료되지 않고 계속 출력된다.


pi@raspberrypi ~ $ raspistill

raspistill Camera App v1.3.8


Runs camera for specific time, and take JPG capture at end if requested


usage: raspistill [options]


Image parameter commands


-?, --help      : This help information

-w, --width     : Set image width <size>

-h, --height    : Set image height <size>

-q, --quality   : Set jpeg quality <0 to 100>

-r, --raw       : Add raw bayer data to jpeg metadata

-o, --output    : Output filename <filename> (to write to stdout, use '-o -'). If not specified, no file is saved

-l, --latest    : Link latest complete image to filename <filename>

-v, --verbose   : Output verbose information during run

-t, --timeout   : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)

-th, --thumb    : Set thumbnail parameters (x:y:quality) or none

-d, --demo      : Run a demo mode (cycle through range of camera options, no capture)

-e, --encoding  : Encoding to use for output file (jpg, bmp, gif, png)

-x, --exif      : EXIF tag to apply to captures (format as 'key=value') or none

-tl, --timelapse        : Timelapse mode. Takes a picture every <t>ms

-fp, --fullpreview      : Run the preview using the still capture resolution (may reduce preview fps)

-k, --keypress  : Wait between captures for a ENTER, X then ENTER to exit

-s, --signal    : Wait between captures for a SIGUSR1 from another process

-g, --gl        : Draw preview to texture instead of using video render component

-gc, --glcapture        : Capture the GL frame-buffer instead of the camera image

-set, --settings        : Retrieve camera settings and write to stdout

-cs, --camselect        : Select camera <number>. Default 0

-bm, --burst    : Enable 'burst capture mode'

-md, --mode     : Force sensor mode. 0=auto. See docs for other modes available

-dt, --datetime : Replace frame number in file name with DateTime (YearMonthDayHourMinSec)

-ts, --timestamp        : Replace frame number in file name with unix timestamp (seconds since 1900)


Preview parameter commands


-p, --preview   : Preview window settings <'x,y,w,h'>

-f, --fullscreen        : Fullscreen preview mode

-op, --opacity  : Preview window opacity (0-255)

-n, --nopreview : Do not display a preview window


Image parameter commands


-sh, --sharpness        : Set image sharpness (-100 to 100)

-co, --contrast : Set image contrast (-100 to 100)

-br, --brightness       : Set image brightness (0 to 100)

-sa, --saturation       : Set image saturation (-100 to 100)

-ISO, --ISO     : Set capture ISO

-vs, --vstab    : Turn on video stabilisation

-ev, --ev       : Set EV compensation

-ex, --exposure : Set exposure mode (see Notes)

-awb, --awb     : Set AWB mode (see Notes)

-ifx, --imxfx   : Set image effect (see Notes)

-cfx, --colfx   : Set colour effect (U:V)

-mm, --metering : Set metering mode (see Notes)

-rot, --rotation        : Set image rotation (0-359)

-hf, --hflip    : Set horizontal flip

-vf, --vflip    : Set vertical flip

-roi, --roi     : Set region of interest (x,y,w,d as normalised coordinates [0.0-1.0])

-ss, --shutter  : Set shutter speed in microseconds

-awbg, --awbgains       : Set AWB gains - AWB mode must be off

-drc, --drc     : Set DRC Level

-st, --stats    : Force recomputation of statistics on stills capture pass

-a, --annotate  : Enable/Set annotate flags or text

-3d, --stereo   : Select stereoscopic mode

-dec, --decimate        : Half width/height of stereo image

-3dswap, --3dswap       : Swap camera order for stereoscopic

-ae, --annotateex       : Set extra annotation parameters (text size, text colour(hex YUV), bg colour(hex YUV))



Notes


Exposure mode options :

auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks


AWB mode options :

off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon


Image Effect mode options :

none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon


Metering Mode options :

average,spot,backlit,matrix


Dynamic Range Compression (DRC) options :

off,low,med,high


Preview parameter commands


-gs, --glscene  : GL scene square,teapot,mirror,yuv,sobel

-gw, --glwin    : GL window settings <'x,y,w,h'> 


pi@raspberrypi ~ $ raspivid


raspivid Camera App v1.3.12


Display camera output to display, and optionally saves an H264 capture at requested bitrate



usage: raspivid [options]


Image parameter commands


-?, --help      : This help information

-w, --width     : Set image width <size>. Default 1920

-h, --height    : Set image height <size>. Default 1080

-b, --bitrate   : Set bitrate. Use bits per second (e.g. 10MBits/s would be -b 10000000)

-o, --output    : Output filename <filename> (to write to stdout, use '-o -')

-v, --verbose   : Output verbose information during run

-t, --timeout   : Time (in ms) to capture for. If not specified, set to 5s. Zero to disable

-d, --demo      : Run a demo mode (cycle through range of camera options, no capture)

-fps, --framerate       : Specify the frames per second to record

-e, --penc      : Display preview image *after* encoding (shows compression artifacts)

-g, --intra     : Specify the intra refresh period (key frame rate/GoP size). Zero to produce an initial I-frame and then just P-frames.

-pf, --profile  : Specify H264 profile to use for encoding

-td, --timed    : Cycle between capture and pause. -cycle on,off where on is record time and off is pause time in ms

-s, --signal    : Cycle between capture and pause on Signal

-k, --keypress  : Cycle between capture and pause on ENTER

-i, --initial   : Initial state. Use 'record' or 'pause'. Default 'record'

-qp, --qp       : Quantisation parameter. Use approximately 10-40. Default 0 (off)

-ih, --inline   : Insert inline headers (SPS, PPS) to stream

-sg, --segment  : Segment output file in to multiple files at specified interval <ms>

-wr, --wrap     : In segment mode, wrap any numbered filename back to 1 when reach number

-sn, --start    : In segment mode, start with specified segment number

-sp, --split    : In wait mode, create new output file for each start event

-c, --circular  : Run encoded data through circular buffer until triggered then save

-x, --vectors   : Output filename <filename> for inline motion vectors

-cs, --camselect        : Select camera <number>. Default 0

-set, --settings        : Retrieve camera settings and write to stdout

-md, --mode     : Force sensor mode. 0=auto. See docs for other modes available

-if, --irefresh : Set intra refresh type



H264 Profile options :

baseline,main,high



H264 Intra refresh options :

cyclic,adaptive,both,cyclicrows


Preview parameter commands


-p, --preview   : Preview window settings <'x,y,w,h'>

-f, --fullscreen        : Fullscreen preview mode

-op, --opacity  : Preview window opacity (0-255)

-n, --nopreview : Do not display a preview window


Image parameter commands


-sh, --sharpness        : Set image sharpness (-100 to 100)

-co, --contrast : Set image contrast (-100 to 100)

-br, --brightness       : Set image brightness (0 to 100)

-sa, --saturation       : Set image saturation (-100 to 100)

-ISO, --ISO     : Set capture ISO

-vs, --vstab    : Turn on video stabilisation

-ev, --ev       : Set EV compensation

-ex, --exposure : Set exposure mode (see Notes)

-awb, --awb     : Set AWB mode (see Notes)

-ifx, --imxfx   : Set image effect (see Notes)

-cfx, --colfx   : Set colour effect (U:V)

-mm, --metering : Set metering mode (see Notes)

-rot, --rotation        : Set image rotation (0-359)

-hf, --hflip    : Set horizontal flip

-vf, --vflip    : Set vertical flip

-roi, --roi     : Set region of interest (x,y,w,d as normalised coordinates [0.0-1.0])

-ss, --shutter  : Set shutter speed in microseconds

-awbg, --awbgains       : Set AWB gains - AWB mode must be off

-drc, --drc     : Set DRC Level

-st, --stats    : Force recomputation of statistics on stills capture pass

-a, --annotate  : Enable/Set annotate flags or text

-3d, --stereo   : Select stereoscopic mode

-dec, --decimate        : Half width/height of stereo image

-3dswap, --3dswap       : Swap camera order for stereoscopic

-ae, --annotateex       : Set extra annotation parameters (text size, text colour(hex YUV), bg colour(hex YUV))



Notes


Exposure mode options :

auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks


AWB mode options :

off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon


Image Effect mode options :

none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon


Metering Mode options :

average,spot,backlit,matrix


Dynamic Range Compression (DRC) options :

off,low,med,high


지원가능한 해상도는 아래와 같은데..

5M에서도 15fps가 나오나보네? ㄷㄷㄷ



[링크 : http://www.ovt.com/uploads/parts/OV5647.pdf]


120 프레임 보고 싶은데.. 잘 안되는거 같네..

fps를 1로 해도 부드럽게 나온다.. 30fps 고정인가?

pi@raspberrypi ~ $ raspivid -w 320 -h 230 -t 0 -f -v -fps 120


raspivid Camera App v1.3.12


Width 320, Height 230, filename (null)

bitrate 17000000, framerate 120, time delay 0

H264 Profile high

H264 Quantisation level 0, Inline headers No

H264 Intra refresh type (null), period -1

Wait method : Capture forever

Initial state 'record'



Preview Yes, Full screen Yes

Preview window 0,0,1024,768

Opacity 255

Sharpness 0, Contrast 0, Brightness 50

Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0

Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'

Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128

Rotation 0, hflip No, vflip No

ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000

Camera component done

Encoder component done

Starting component connection stage

Connecting camera preview port to preview input port

Starting video preview

Connecting camera stills port to encoder input port

Enabling encoder output port 


엘레파츠의 자료내에 포함된 예제 옵션

$ raspistill -o image.jpg

$ raspivid -o video.h264 -t 10000

[링크 : http://eleparts.co.kr/EPXD4BBD]


csi의 경우 /dev/video 처럼 v4l로 인식이 되지 않아 콘솔상에서 파이프라인을 통해 보내야 할 듯 하다.

$ raspivid -o - -t 9999999 -w 640 -h 360 -fps 25 | tee videofilename.h264 | cvlc stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264


[링크 : http://raspi.tv/.../how-to-stream-vlc-from-a-raspberry-pi-with-gpio-control-but-without-being-root] 


라즈베리 쪽 설정

pi@raspberrypi ~ $ raspivid -o - -t 0 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264


클라이언트 쪽 설정/windows + vlc


vlc의 캐쉬를 0으로 설정해도 1초 정도의 지연이 생긴다 -_ㅠ


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=43969] 




+

2015.08.24


Basically the cable specifications are :

Type : FFC / FPC (Flat Flex)

Wires : 15 

Pitch : 1mm

Contacts : Type B (This means you have the contacts at opposite sides of the cable. So one is at the top and the other at the bottom)

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=43737]



+

2015.09.15


$ raspivid -o - -t 0 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

[링크 : http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-camera/streaming-video-using-vlc-player]

Posted by 구차니
embeded/raspberry pi2015. 8. 7. 10:21

중고나라에서 센서들 살까 하다가

일단은 눈물을 머금고.. 휴가동안 소소하게 가지고 놀고

앞으로도 꾸준히 가지고 놀수 있을 것 같은 녀석으로 구매 ㅠㅠ




Posted by 구차니
embeded/raspberry pi2015. 8. 5. 15:27

지인 : 조만간 지르겠군..



[링크 : http://eleparts.co.kr/EPXDR9TM] 3.5" LCD 320*480

    [링크 : http://cafe.naver.com/pipc/11690]

[링크 : http://eleparts.co.kr/EPXD4BBD] 5M CIS OV5647

Posted by 구차니
embeded/raspberry pi2015. 8. 5. 09:28

예전회사에서 ARM9 으로 테스트 하던 녀석들 얼마나 먹나 궁금해서 URL 찾아서 해보니. ㄷㄷㄷ

의외로 ARM11도 쓸만하구나...


WMAPro / WMA2 / AAC+

오디오인데.. ARM9에서는 끊어지던 녀석들이.. 눈물나게 잘 나온다. ㄷㄷㄷ



ARM11의 mpegaudio에 AAC+가 포함되서 그런건가?

2015/01/26 - [프로그램 사용/ffmpeg / ffserver] - ffmpeg arm 아키텍쳐별 최적화 코덱



pi@raspberrypi ~ $ mplayer mms://stream.polskieradio.pl/zagranica_wma10

ASF file format detected.

[asfheader] Audio stream found, -aid 1

Clip info:

 title: Zagranica

 author: Polskie Radio S.A.

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 48000 Hz, 2 ch, floatle, 48.0 kbit/1.56% (ratio: 6000->384000)

Selected audio codec: [ffwmapro] afm: ffmpeg (WMA Pro audio (FFmpeg))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

[AO_ALSA] Format floatle is not supported by hardware, trying default.

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:674191.3 (187:16:31.3) of 0.0 (unknown)  7.1% 10%



pi@raspberrypi ~ $ mplayer mms://stream.polskieradio.pl/program3

ASF file format detected.

[asfheader] Audio stream found, -aid 1

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 48000 Hz, 2 ch, s16le, 96.0 kbit/6.25% (ratio: 12000->192000)

Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:674819.8 (187:26:59.8) of 0.0 (unknown)  6.6% 15%



pi@raspberrypi ~ $ mplayer http://80.86.106.110:8002/

AAC file format detected.

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)

Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:   2.9 (02.8) of 0.0 (unknown) 16.3% 28%



----

라즈베리 파이 B / ARMv6 / ARM11 vfp


$ mplayer mms://stream.polskieradio.pl/zagranica_wma10

A:674191.3 (187:16:31.3) of 0.0 (unknown)  7.1% 10%


$ mplayer mms://stream.polskieradio.pl/program3

A:674819.8 (187:26:59.8) of 0.0 (unknown)  6.6% 15%


$ mplayer http://80.86.106.110:8002/

A:   2.9 (02.8) of 0.0 (unknown) 16.3% 28%


-----

라즈베리 파이 2B / ARMv7 / Cortex-A7 quad neon


$ mplayer mms://stream.polskieradio.pl/zagranica_wma10

A:723685.4 (201:01:25.4) of 0.0 (unknown)  4.0% 24%


$ mplayer mms://stream.polskieradio.pl/program3

A:724356.9 (201:12:36.9) of 0.0 (unknown)  2.9% 25%


$ mplayer http://80.86.106.110:8002/

A:   2.4 (02.3) of 0.0 (unknown)  9.2% 31%



잠시 착각했으나..

cpu 점유율 / 캐시사용률 이다 -_-a

2015/01/26 - [프로그램 사용/ffmpeg / ffserver] - mplayer status line



Posted by 구차니