embeded/raspberry pi2018. 9. 11. 22:33

걍 미는게 편할까.. 업데이트 하는게 편할까..

경고를 보고 하는 절차를 보니 걍 밀고 새로 설정하는게 편하겠는데..?


[링크 : https://linuxconfig.org/raspbian-gnu-linux-upgrade-from-jessie-to-raspbian-stretch-9]

'embeded > raspberry pi' 카테고리의 다른 글

raspbian stretch - node.js  (0) 2018.09.13
라즈베리 3B stretch 한글 설정  (0) 2018.09.13
node.js on rpi  (0) 2018.09.11
라즈베리 파이 USB 사운드 카드로 녹음 및 재생하기  (4) 2018.09.10
라즈베리 파이 SPI 속도  (0) 2018.05.18
Posted by 구차니
embeded/raspberry pi2018. 9. 11. 22:00

내 라즈베리가 버전이 구버전인지 심각하게 구버전이 설치된다.. -_-

그런 이유로 컴파일 해서 할거 아니라면 일단 포기

(혹은 배포판 버전업?)

$ sudo apt-get install nodejs npm

$ node --version

v0.10.29



---

아무 생각없이 했더니 에러가 난다 -ㅁ-

$ npm install -g express-generator

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules'

npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules']

npm ERR!   errno: 3,

npm ERR!   code: 'EACCES',

npm ERR!   path: '/usr/local/lib/node_modules',

npm ERR!   fstream_type: 'Directory',

npm ERR!   fstream_path: '/usr/local/lib/node_modules/express-generator',

npm ERR!   fstream_class: 'DirWriter',

npm ERR!   fstream_stack:

npm ERR!    [ '/usr/lib/nodejs/fstream/lib/writer.js:171:23',

npm ERR!      '/usr/lib/nodejs/mkdirp/index.js:46:53',

npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }

npm ERR!

npm ERR! Please try running this command again as root/Administrator.


npm ERR! System Linux 4.9.35-v7+

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "express-generator"

npm ERR! cwd /home/pi

npm ERR! node -v v0.10.29

npm ERR! npm -v 1.4.21

npm ERR! path /usr/local/lib/node_modules

npm ERR! fstream_path /usr/local/lib/node_modules/express-generator

npm ERR! fstream_type Directory

npm ERR! fstream_class DirWriter

npm ERR! code EACCES

npm ERR! errno 3

npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules'

npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23

npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53

npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR!     /home/pi/npm-debug.log

npm ERR! not ok code 0 


그런데.. 윈도우용 node랑은 verbose mode 설정이 다른건가?

이런 설치 메시지를 윈도우 용에서는 본적이 없네?

$ sudo npm install -g express-generator

/usr/local/bin/express -> /usr/local/lib/node_modules/express-generator/bin/express-cli.js

express-generator@4.16.0 /usr/local/lib/node_modules/express-generator

├── sorted-object@2.0.1

├── commander@2.13.0

├── ejs@2.5.7

├── mkdirp@0.5.1 (minimist@0.0.8)

└── minimatch@3.0.4 (brace-expansion@1.1.11) 


$ npm i node-rtsp-stream-es6

node-rtsp-stream-es6@1.0.6 node_modules/node-rtsp-stream-es6

├── jsmpeg@1.0.0

└── ws@1.1.5 (options@0.0.6, ultron@1.0.2)


$ npm install ws node-rtsp-stream-es6

ws@6.0.0 node_modules/ws

└── async-limiter@1.0.0


node-rtsp-stream-es6@1.0.6 node_modules/node-rtsp-stream-es6

├── jsmpeg@1.0.0

└── ws@1.1.5 (options@0.0.6, ultron@1.0.2)


$ npm install jsmpeg

jsmpeg@1.0.0 node_modules/jsmpeg


그나저나 아무생각이 없었는데..

라즈베리 debian에 ffmpeg이 없네?

[링크 : https://github.com/.../(RPi)-Compile-FFmpeg-with-the-OpenMAX-H.264-GPU-acceleration]

Posted by 구차니
embeded/raspberry pi2018. 9. 10. 19:26

USB 사운드 카드가 잠시 생겨 일단 테스트 해보고 싶은 마음에 찾아보니..


arecord --device=hw:1,0 --format S16_LE --rate 44100 -c1 test.wav -V mono

aplay --device=plughw:1,0 test.wav 

[링크 : https://www.instructables.com/id/How-to-Record-Voice-With-USB-Microphone-Then-Play-/]


speaker-test -c2 -D plughw:1,0 

[링크 : https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/testing-audio]

[링크 : https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/recording-audio]

[링크 : https://scribles.net/voice-recording-on-raspberry-pi/]


[링크 : https://linux.die.net/man/1/arecord]


+

[433655.786504] usb 1-1.4: new full-speed USB device number 4 using dwc_otg

[433655.924800] usb 1-1.4: New USB device found, idVendor=0d8c, idProduct=013c

[433655.924820] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[433655.924831] usb 1-1.4: Product: USB PnP Sound Device

[433655.936390] input: USB PnP Sound Device as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/0003:0D8C:013C.0001/input/input1

[433656.007216] hid-generic 0003:0D8C:013C.0001: input,hidraw0: USB HID v1.00 Device [USB PnP Sound Device] on usb-3f980000.usb-1.4/input3

[433656.114545] usbcore: registered new interface driver snd-usb-audio 


$ arecord -l

**** List of CAPTURE Hardware Devices ****

card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]

  Subdevices: 1/1

  Subdevice #0: subdevice #0 


$ aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]

  Subdevices: 8/8

  Subdevice #0: subdevice #0

  Subdevice #1: subdevice #1

  Subdevice #2: subdevice #2

  Subdevice #3: subdevice #3

  Subdevice #4: subdevice #4

  Subdevice #5: subdevice #5

  Subdevice #6: subdevice #6

  Subdevice #7: subdevice #7

card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]

  Subdevices: 1/1

  Subdevice #0: subdevice #0 


일단 해보는데 극성이 문제인지

그냥은 안되고 마이크 쇼트 시키니 볼륨 메터가 뜨긴 한다.


결론 : 되긴하는데 마이크를 잘 골라야 할지도?


+

2019.09.11

윈도우에서 꽂으니 아래와 같은 식별자로 뜬다.

일단은(?) CM108 인듯?


[링크 : https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/figure-out-your-chipset]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=74982]

'embeded > raspberry pi' 카테고리의 다른 글

라즈비안 업데이트  (0) 2018.09.11
node.js on rpi  (0) 2018.09.11
라즈베리 파이 SPI 속도  (0) 2018.05.18
라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
odroid u3 headless setup중 문제..  (0) 2018.05.14
Posted by 구차니
embeded/raspberry pi2018. 5. 18. 15:56

SPI 설정이 무한대로 되는건 아니고

250MHz를 분기해서 쓰는데

일단은.. SPI LCD 쓰는데 62M를 설정해주면 통신 속도를 못 버티는지 색이 깨진다.

60보다 낮은건 31.2MHz 인가?

아무튼 40메가로 설정해도 일단은 돌아가는 가네..


SPEED

The driver supports the following speeds:


  cdiv    speed

     2    125.0 MHz

     4     62.5 MHz

     8     31.2 MHz

    16     15.6 MHz

    32      7.8 MHz

    64      3.9 MHz

   128     1953 kHz

   256      976 kHz

   512      488 kHz

  1024      244 kHz

  2048      122 kHz

  4096       61 kHz

  8192     30.5 kHz

 16384     15.2 kHz

 32768     7629 Hz 

[링크 : https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md]

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

'embeded > raspberry pi' 카테고리의 다른 글

node.js on rpi  (0) 2018.09.11
라즈베리 파이 USB 사운드 카드로 녹음 및 재생하기  (4) 2018.09.10
라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
odroid u3 headless setup중 문제..  (0) 2018.05.14
rpi firmata  (0) 2018.05.11
Posted by 구차니
embeded/raspberry pi2018. 5. 18. 10:01

귀찮으니 img 받아서 그냥 까세요 수준으로 대격변 ㄷㄷ

[링크 : https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)]


