embeded/raspberry pi2019. 5. 30. 18:29

 

[링크 : http://www.python-exemplary.com/index_en.php?inhalt_links=navigation_en.inc.php&inhalt_mitte=raspi/en/bluetooth.inc.php]

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

 

$ hciconfig -a
hci0: Type: Primary  Bus: USB
BD Address: 40:2C:F4:DB:D9:97  ACL MTU: 1021:8  SCO MTU: 64:1
UP RUNNING PSCAN ISCAN 
RX bytes:697 acl:0 sco:0 events:55 errors:0
TX bytes:5299 acl:0 sco:0 commands:53 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
Link policy: RSWITCH HOLD SNIFF PARK 
Link mode: SLAVE ACCEPT 
Name: 'mini2760'
Class: 0x1c010c
Service Classes: Rendering, Capturing, Object Transfer
Device Class: Computer, Laptop
HCI Version: 2.1 (0x4)  Revision: 0x132
LMP Version: 2.1 (0x4)  Subversion: 0x4203
Manufacturer: Broadcom Corporation (15)

[링크 : https://www.instructables.com/id/Turn-the-Raspberry-Pi-into-a-Bluetooth-Device/] << 

[: https://www.instructables.com/id/Install-Bluetooth-in-Linux-System/]

 

[링크 : https://raspberrypi.stackexchange.com/questions/47708/setup-raspberry-pi-3-as-bluetooth-speaker]

 

+

Setting Up Bluetooth Serial Port Profile on Raspberry Pi using sdptool

[링크 : https://scribles.net/setting-up-bluetooth-serial-port-profile-on-raspberry-pi/]

 

app

[링크 : https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal&hl=en_US]

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

sd formatter 바뀌었네?  (0) 2019.07.23
라즈베리 파이 2 lakka 설정  (1) 2019.07.23
라즈베리 파이 3.5인치 모니터(SPI)  (0) 2019.04.17
rpi bt  (0) 2019.04.08
라즈베리 파이 3b 외장 안테나 부품 실장 관련  (0) 2019.04.05
Posted by 구차니
프로그램 사용/docker2019. 5. 30. 17:18

아무생각이 없으니 이렇게 했겠지만..

docker create를 통해서 다운로드 받은 이미지를

컨테이너로 생성하는데 아무생각 없이 계속 create를 하니 계속 생겨날줄 알았는데 하나만 생겨난다.

$ sudo docker create atmoz/sftp
0eccda7b1d98f8a1c0330eaa6c8a507c7e4f8a52b65bc9667425be0b1b26dc94

$ sudo docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ sudo docker create atmoz/sftp
1ff507e5604be9a49cc235137eef12accfe8385c098b5a980089b6badc5398aa

$ sudo docker container ls -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1ff507e5604b        atmoz/sftp          "/entrypoint"       9 seconds ago       Created                                 suspicious_colden

$ sudo docker create atmoz/sftp
cbc11639cbb8263621b2106ecd9c50e265924052f620245a477e00e08c30cdbb

$ sudo docker container ls -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
cbc11639cbb8        atmoz/sftp          "/entrypoint"       2 seconds ago       Created                                 xenodochial_goldstine

 

그래서 테스트 하고 나서 삭제하려는데 어라?

지워도 지워도 계속 생겨난다 -ㅁ-?

 

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1ff507e5604b        atmoz/sftp          "/entrypoint"       7 minutes ago       Created                                 suspicious_colden

$ sudo docker rm 1ff507e5604b
1ff507e5604b

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
0eccda7b1d98        atmoz/sftp          "/entrypoint"       8 minutes ago       Created                                 hopeful_hugle

$ sudo docker rm 0eccda7b1d98
0eccda7b1d98

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

 

의도된 작동인지 버그인지 내가 착각하는건지 모르겠네 -ㅁ-?

 

요약)

1. create로 container 생성시 계속 생겨나지만 가장 최신 녀석만 목록에 나옴

2. rm으로 container 삭제시에도 fifo 처럼 마지막에 생성된 녀석들의 이름만 나옴

'프로그램 사용 > docker' 카테고리의 다른 글

docker ps 옵션 차이  (0) 2019.06.11
docker 컨테이너 이미지 이름으로 검색하기  (0) 2019.06.10
docker 자원 제한하기  (0) 2019.05.17
docker exited  (0) 2019.05.17
docker start run attach  (0) 2019.05.17
Posted by 구차니
Programming/node.js2019. 5. 29. 17:56

별다른 설정없이 해서 그런가

아니면 SSHD의 효과로 캐싱이 되서 그런가 속도 단축되지 않네..

 

$ time npm run build

real    0m54.356s
user    1m14.008s
sys     0m1.938s

 

$ time npm-run-all build

real    0m20.614s
user    0m26.791s
sys     0m0.973s

 

$ time npm run build

real    0m20.614s 
user    0m26.791s 
sys     0m0.973s 

 

[링크 : https://www.npmjs.com/package/npm-run-all]

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

electron ipc  (0) 2019.06.07
electron.js  (0) 2019.06.03
pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
Posted by 구차니
Programming/openGL2019. 5. 29. 08:06

오랫만에 다시 보니 기억이 하나도 안나네.. 큭...

행렬부터 다시 공부해야하나?

 

[링크  : http://www.opengl-tutorial.org/kr/beginners-tutorials/tutorial-3-matrices/]

[링크  : https://solarianprogrammer.com/2013/05/22/opengl-101-matrices-projection-view-model/]

'Programming > openGL' 카테고리의 다른 글

gl glx glu glut 소스코드  (0) 2019.05.31
glulookat / gluperspective / glfrustrum / glortho  (0) 2019.05.30
gluPerspective()  (0) 2019.05.28
glfw3 in ubuntu 19.04  (0) 2019.05.10
openGL vao(Vertex Array Object)  (0) 2019.05.07
Posted by 구차니
Programming/openGL2019. 5. 28. 19:04

오랫만에 다시 공부하게 되네 후..

일단 위의 함수는 z값에 대한 Near와 Far 값이 존재하는데

둘다 양수여야 하고 0 이상의 값을 가져야 한다.

(그걸 모르고 예전엔 0을 넣고 왜 안되는 거야! 하고 있었으니..)

zNear

Specifies the distance from the viewer to the near clipping plane (always positive).

zFar

Specifies the distance from the viewer to the far clipping plane (always positive).

Notes

Depth buffer precision is affected by the values specified for zNear and zFar. The greater the ratio of zFar to zNear is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If

r = zFar zNear

roughly log 2  r bits of depth buffer precision are lost. Because r approaches infinity as zNear approaches 0, zNear must never be set to 0.

[링크 : https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml]

 

실제코드인진 모르겠지만

znear가 0 이면, ymax xmax가 다 0이 되네

// Matrix will receive the calculated perspective matrix.
// You would have to upload to your shader
// or use glLoadMatrixf if you aren't using shaders.
void glhPerspectivef2(float *matrix, float fovyInDegrees, float aspectRatio,
                      float znear, float zfar)
{
    float ymax, xmax;
    float temp, temp2, temp3, temp4;
    ymax = znear * tanf(fovyInDegrees * M_PI / 360.0);
    // ymin = -ymax;
    // xmin = -ymax * aspectRatio;
    xmax = ymax * aspectRatio;
    glhFrustumf2(matrix, -xmax, xmax, -ymax, ymax, znear, zfar);
}

 

DIV/0의 향연이니.. 아마 입력 단계에서 zNear / nFar가 0이면 계산을 하지 않도록 할지도?

void glhFrustumf2(float *matrix, float left, float right, float bottom, float top,
                  float znear, float zfar)
{
    float temp, temp2, temp3, temp4;
    temp = 2.0 * znear;
    temp2 = right - left;
    temp3 = top - bottom;
    temp4 = zfar - znear;
    matrix[0] = temp / temp2;
    matrix[1] = 0.0;
    matrix[2] = 0.0;
    matrix[3] = 0.0;
    matrix[4] = 0.0;
    matrix[5] = temp / temp3;
    matrix[6] = 0.0;
    matrix[7] = 0.0;
    matrix[8] = (right + left) / temp2;
    matrix[9] = (top + bottom) / temp3;
    matrix[10] = (-zfar - znear) / temp4;
    matrix[11] = -1.0;
    matrix[12] = 0.0;
    matrix[13] = 0.0;
    matrix[14] = (-temp * zfar) / temp4;
    matrix[15] = 0.0;
}

[링크 : https://www.khronos.org/opengl/wiki/GluPerspective_code]

'Programming > openGL' 카테고리의 다른 글

glulookat / gluperspective / glfrustrum / glortho  (0) 2019.05.30
gl model view projection mat  (0) 2019.05.29
glfw3 in ubuntu 19.04  (0) 2019.05.10
openGL vao(Vertex Array Object)  (0) 2019.05.07
glfw - gl framework  (0) 2019.05.07
Posted by 구차니
개소리 왈왈/자전거2019. 5. 28. 12:42

1. 나가다가 핸폰 떨궈서 S펜 뽀개먹음..

뽀각~

 

일단은.. 순간접착제로 해놨는데 접합부가 적어서 힘을 못 받을것 같으니 최대한 오래 마르도록 냅둬야겠다..

예전에 3만원 한 것 같은데, 찾아보니 많이 착해진 듯?

 

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B370174078]

 

2. 엘리베이터 기다리다 앞 기어에 다리 찍혀서 피 철철

 

아놔.. 무슨 날이냐...

 

'개소리 왈왈 > 자전거' 카테고리의 다른 글

오랫만에 자전거  (0) 2020.05.06
자전거 대행진  (0) 2019.06.09
2019 자전거 대행진 신청!  (2) 2019.04.24
2019 서울 자전거 대행진!  (2) 2019.04.23
출근길 광고전단 - 바이크파크 + 자전거  (2) 2019.04.03
Posted by 구차니
Linux API/linux2019. 5. 27. 19:09

xrandr을 이용해서 하거나 iio 관련해서 찾아보는데

어떠한 데몬이 어떤 키값을 통해서 작동을 하는지 감이 안온다.

 

/lib/udev/hwdb.d/60-keyboard.hwdb

 

키값을 읽어오는 명령어인데 회전 키를 누르면 두개가 뜬다. 도대체 어떤 키지?

$ sudo showkey -s
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...

0x6b 0xeb 
0x6b 0xeb 
0x6b 0xeb 

[링크 : https://unix.stackexchange.com/questions/49650/how-to-get-keycodes-for-xmodmap]

'Linux API > linux' 카테고리의 다른 글

open() read() write() close()를 이용한 cp 예제  (0) 2020.09.28
fopen64  (0) 2019.06.24
전원버튼 IRQ 발생 관련  (0) 2018.04.23
linux kernel governor 관련 코드  (0) 2018.04.17
linux shared memory 관련  (0) 2016.12.22
Posted by 구차니
Programming/node.js2019. 5. 27. 12:28

pdf 읽어오고 변환하는건 python이나 node.js 그리고 java 등에 모두 존재는 하는 듯

그래도 라이센스가 문제인데..

 

[링크 : https://pdfbox.apache.org/]

[링크 : https://www.tutorialkart.com/pdfbox/extract-text-line-by-line-from-pdf/]

 

[링크 : https://itextpdf.com/en]

[링크 : https://stackoverflow.com/questions/4028240/extract-columns-of-text-from-a-pdf-file-using-itext]

 

[링크 : https://www.npmjs.com/package/pdfreader]

[링크 : https://www.npmjs.com/package/pdf-lib]

 

[링크 : http://www.unixuser.org/~euske/python/pdfminer/]

PDFMiner 모듈은 Python 2 버젼에서만 사용 가능

[링크 : https://dgkim5360.tistory.com/entry/python-pdfminer-convert-pdf-to-html-txt]

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

electron.js  (0) 2019.06.03
npm-run-all 병렬 빌드 (실패)  (0) 2019.05.29
node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
proxy error: Error: write after end  (0) 2019.04.23
Posted by 구차니
개소리 왈왈/컴퓨터2019. 5. 26. 20:40

고돌이 하는데도 자꾸 뻗어서 아내님이 승질내셔서

그래픽 카드를 달고 해보려고 했는데(가끔 동영상 틀어도 뻗는지라)

 

하드 인식 안되고

메모리도 인식 안되고 난리 피다가

겨우겨우 일단 켰는데

 

결국에는 SATA3 쪽으로는 인식 못시키고 SATA2 로만 인식이 되서

(그마나도 SATA2 2 커넥터는 인식 안함..)

어떻게 해야하나 고민중 펌웨어 문제인지(베타 펌웨어 사용이라서)

아니면.. 물리적 고장인지 모르겠네

Posted by 구차니
개소리 왈왈/컴퓨터2019. 5. 25. 22:55

그래픽 카드 없이 내장 그래픽만으로 쓰는데

팟 플레이어에서 HW  가속 해두면 의외로 자주 시스템이 뻗는다.

머가 문제일까.. 네트워크가 문제일까 하드웨어 디코더가 문제일까..

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

먼가 갑작스런 현자타임  (4) 2019.06.02
혹시나 그래픽 카드를 달려고 했는데  (0) 2019.05.26
다이소 5천원 모니터 받침대  (10) 2019.05.14
diskless 시스템 구축  (0) 2019.05.08
ACPI & smbus  (0) 2019.05.07
Posted by 구차니