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 구차니

마커를 추가하고 클릭시에 이벤트를 어떻게 발생시키는지 찾는중

(네이버 지도에서 검색하고 마커를 누르면 목록에서 선택되는데 이런 작동을 찾는중)


[링크 : https://navermaps.github.io/maps.js/docs/tutorial-UI-Event.html]

[링크 : https://navermaps.github.io/maps.js/docs/tutorial-marker-viewportevents.example.html]

[링크 : https://developers.naver.com/forum/posts/24051]

Posted by 구차니

getBounds()로 화면상에 영역의 정보를 얻고

mapBounds.hasLatLng()를 통해서 인자로 받는 영역이 해당 바운드에 속하는지 확인한다.


function updateMarkers(map, markers) {


    var mapBounds = map.getBounds();

    var marker, position;


    for (var i = 0; i < markers.length; i++) {


        marker = markers[i]

        position = marker.getPosition();


        if (mapBounds.hasLatLng(position)) {

            showMarker(map, marker);

        } else {

            hideMarker(map, marker);

        }

    }

}


[링크 : https://navermaps.github.io/maps.js/docs/tutorial-marker-viewport.example.html]

[링크 : https://developers.naver.com/forum/posts/15738]

Posted by 구차니
Programming/web 관련2018. 9. 10. 18:45


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

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

[링크 : https://en.wikipedia.org/wiki/Single_sign-on]

'Programming > web 관련' 카테고리의 다른 글

chrome 보안 무시  (0) 2018.11.13
REST API HTTP 에러코드  (0) 2018.11.06
tinestamp(epoch) to utc / localtime  (0) 2018.09.07
li 글자 수직정렬하기  (0) 2018.08.30
user agent stylesheet  (0) 2018.08.29
Posted by 구차니
Programming/node.js2018. 9. 10. 14:58

node.js 에서 다른 REST 서버로 요청하는걸 찾는중


option의 type을 지정하는거군..


[링크 : http://devnauts.tistory.com/95]

[링크 : http://shiya.io/send-http-requests-to-a-server-with-node-js/]

'Programming > node.js' 카테고리의 다른 글

node.js 글로벌 모듈 목록보기  (0) 2018.09.11
node-rtsp-stream 윈도우에서 설치하기는 실패?  (0) 2018.09.11
cURL 그리고 REST  (6) 2018.09.09
node.js rtsp 스트리밍  (0) 2018.09.07
RESTful  (0) 2018.09.07
Posted by 구차니
Programming/node.js2018. 9. 9. 19:40

"node.js 인 액션" 책 보다가 검색

cURL에서 -X 옵션을 주면 된다


$ curl -X GET http://127.0.0.1:3000/api/users/bakyeono

$ curl -X POST http://127.0.0.1:3000/api/languages/ansi-common-lisp

$ curl -X PUT http://127.0.0.1:3000/api/resources/1789 

[링크 : https://bakyeono.net/post/2016-05-02-rest-api-client-for-cli.html]



-X/--request <command>

(HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.

(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.


If this option is used several times, the last one will be used.

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



'Programming > node.js' 카테고리의 다른 글

node-rtsp-stream 윈도우에서 설치하기는 실패?  (0) 2018.09.11
node.js HTTP 요청하기  (0) 2018.09.10
node.js rtsp 스트리밍  (0) 2018.09.07
RESTful  (0) 2018.09.07
node.js jwt -JSON Web Token  (0) 2018.09.07
Posted by 구차니

IDS로는 아무래도 방어에 한계가 있다 보니

새로운 패러다임으로 2012년 즈음에 주목받기 시작한 녀석인 듯


다르게 보면.. 서버 자체의 방어력을 올리는데에는 한계에 도달했으니

서버 이동성을 통해서 상대의 명중율을 낮춤으로서

상대적으로 방어력을 향상시킨다는 개념이 되려나?


네트워크 관점으로 보면..

이동 경로를 늘리고 동적으로 변형하면서

네트워크 단에서 서비스를 연결해주면서

정상/비정상 접속을 탐지해 내면서 끊어내주어야 하는거 아닌가 싶기도 하고


[링크 : https://www.krcert.or.kr/data/trendView.do?bulletin_writing_sequence=841]

[링크 : https://blog.cryptomove.com/moving-target-defense-recent-trends-253ce784a680]


Digital Shell game으로 야바위라는 이미지라..

[링크 : https://securityintelligence.com/moving-target-defense-a-digital-shell-game/]

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

db 정규화  (0) 2018.09.12
YOLO(영상처리)  (0) 2018.09.11
MNIST 데이터베이스  (0) 2018.06.22
VGA DMT 스펙  (0) 2018.06.11
vga 타이밍  (0) 2018.06.08
Posted by 구차니
Programming/node.js2018. 9. 7. 16:24

찾아보는데.. ffmpeg을 통해서 로컬에서 변환해서 전송해주는 방식

그러면.. 타임스탬프를 받을 수 있으려나?


[링크 : https://github.com/phoboslab/jsmpeg]

[링크 : https://www.npmjs.com/package/rtsp-ffmpeg]

[링크 : https://www.npmjs.com/package/node-rtsp-stream]

'Programming > node.js' 카테고리의 다른 글

node.js HTTP 요청하기  (0) 2018.09.10
cURL 그리고 REST  (6) 2018.09.09
RESTful  (0) 2018.09.07
node.js jwt -JSON Web Token  (0) 2018.09.07
아직 쓸일은 없지만 걍 찾아본 node.js ssl 적용  (0) 2018.09.07
Posted by 구차니
Programming/web 관련2018. 9. 7. 16:16

timestamp 값을 UTC나 로컬시간(한국이라면 KST)로 출력하는 방법을 찾는중

단순하게 date() 객체를 이용하면 될 듯


[링크 : https://stackoverflow.com/.../how-to-convert-a-timestamp-string-to-local-time-using-javascript]

[링크 : https://stackoverflow.com/questions/6525538/convert-utc-date-time-to-local-date-time/18330682]



테스트를 위해서 브라우저의 timezone을 변경해야 하는데

linux라면  export TZ 로 간단하게 할 수 있긴한데 윈도우는 이렇다할 방법을 아직 못 찾고

대신 플러그인을 발견함.


[링크 : https://gist.github.com/dustinsmith1024/dab3560abaa62cbe0754117d44c71026

[링크 : https://chrome.google.com/.../change-timezone-time-shif/nbofeaabhknfdcpoddmfckpokmncimpj]



'Programming > web 관련' 카테고리의 다른 글

REST API HTTP 에러코드  (0) 2018.11.06
sso openid oauth  (0) 2018.09.10
li 글자 수직정렬하기  (0) 2018.08.30
user agent stylesheet  (0) 2018.08.29
div min-width  (4) 2018.08.28
Posted by 구차니
Programming/node.js2018. 9. 7. 15:40

URI나 CRUD 등의 개념이 나오는데

서버에 대해서 하나의 주소 경로로 하여 명사형으로 URI를 구성하고

GET/PUT/POST/DELETE HTTP 메소드를 이용하여

DB의 create/read(select)/update/delete를 구현한다는 것 정도로 일단 이해


[링크 : https://nesoy.github.io/articles/2017-02/REST]

[링크 : https://spoqa.github.io/2013/06/11/more-restful-interface.html]

[링크 : http://blog.remotty.com/blog/2014/01/28/lets-study-rest/]

[링크 : https://beyondj2ee.wordpress.com/2013/03/21/당신의-api가-restful-하지-않은-5가지-증거/]

'Programming > node.js' 카테고리의 다른 글

cURL 그리고 REST  (6) 2018.09.09
node.js rtsp 스트리밍  (0) 2018.09.07
node.js jwt -JSON Web Token  (0) 2018.09.07
아직 쓸일은 없지만 걍 찾아본 node.js ssl 적용  (0) 2018.09.07
node.js exec와 JSON.parse()  (0) 2018.09.07
Posted by 구차니