젊어서(?) 그런가 어떻게 된게 예전 복실이 보다 유지비가 많이 드냐 ㅠㅠ
동물등록 2만
진료비 1.1만
피부약 2만?
검사비 2만?
약 값 얼마
머 대충 이렇게 합산되서 8.2만 정도 나왔던 듯
아무튼 세균성 피부병이라 언넝 낫길
그 와중에 냄새 이상해서 버리려고 놔둔 햄을 (1kg) 한 200g 남기고 다 먹으심 -_-
어쩐지 물을 미친듯이 마시고 밥을 잘 먹더라니 -_-
젊어서(?) 그런가 어떻게 된게 예전 복실이 보다 유지비가 많이 드냐 ㅠㅠ
동물등록 2만
진료비 1.1만
피부약 2만?
검사비 2만?
약 값 얼마
머 대충 이렇게 합산되서 8.2만 정도 나왔던 듯
아무튼 세균성 피부병이라 언넝 낫길
그 와중에 냄새 이상해서 버리려고 놔둔 햄을 (1kg) 한 200g 남기고 다 먹으심 -_-
어쩐지 물을 미친듯이 마시고 밥을 잘 먹더라니 -_-
irrecord가 ubuntu 20.04 에서 안되서 일단 18.04로 시도해서 성공.
ubuntu-18.04.3-3.16-minimal-odroid-c2-20190814.img
다시 한번 irrecord -f 옵션으로 20.04에서 시도해봐야 할 듯.
+
20.04 에서 해봤는데 -f 옵션으로 raw 처리하니 입력은 받을 수 있는 듯.
값이 미묘하게 다르긴 하지만 되는 것 같기도 하고?
GPIO IR 회로.

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/lirc_gpio_blaster]
간단하게 IR LED를 9번과(IR LED -극) 11번(IR LED +극)에 연결하면 된다.
거리가 60cm 정도만 떨어져도 인식이 안되기 시작해서 문제지 -_-
그래서 TR을 이용해서 전원을 공급받고 GPIO로 On/Off만 해주는 건가..