귀찮아서.. 스크립트 분석하면 될걸.. 썡으로 뒤지는중


일단 화면 갱신이 꽤나 느린데

/etc $ grep -rni "fbcp" ./

./rc.local:21:fbcp &

[링크 : https://github.com/tasanakorn/rpi-fbcp]


동영상을 보면 확실히 fbcp를 통해 복사하는거라 그런지 화면 갱신이 느리다. (cpu는 5% 미만이긴 하지만)


그래서 아래처럼 설정하고 다시 찰칵

기분인진 몰라도 확실히 좀 빨라진 기분?


$ cat /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


# 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:rotate=270

#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900

#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 


[링크 : https://github.com/swkim01/waveshare-dtoverlays/issues/7]


$ 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.

#The driver is made by Waveshare&Spotpear

# 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/fb0"


        Option          "SwapbuffersWait" "true"

EndSection



Section "Device"

        Identifier      "Waveshare 35a spi"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb1"


        Option          "SwapbuffersWait" "true"

EndSection


Section "Monitor"

        Identifier      "primary"

EndSection


Section "Screen"

        Identifier      "primary"

        Device          "Waveshare 35a spi"

        Monitor         "rpi spi"

EndSection 


일단 mame를 깔고

$ sudo apt-get install gnome-video-arcade mame mame-tools

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame-data

Suggested packages:

  devhelp mame-doc mame-extra

The following NEW packages will be installed:

  gnome-video-arcade liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame

  mame-data mame-tools

0 upgraded, 7 newly installed, 0 to remove and 49 not upgraded.

Need to get 45.0 MB of archives. 


gnome 어쩌구 말고

mame를 실행하니 CPU는 미쳐 날뛰고(라즈베리 2B인데 오버 해야하나..)


/dev/fb1 덤프해서 보니 RGB565 480x320으로 복원



+

HDMI로 해도 느린건 마찬가지(아니 해상도 높아져서 더 느려진 기분.. 실행이 안되고 뻗는 수준?)

0.78 구버전을 구해서 빌드 해보려니 소스를 못 받는다.. 아놔

Posted by 구차니
embeded/raspberry pi2018. 5. 14. 11:30

0. MAC address 및 호스트 이름 설정

$ sudo vi /etc/smsc95xx_mac_addr


1. 로케일 설정

~$ pptpsetup

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

        LANGUAGE = (unset),

        LC_ALL = (unset),

        LC_PAPER = "en",

        LC_ADDRESS = "en",

        LC_MONETARY = "en",

        LC_NUMERIC = "en",

        LC_TELEPHONE = "en",

        LC_IDENTIFICATION = "en",

        LC_MEASUREMENT = "en",

        LC_TIME = "en",

        LC_NAME = "en",

        LANG = (unset)

    are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

/usr/sbin/pptpsetup: too few arguments.

Try '/usr/sbin/pptpsetup --help' for more information. 


#/etc/environment

LANG="ko_KR.utf8"

LANGUAGE="ko_KR;ko;en_GB;en"

LC_ALL="ko_KR.utf8" 

[링크 : https://forum.ubuntu-kr.org/viewtopic.php?t=18025]



'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 파이 SPI 속도  (0) 2018.05.18
라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
rpi firmata  (0) 2018.05.11
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi 3b PMIC  (0) 2018.04.23
Posted by 구차니
embeded/raspberry pi2018. 5. 11. 17:51

비얌 만세.. ㄷㄷ


Arduino에 firmata 펌웨어 올리고

아두이노와 라즈베리는 시리얼을 통해서 통신을 함


[링크 : https://raspberrypi-aa.github.io/session3/firmata.html]

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
odroid u3 headless setup중 문제..  (0) 2018.05.14
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi 3b PMIC  (0) 2018.04.23
rpi img 생성하기  (0) 2018.04.18
Posted by 구차니
embeded/raspberry pi2018. 5. 9. 09:39

고민을 해보니..

apache + php + mysql + phpmyadmin 돌리는데

2.5W 정도 먹는 상황


비슷하게 설정한 odroid U3가

성능은 훨신 쾌적한데 약간 더 먹는 2.7W 정도?


라즈베리 3B+ 이런거랑 Odroid U3가 비교가 될지 모르겠지만

[링크 : https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/]


간접적으로 XU4(Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPUs)

Odroid U3(1.7GHz Exynos4412 Prime Cortex-A9 1.7GHz Quad-core processor)

일단 3B랑 3B+이랑 비교하면 클럭만 10% 정도 증가이기에 성능 상승폭은 그리 크지 않을 것으로 보이고

아래 벤치마크만 본다면 3b보다 u3가 나을 것으로 예상된다.

[링크 : http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825]

[링크 : https://magazine.odroid.com/wp-content/uploads/ODROID-Magazine-201401.pdf]


아무튼..

랜도 별도의 USB 포트를 이용하기에 라즈베리 보다 병목도 적을꺼고..

이래저래 소비전력을 따라잡은 상황에서는 라즈베리 2b 빼고 U3로 갈아타는것도 방법일 듯..

'embeded > raspberry pi' 카테고리의 다른 글

odroid u3 headless setup중 문제..  (0) 2018.05.14
rpi firmata  (0) 2018.05.11
rpi 3b PMIC  (0) 2018.04.23
rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
Posted by 구차니
embeded/raspberry pi2018. 4. 23. 14:16

오.. 어떤식으로 쓸 수 있을지 모르겠지만

라즈베리 3B 되면서 PMIC가 장착되었다고 한다.


근데 벤치상에... 3B는 그나마 양호한데..

3B+의 자비없는 대기전력.. ㄷㄷ (생각해보면 Odroid U3 급이긴 한데 성능은 누가 나으려나?)

[링크 : https://www.raspberrypi.org/magpi/raspberry-pi-specs-benchmarks/]


Witty Pi 라는 HAT은 RTC와 Power on/off 기능 추가

전원 버튼이 HAT에 추가되고 그걸 누르면 On 되고

On 상태에서 Off를 누르면 라즈베리가 SW적으로 종료절차를 따르게 된다.

Suspend도 지원하는 매력적인 녀석 (23.04USD 꽤 쎄네...)

[링크 : http://www.uugear.com/witty-pi-realtime-clock-power-management-for-raspberry-pi/]

  [링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=149008]


I2C를 켜라고 하는것 봐서는 I2C를 통해 리눅스에게 전원 On/Off 상태를 알려주도록 되어 있는 듯?

Please notice that sudo is necessary to run this script. This script will automatically do 

these tasks in order:

1. Enable I2C on your Raspberry Pi

2. Install i2cctools, if it is not installed yet

3. Configure Bluetooth to use minicUART (Raspberry Pi 3 only)

4. Install wiringPi, if it is not installed yet

5. Install Witty Pi programs, if they are not installed yet

[링크 : http://www.uugear.com/doc/WittyPi_UserManual.pdf]



3B+은 2018년 3월 출시되었고

CPU 클럭 1.2->1.4로 상향

기가비트 이더넷 추가, PoE Ready

802.11ac 추가

의 차이가 존재한다.

[링크 : https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/]

'embeded > raspberry pi' 카테고리의 다른 글

rpi firmata  (0) 2018.05.11
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
라즈베리 파이 배포용 이미지 만들기  (0) 2018.02.23
Posted by 구차니
embeded/raspberry pi2018. 4. 18. 17:45

생각해보니 예전에 i.MX283 에

dd로 생성한 img 굽다가 실패한 이유가..

단순 dd로 만들고 나서 

mkfs로 포맷만 했기 때문이려나?


아래 스크립트에서는

dd로 생성 후

fdisk로 파티션을 만들고

mkfs.vfat과 mkfs.ext4로 포맷을 해주도록 되어있다.


[링크 : https://github.com/andrius/build-raspbian-image/blob/master/raspbian/build_raspbian_sd_card.sh]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=41520]

Posted by 구차니