[링크 : https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors]
환경설정 파일
| # cat /etc/lirc/lirc_options.conf # These are the default options to lircd, if installed as # /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8) # manpages for info on the different options. # # Some tools including mode2 and irw uses values such as # driver, device, plugindir and loglevel as fallback values # in not defined elsewhere. [lircd] nodaemon = False driver = default device = /dev/lirc0 output = /var/run/lirc/lircd pidfile = /var/run/lirc/lircd.pid plugindir = /usr/lib/aarch64-linux-gnu/lirc/plugins permission = 666 allow-simulate = No repeat-max = 600 [lircmd] uinput = False nodaemon = False [modinit] code = /sbin/modprobe meson-ir [lircd-uinput] add-release-events = True release-timeout = 50 release-suffix = _EVUP |
커스텀(?) 리모컨 파일 추가.
서비스 재기동 전에는 해당 디렉토리의 파일을 새로 불러들이진 않는다.
| # cat /etc/lirc/lircd.conf.d/monex.lircd.conf # Please take the time to finish this file as described in # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/ # and make it available to others by sending it to # <lirc@bartelmus.de> # # This config file was automatically generated # using lirc-0.10.0(default) on Fri Sep 17 12:28:52 2021 # Command line used: -d /dev/lirc0 # Kernel version (uname -r): 3.16.72-46 # # Remote name (as of config file): monex # Brand of remote device, the thing you hold in your hand: # Remote device model nr: # Remote device info url: # Does remote device has a bundled capture device e. g., a # usb dongle? : # For bundled USB devices: usb vendor id, product id # and device string (use dmesg or lsusb): # Type of device controlled # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) : # Device(s) controlled by this remote: begin remote name monex bits 32 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 8970 4517 one 561 1692 zero 561 569 ptrail 563 repeat 8970 2289 gap 107503 toggle_bit_mask 0x0 frequency 38000 begin codes key_power 0x10EFEB14 0xFFFFFFFF key_menu 0x10EF3BC4 0xFFFFFFFF key_up 0x10EF49B6 0xFFFFFFFF key_down 0x10EF1BE4 0xFFFFFFFF key_left 0x10EFE916 0xFFFFFFFF key_right 0x10EFF906 0xFFFFFFFF key_ok 0x10EF51AE 0xFFFFFFFF key_exit 0x10EF2BD4 0xFFFFFFFF key_mute 0x10EFFB04 0xFFFFFFFF end codes end remote |
서비스 재기동 및 gpio ir tx 설정
irsend를 통해서 보낼대 조금 귀찮게 디바이스 설정을 해주어야 한다.
| $ service lircd stop $ modprobe lirc_dev $ modprobe lirc_odroid gpio_out_pin=247 softcarrier=1 invert=1 $ service lircd restart $ lircd --driver=default --device=/dev/lirc1 --output=/var/run/lirc/lirc1 --pidfile=/var/run/lirc/lirc1.pid $ irsend SEND_ONCE monex KEY_POWER -d /var/run/lirc/lirc1 |
| odroid c2 OTG와 mass storage (0) | 2021.09.19 |
|---|---|
| odroid c2 ADC (1) | 2021.09.19 |
| lirc irrecord, odroid c2 성공 (ubuntu 18.04.3) (0) | 2021.09.17 |
| odroid c2 lirc (0) | 2021.09.14 |
| odroid c2 i2c (0) | 2021.09.11 |
ubuntu-18.04.3-3.16-minimal-odroid-c2-20190814.img.xz 파일을 받아서 시도하니 된다.
2020년 중반 이후로 먼가 안된다는 글이 보이던데.. 구버전으로 가니 단번에 되네 -_-
아래의 명령어로
| $ irrecord -d /dev/lirc0 |
monex 43인치 UHD 모니터 리모컨 읽은 내용
| $ cat monex.lircd.conf # Please take the time to finish this file as described in # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/ # and make it available to others by sending it to # <lirc@bartelmus.de> # # This config file was automatically generated # using lirc-0.10.0(default) on Fri Sep 17 12:28:52 2021 # Command line used: -d /dev/lirc0 # Kernel version (uname -r): 3.16.72-46 # # Remote name (as of config file): monex # Brand of remote device, the thing you hold in your hand: # Remote device model nr: # Remote device info url: # Does remote device has a bundled capture device e. g., a # usb dongle? : # For bundled USB devices: usb vendor id, product id # and device string (use dmesg or lsusb): # Type of device controlled # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) : # Device(s) controlled by this remote: begin remote name monex bits 32 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 8970 4517 one 561 1692 zero 561 569 ptrail 563 repeat 8970 2289 gap 107503 toggle_bit_mask 0x0 frequency 38000 begin codes key_power 0x10EFEB14 0xFFFFFFFF key_menu 0x10EF3BC4 0xFFFFFFFF key_up 0x10EF49B6 0xFFFFFFFF key_down 0x10EF1BE4 0xFFFFFFFF key_left 0x10EFE916 0xFFFFFFFF key_right 0x10EFF906 0xFFFFFFFF key_ok 0x10EF51AE 0xFFFFFFFF key_exit 0x10EF2BD4 0xFFFFFFFF key_mute 0x10EFFB04 0xFFFFFFFF end codes end remote |
아래의 명령어로
| $ irrecord -d /dev/lirc0 -r |
monex 43인치 UHD 모니터 리모컨 읽은 내용
| $ cat mo_raw.lircd.conf # Please take the time to finish this file as described in # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/ # and make it available to others by sending it to # <lirc@bartelmus.de> # # This config file was automatically generated # using lirc-0.10.0(default) on Fri Sep 17 12:39:22 2021 # Command line used: -d /dev/lirc0 -f # Kernel version (uname -r): 3.16.72-46 # # Remote name (as of config file): mo_raw # Brand of remote device, the thing you hold in your hand: # Remote device model nr: # Remote device info url: # Does remote device has a bundled capture device e. g., a # usb dongle? : # For bundled USB devices: usb vendor id, product id # and device string (use dmesg or lsusb): # Type of device controlled # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) : # Device(s) controlled by this remote: begin remote name mo_raw flags RAW_CODES|CONST_LENGTH eps 30 aeps 100 gap 107463 begin raw_codes name key_power 8956 4523 570 559 569 558 569 561 567 1687 568 559 568 559 569 560 568 559 568 1685 569 1685 569 1686 569 560 568 1685 569 1686 569 1685 569 1685 570 1686 569 1685 570 1686 568 562 566 1687 568 561 567 1685 569 1686 569 561 567 560 567 561 567 1686 568 561 567 1685 569 560 568 560 567 name key_menu 8985 4496 520 608 519 609 519 608 519 1734 521 608 519 611 517 608 520 608 519 1734 521 1733 522 1732 522 608 520 1733 521 1733 521 1733 522 1733 522 608 519 608 520 1733 522 631 496 1733 522 607 520 1733 522 1733 522 1733 521 1733 521 609 518 1734 521 635 493 1735 523 605 540 589 540 name key_exit 8956 4522 571 560 567 584 544 560 567 1686 572 557 568 558 569 562 566 560 568 1685 569 1686 569 1684 570 559 569 1684 570 1685 570 1685 569 1685 569 561 567 1686 568 560 567 561 567 1685 569 561 567 560 568 1686 568 1686 568 564 564 1686 568 1686 569 561 567 1685 569 1686 568 560 568 name key_up 8958 4523 570 559 568 560 567 562 565 1686 569 559 568 560 568 561 567 561 566 1684 571 1684 570 1684 570 560 568 1685 569 1687 568 1686 568 1685 570 560 567 1686 568 560 568 561 566 1686 569 584 543 560 568 1685 569 1686 569 584 543 1686 569 1685 569 560 568 1686 568 1686 572 581 544 name key_down 8957 4525 566 585 543 563 565 563 565 1685 569 585 543 561 567 560 567 561 566 1687 546 1708 546 1710 545 584 543 1710 545 1711 544 1712 543 1711 545 583 544 583 545 585 542 1711 544 1710 546 585 542 1710 545 1710 547 1708 545 1710 545 1709 546 585 542 584 544 1710 545 585 543 608 520 name key_left 8958 4525 544 584 543 583 545 585 543 1709 546 584 543 585 543 583 544 584 567 1687 571 1683 571 1685 570 558 570 1684 571 1684 571 1683 572 1684 571 1683 572 1682 572 1683 571 559 569 1684 570 559 569 559 569 1684 571 558 569 561 567 559 569 1684 570 561 567 1684 570 1685 570 583 544 name key_right 8936 4543 576 552 575 553 575 553 575 1678 577 552 576 553 574 554 574 577 554 1677 574 1679 577 1678 577 553 574 1679 577 1678 577 1678 577 1678 576 1679 576 1679 576 1678 577 1677 578 1678 577 554 574 553 575 1679 575 553 575 553 575 552 576 557 571 555 573 1679 577 1678 576 553 575 end raw_codes end remote |
irrecord -r 옵션을 주니 세세하게 내용이 다르게 생성된다.
그래도.. raw 옵션주고 만드는데 나중에 추가하기 편하려나? mode2로 생성할때도 raw로 나오니까?
이제 odroid c2에 IR LED 달고 출력도 되면 개꿀~!
| odroid c2 ADC (1) | 2021.09.19 |
|---|---|
| odroid c2 lircd output 성공 (0) | 2021.09.18 |
| odroid c2 lirc (0) | 2021.09.14 |
| odroid c2 i2c (0) | 2021.09.11 |
| odroid c2 wiringpi pinout (0) | 2021.09.10 |
라즈베리 파이 zero에서 USB 메모리 스틱처럼 인식을 시킬수 있다는데
2B나 3B 등에서는 아무래도 회로적으로 USB OTG 구성이 되어 있지 않으니 안될 것 같고
rpi CM4만 해도 OTG가 굽는 용도로 있으니 어떻게 든 가능할 것 같은데.. 확신은 없음
반대로 OTG가 존재하는 odroid 등에서는 가능하려나?
| $ sudo modprobe g_mass_storage removable=1 ro=1 |
[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=223127]
[링크 : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_File_Storage]
| rpi4에서 gpio readall 실행 안될 때 (0) | 2021.09.24 |
|---|---|
| rpi 4 lirc tx, rx (0) | 2021.09.23 |
| rpi stretch lirc irrecord 실패 (0) | 2021.09.16 |
| lirc 제조사별 키코드 (0) | 2021.09.16 |
| lirc를 이용한 리모컨 신호 복제 (0) | 2021.09.13 |
머가 문제일까..
[링크 : https://raspberrypi.stackexchange.com/questions/104008/lirc-irrecord-wont-record-buster-mode2-works]
+
stretch가 문제가 아니라
decoded에 문제가 있는지 raw로 하니 잘 된다.
| rpi 4 lirc tx, rx (0) | 2021.09.23 |
|---|---|
| rpi USB 메모리 스틱처럼 만들기? rpi zero (0) | 2021.09.17 |
| lirc 제조사별 키코드 (0) | 2021.09.16 |
| lirc를 이용한 리모컨 신호 복제 (0) | 2021.09.13 |
| rpi 에서 ir 읽기 (0) | 2021.09.11 |
통신을 주고 받으면서 해당 내용을 파일로 저장하는 기능.
ctrl-a,z 에서 "Capture on/off.....L" 을 눌러 들어가면
+-------------------------------------------------------------------+
| Minicom Command Summary |
| |
| Commands can be called by CTRL-A <key> |
| |
| Main Functions Other Functions |
| |
| Dialing directory..D run script (Go)....G | Clear Screen.......C |
| Send files.........S Receive files......R | cOnfigure Minicom..O |
| comm Parameters....P Add linefeed.......A | Suspend minicom....J |
| Capture on/off.....L Hangup.............H | eXit and reset.....X |
| send break.........F initialize Modem...M | Quit with no reset.Q |
| Terminal settings..T run Kermit.........K | Cursor key mode....I |
| lineWrap on/off....W local Echo on/off..E | Help screen........Z |
| Paste file.........Y Timestamp toggle...N | scroll Back........B |
| Add Carriage Ret...U |
| |
| Select function or press Enter for none. |
+-------------------------------------------------------------------+
저장할 파일명을 물어본다. minicom을 실행한 현재 디렉토리를 기준으로 저장된다.
+-----------------------------------------+
|Capture to which file? |
|> minicom.cap |
+-----------------------------------------+| minicom lf에 cr 붙이기 (0) | 2023.01.05 |
|---|---|
| minicom 16진수로 보기 (0) | 2022.08.25 |
| minicom timestamp (0) | 2021.09.16 |
| minicom 폭 늘리기 (0) | 2021.01.28 |
| /dev/tty 를 sudo 쓰지 않고 사용하기 (0) | 2020.09.24 |
라즈베리에 달린 USB 시리얼을 아래와 같이 실행해주고
| $ socat /dev/ttyUSB0,raw,echo=0 tcp-listen:8888,reuseaddr |
putty에서 raw 소켓으로 붙이니

양방향으로 소켓을 통해 전송이 가능하다.
로그인은 하고 usbtty로 붙이려면 어떻게 하면 되려나?

| bash multiple session history (0) | 2021.10.01 |
|---|---|
| 특정 pts에서 프로그램 실행하기 (0) | 2021.09.27 |
| 리눅스 콘솔에서 gmail 통해 메일 보내기는 실패 ㅠㅠ (0) | 2021.09.15 |
| linux sw raid (0) | 2021.08.30 |
| glibc 버전 얻기 (0) | 2021.07.09 |
[링크 : http://lirc.sourceforge.net/remotes/]
[링크 : http://lirc.sourceforge.net/]
+
mode2로 raw 값을 때려박는 법을 찾아봐야겠네..
[링크 : https://github.com/mad-ady/lg-ac-remote-lirc/blob/master/lircd.conf]
| rpi USB 메모리 스틱처럼 만들기? rpi zero (0) | 2021.09.17 |
|---|---|
| rpi stretch lirc irrecord 실패 (0) | 2021.09.16 |
| lirc를 이용한 리모컨 신호 복제 (0) | 2021.09.13 |
| rpi 에서 ir 읽기 (0) | 2021.09.11 |
| rpi 3b update, install 실패 (0) | 2021.09.10 |
minicom에서 "Timestamp toggle...N" 을 누르면
별다른 티를 내지 않고 그냥 나가버리는데
+-------------------------------------------------------------------+
| Minicom Command Summary |
| |
| Commands can be called by CTRL-A <key> |
| |
| Main Functions Other Functions |
| |
| Dialing directory..D run script (Go)....G | Clear Screen.......C |
| Send files.........S Receive files......R | cOnfigure Minicom..O |
| comm Parameters....P Add linefeed.......A | Suspend minicom....J |
| Capture on/off.....L Hangup.............H | eXit and reset.....X |
| send break.........F initialize Modem...M | Quit with no reset.Q |
| Terminal settings..T run Kermit.........K | Cursor key mode....I |
| lineWrap on/off....W local Echo on/off..E | Help screen........Z |
| Paste file.........Y Timestamp toggle...N | scroll Back........B |
| Add Carriage Ret...U |
| |
| Select function or press Enter for none. |
+-------------------------------------------------------------------+
한번 누를 때 마다 다음과 같은 시간 포맷으로 출력된다.
개인적으로는 ms 단위까지 표현해주는게 좋음.
| U-Boot [2021-09-16 14:23:35] U-Boot [2021-09-16 14:23:55.603] U-Boot |
[링크 : https://stackoverflow.com/questions/54377832/extended-timestamp-as-default-in-minicom]
[링크 : https://askubuntu.com/questions/905655/not-able-to-add-timestamp-to-minicom-readings]
| minicom lf에 cr 붙이기 (0) | 2023.01.05 |
|---|---|
| minicom 16진수로 보기 (0) | 2022.08.25 |
| minicom 로그 저장하기 (0) | 2021.09.16 |
| minicom 폭 늘리기 (0) | 2021.01.28 |
| /dev/tty 를 sudo 쓰지 않고 사용하기 (0) | 2020.09.24 |
smtp 설정이 없어서
[링크 : https://www.tecmint.com/send-email-attachment-from-linux-commandline/]
다른걸 찾아보니 ssmtp 라는걸 통해 보내기도 하네?
| [<-] 220 smtp.gmail.com ESMTP h8sm1096aae22880pfo.64 - gsmtp [->] EHLO kali [<-] 250 SMTPUTF8 [->] STARTTLS [<-] 220 2.0.0 Ready to start TLS [->] EHLO kali [<-] 250 SMTPUTF8 [->] AUTH LOGIN [<-] 334 VXNlcm5edhbAWU6 [->] dmlzaGFsY2hhasd2dWhhbjIyMTJAZ21haWwuY29t [<-] 334 UGFzqc3dmvcmQ36 [<-] 235 2.7.0 Accepted [->] MAIL FROM:<root@kali> [<-] 250 2.1.0 OK h8smqer10962480pfo.64 - gsmtp [->] RCPT TO:<crazy@yopmail.com> [<-] 250 2.1.5 OK h8smqer10962480pfo.64 - gsmtp [->] DATA [<-] 354 Go ahead h8sm10962880pfo.64 - gsmtp [->] Received: by kali (sSMTP sendmail emulation); Thu, 19 Sep 2019 21:45:14 +0530 [->] From: "root" <root@kali> [->] Date: Thu, 19 Sep 2019 21:45:14 +0530 [->] Hey There! This is a test mail [->] [->] . [<-] 250 2.0.0 OK 1568909725 h8smqer10962480pfo.64 - gsmtp [->] QUIT [<-] 221 2.0.0 closing connection h8smqer10962480pfo.64 - gsmtp |
[링크 : https://netcorecloud.com/tutorials/linux-send-mail-from-command-line-using-smtp-server/]
mail을 실행하니 mailbox를 열수 없대서 pi 계정을 mail 그룹에 추가했는데도 안되서
해당 디렉토리 생성하니 파일이 필요하다고 배째는 구나 ㅋㅋ
아무튼 파일까진 생성했는데 외부로 메일 어떻게 보내지?
| $ mail Cannot open mailbox /var/mail/pi: Permission denied No mail for pi $ sudo adduser pi mail Adding user `pi' to group `mail' ... Adding user pi to group mail Done. $ sudo mkdir /var/mail/pi Cannot open mailbox /var/mail/pi: Is a directory No mail for pi $ sudo rm -rf /var/mail/pi $ sudo touch /var/mail/pi Cannot open mailbox /var/mail/pi: Permission denied No mail for pi $ sudo chown pi:pi /var/mail/pi pi@raspberrypi:~ $ mail No mail for pi |
[링크 : https://askubuntu.com/questions/350853/]
메일 릴레이, 구글 워크스페이스 유료버전일 경우 가능
[링크 : https://support.google.com/a/answer/176600?hl=ko]
+
| $ echo -e "to: receiver@domain.tld\nsubject: subject\n"| (cat - && uuencode /path/to/attachment attachment.name) | ssmtp receiver@gmail.com |
[링크 : https://unix.stackexchange.com/questions/44043/how-can-i-send-attachment-with-ssmtp-in-linux]
uuencode 설치하려면 아래 패키지가 필요하다.
| $ sudo apt-get install sharutils |
[링크 : https://askubuntu.com/questions/232440/how-do-i-install-uudecode]
| On ubuntu/debian, this file is in /etc/ssl/certs/ca-certificates.crt. You could symlink it. The /etc/pki/ path is used on Redhat. |
[링크 : https://askubuntu.com/questions/342484/etc-pki-tls-certs-ca-bundle-crt-not-found]
+
마지막 줄은 에러로 뜨는데 도대체 멀까 ㅠㅠ
| [<-] 220 smtp.gmail.com ESMTP y5sm1106947pfb.207 - gsmtp [->] EHLO raspberrypi [<-] 250 SMTPUTF8 [->] STARTTLS [<-] 220 2.0.0 Ready to start TLS [->] EHLO raspberrypi [<-] ssmtp: (raspberrypi) |
+
구글 보안때문에 안되는건가...
[링크 : https://medium.com/swlh/setting-up-gmail-and-other-email-on-a-raspberry-pi-6f7e3ad3d0e]
| 특정 pts에서 프로그램 실행하기 (0) | 2021.09.27 |
|---|---|
| socat을 이용한 ttyUSB to TCP (0) | 2021.09.16 |
| linux sw raid (0) | 2021.08.30 |
| glibc 버전 얻기 (0) | 2021.07.09 |
| 쉘스크립트 반복 실행(인자로 준 횟수 만큼) (0) | 2021.06.11 |