embeded/odroid2021. 9. 29. 17:50

ADC 제외하고는 3.3V

라즈베리와 동일한 전압레벨이니 ok

[링크 : https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors]

 

이런저런 경고가 뜨지만 무시하고 설치!

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:hardkernel/ppa
$ sudo apt update
$ sudo apt install odroid-wiringpi
$ gpio readall
 +-----+-----+---------+------+---+--- C2 ---+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3V |      |   |  1 || 2  |   |      | 5V      |     |     |
 | 205 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5V      |     |     |
 | 206 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0V      |     |     |
 | 249 |   7 |  IO.249 |   IN | 1 |  7 || 8  |   |      | TxD1    | 15  |     |
 |     |     |      0V |      |   |  9 || 10 |   |      | RxD1    | 16  |     |
 | 247 |   0 |  IO.247 |   IN | 1 | 11 || 12 | 1 | IN   | IO.238  | 1   | 238 |
 | 239 |   2 |  IO.239 |   IN | 1 | 13 || 14 |   |      | 0V      |     |     |
 | 237 |   3 |  IO.237 |   IN | 1 | 15 || 16 | 1 | IN   | IO.236  | 4   | 236 |
 |     |     |    3.3V |      |   | 17 || 18 | 1 | IN   | IO.233  | 5   | 233 |
 | 235 |  12 |  IO.235 |   IN | 1 | 19 || 20 |   |      | 0V      |     |     |
 | 232 |  13 |  IO.232 |   IN | 1 | 21 || 22 | 1 | IN   | IO.231  | 6   | 231 |
 | 230 |  14 |  IO.230 |   IN | 1 | 23 || 24 | 1 | IN   | IO.229  | 10  | 229 |
 |     |     |      0V |      |   | 25 || 26 | 1 | OUT  | IO.225  | 11  | 225 |
 |     |  30 |   SDA.2 |      |   | 27 || 28 |   |      | SCL.2   | 31  |     |
 | 228 |  21 |  IO.228 |   IN | 1 | 29 || 30 |   |      | 0V      |     |     |
 | 219 |  22 |  IO.219 |   IN | 1 | 31 || 32 | 1 | IN   | IO.224  | 26  | 224 |
 | 234 |  23 |  IO.234 |   IN | 0 | 33 || 34 |   |      | 0V      |     |     |
 | 214 |  24 |  IO.214 |   IN | 1 | 35 || 36 | 1 | IN   | IO.218  | 27  | 218 |
 |     |  25 |   AIN.1 |      |   | 37 || 38 |   |      | 1V8     | 28  |     |
 |     |     |      0V |      |   | 39 || 40 |   |      | AIN.0   | 29  |     |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+--- C2 ---+---+------+---------+-----+-----+

Err:3 http://deb.odroid.in/c2 bionic InRelease
  The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>

Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.odroid.in/c2 bionic InRelease: The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>
W: Failed to fetch http://deb.odroid.in/c2/dists/bionic/InRelease  The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/wiringpi]

'embeded > odroid' 카테고리의 다른 글

ordroid c2 - mrs 명령어 고찰  (0) 2023.09.05
wayland on odroid-c2  (0) 2021.11.22
g_mass_storage rpi - odroid c2  (0) 2021.09.28
g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보  (0) 2021.09.27
Posted by 구차니
embeded/raspberry pi2021. 9. 29. 16:43

1주일 정도 켜놨더니 USB HUB 가 맛이 가서 장치를 인식하지 않는데

원격접속은 문제가 없어서 의아해 하는 중.

 

rpi 2b는 USB 2.0 HUB에 랜 + USB 4port 허브로 구성된 녀석으로 알고 있었는데

3 이후로 바뀐건지 4부터 바뀐건진 모르겠지만

USB가 죽는다고 원격을 못하는 상황은 아니니 훨신 나은 듯?

 

 

+

전체 회로 공개 안하는걸로 정책이 바뀌었나?

[링크 : https://www.raspberrypi.org/documentation/computers/raspberry-pi.html]

[링크 : https://datasheets.raspberrypi.org/]

 

라즈베리 3b 까지는 USB lan 이었는지 랜포트도 그려져 있지 않은데

3b+ 이후 부터는 랜이 따로 나오는 듯?

rpi 4

GbE / TRD[0123]_[NP]

[링크 : https://datasheets.raspberrypi.org/rpi4/raspberry-pi-4-reduced-schematics.pdf]

bcm54213

https://www.hackster.io/news/meet-the-new-raspberry-pi-4-model-b-9b4698c284

 

rpi 3b+

ETH, PoE , TR[0123][np]

[링크 : https://datasheets.raspberrypi.org/rpi3/raspberry-pi-3-b-plus-reduced-schematics.pdf]

보드에서 방열판 떼어보니 LAN7515칩이 발견됨

Hi-Speed USB 2.0 to 10/100/1000 Gigabit Ethernet controller

[링크 : https://www.microchip.com/en-us/product/LAN7500]

 

rpi 3b

[링크 : https://datasheets.raspberrypi.org/rpi3/raspberry-pi-3-b-reduced-schematics.pdf]

 

rpi 2b

[링크 : https://datasheets.raspberrypi.org/rpi2/raspberry-pi-2-b-reduced-schematics.pdf]

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

rpi pico usb sound  (0) 2021.11.08
rpi3 2초만에 부팅하기  (0) 2021.10.30
rpi zero otg  (0) 2021.09.27
스피커가 부실했군..  (0) 2021.09.26
rpi 2b g_mass_storage  (0) 2021.09.25
Posted by 구차니
embeded/odroid2021. 9. 28. 23:37

dd 해서 파일기반 파일시스템을 만들고 mkfs를 하지 않으면 g_mass_storage에 연결은 되어있지만

USB HOST 측에서 마운트를 할 수 없다(파일 시스템을 알 수 없어 마운트 불가)

// odroid c2 에서 작업
# dd if=/dev/zero of=otg.drive bs=1M count=128
# mkfs -t ext4 otg.drive
# modprobe g_mass_storage filename=otg.drive

 

USB HOST 측에서는 단순하게 마운트 해서 쓰면 되는데

// rpi 2b 에서 작업
$ sudo mount /dev/sda /mnt
$ sudo touch /mnt/tt
$ sudo umount /mnt

 

odroid의 mmcblk0p1을 연결했을 때는 sync 하면 쓰이는게 보였던 것 같은데

파일 기반 파일시스템이라 그런가 rpi 2b에서 파일을 생성하고 sync 해도 변화가 없고, umount를 해도 변화가 없었다.

odroid c2 에서 해당 파일을 umount 하고 mount 해야 변경점이 보이는데

물리 장칙 아니라 그런진 모르겠다.

 

[링크 : https://linuxconfig.org/how-to-create-a-file-based-filesystem-using-dd-command-on-linux]

[링크 : https://www.kernel.org/doc/Documentation/usb/mass-storage.txt]

'embeded > odroid' 카테고리의 다른 글

wayland on odroid-c2  (0) 2021.11.22
odroid c2 gpio 와 wiringpi  (0) 2021.09.29
g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보  (0) 2021.09.27
odroid c2 usb otg, libcomposite usb hid  (0) 2021.09.26
Posted by 구차니
embeded/odroid2021. 9. 28. 22:32

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

 

[링크 : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_File_Storage]

[링크 : https://www.kernel.org/doc/Documentation/usb/mass-storage.txt]

[링크 : https://linux-sunxi.org/USB_Gadget/Mass_storage]

 

 

# modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y
# dmesg
[   41.197852] Mass Storage Function, version: 2009/09/11
[   41.197867] LUN: removable file: (no medium)
[   41.197950] LUN: removable file: /dev/mmcblk0p1
[   41.197956] Number of LUNs=1
[   41.197965] Number of LUNs=1
[   41.198085] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[   41.198092] g_mass_storage gadget: userspace failed to provide iSerialNumber
[   41.198097] g_mass_storage gadget: g_mass_storage ready
[   41.504544] USB RESET
[   41.583840] usb 1-1.3: new high-speed USB device number 3 using dwc_otg
[   41.587991] USB RESET
[   41.685839] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
[   41.686316] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   41.686873] usb-storage 1-1.3:1.0: Quirks match for vid 0525 pid a4a5: 10000
[   41.686927] scsi0 : usb-storage 1-1.3:1.0
[   42.684797] scsi 0:0:0:0: Direct-Access     Linux    File-Stor Gadget 0316 PQ: 0 ANSI: 2
[   42.688020] sd 0:0:0:0: [sda] 262144 512-byte logical blocks: (134 MB/128 MiB)
[   42.688133] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   42.696834] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   42.794589] sd 0:0:0:0: [sda] Write Protect is off
[   42.794603] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[   42.794783] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   42.904614] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   42.906940] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.014729] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.125146]  sda:
[   43.127871] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.235032] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.344734] sd 0:0:0:0: [sda] Attached SCSI removable disk
# lsmod
Module                  Size  Used by
sg                     31094  0
g_mass_storage          2587  0
usb_f_mass_storage     35010  2 g_mass_storage
libcomposite           46311  2 usb_f_mass_storage,g_mass_storage
ir_lirc_codec           4934  3
lirc_dev               10879  1 ir_lirc_codec
ir_mce_kbd_decoder      3426  0
ir_rc6_decoder          2010  0
ir_sanyo_decoder        1657  0
ir_sony_decoder         1663  0
ir_jvc_decoder          1725  0
ir_rc5_decoder          1586  0
ir_nec_decoder          1789  0
meson_ir                3356  0
w1_gpio                 3801  0
wire                   28614  1 w1_gpio
gxbb_wdt                3395  0
meson_gpiomem           4040  0
sch_fq_codel            7827  2
ip_tables              17220  0
ipv6                  387317  18
autofs4                27592  2
# rmmod g_mass_storage
root@odroid:~# lsmod
Module                  Size  Used by
sg                     31094  0
usb_f_mass_storage     35010  0
libcomposite           46311  1 usb_f_mass_storage
ir_lirc_codec           4934  3
lirc_dev               10879  1 ir_lirc_codec
ir_mce_kbd_decoder      3426  0
ir_rc6_decoder          2010  0
ir_sanyo_decoder        1657  0
ir_sony_decoder         1663  0
ir_jvc_decoder          1725  0
ir_rc5_decoder          1586  0
ir_nec_decoder          1789  0
meson_ir                3356  0
w1_gpio                 3801  0
wire                   28614  1 w1_gpio
gxbb_wdt                3395  0
meson_gpiomem           4040  0
sch_fq_codel            7827  2
ip_tables              17220  0
ipv6                  387317  18
autofs4                27592  2
# modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y
modprobe: ERROR: could not insert 'g_mass_storage': Device or resource busy

[링크 : https://developer.ridgerun.com/wiki/index.php?title=How_to_use_mass_storage_gadget]

Posted by 구차니

으아아아아아아 싫다

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

빨간날 야근  (0) 2021.10.04
피곤엔 낮잠이 꿀잠이네  (0) 2021.10.03
먼가 만들어 볼까  (0) 2021.09.22
피곤피곤  (0) 2021.09.20
경험이 능력을 만든다.  (0) 2021.09.19
Posted by 구차니

WPA2 TKIP/AES는

프로토콜과 알고리즘(cipher) 이라는 두 개의 콤비네이션(!)으로 이뤄진 용어이다.

[링크 : https://www.netmanias.com/ko/post/blog/5376/security-wi-fi/wi-fi-wpa2-aes-ccmp-encryption-algorithm]

 

WPA : WEP 대체용

WPA2 : WPA 대체용

WPA3 : PSK(Pre-Shared Key) with SAE(Simultaneous Authentication of Equals) 대체

 

WPA-Personal = WPA-PSK

WPA-Enterpirse = RADIUS 인증 서버 요청을 필요하는 WPA

WPS = Wi-Fi Protected Setup (버튼 눌러서 암호 입력 없이 사용하는 방법)

 

Encryption protocol

TKIP = Temporal Key Integrity Protocol

CCMP = CTR mode with CBC-MAC Protocol, WPA2 에서 사용하는 AES 기반 암호화 기술

[링크 : https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access]

'이론 관련 > 네트워크 관련' 카테고리의 다른 글

RS485 오실로스코프 파형  (0) 2021.11.04
EtherCAT - Ethernet for Control Automation Technology  (0) 2021.11.01
wake on patern matching  (0) 2021.06.10
rs-422  (0) 2021.06.03
FTPS  (0) 2021.02.07
Posted by 구차니
embeded/raspberry pi2021. 9. 27. 18:00

rpi 4 cm 에서 usb를 쓰려면 config.txt에 다음의 내용을 추가해야 하는데

dtoverlay=dwc2,dr_mode=host

 

$ modinfo dwc2
filename:       /lib/modules/5.10.60-v7+/kernel/drivers/usb/dwc2/dwc2.ko
license:        Dual BSD/GPL
author:         Synopsys, Inc.
description:    DESIGNWARE HS OTG Core
license:        Dual BSD/GPL
author:         Matthijs Kooijman <matthijs@stdin.nl>
description:    DESIGNWARE HS OTG Platform Glue
srcversion:     C0FF7C976DCDD3E4810AFB1
alias:          of:N*T*Cst,stm32mp15-hsotgC*
alias:          of:N*T*Cst,stm32mp15-hsotg
alias:          of:N*T*Cst,stm32mp15-fsotgC*
alias:          of:N*T*Cst,stm32mp15-fsotg
alias:          of:N*T*Cst,stm32f7-hsotgC*
alias:          of:N*T*Cst,stm32f7-hsotg
alias:          of:N*T*Cst,stm32f4x9-hsotgC*
alias:          of:N*T*Cst,stm32f4x9-hsotg
alias:          of:N*T*Cst,stm32f4x9-fsotgC*
alias:          of:N*T*Cst,stm32f4x9-fsotg
alias:          of:N*T*Capm,apm82181-dwc-otgC*
alias:          of:N*T*Capm,apm82181-dwc-otg
alias:          of:N*T*Camcc,dwc-otgC*
alias:          of:N*T*Camcc,dwc-otg
alias:          of:N*T*Camlogic,meson-g12a-usbC*
alias:          of:N*T*Camlogic,meson-g12a-usb
alias:          of:N*T*Camlogic,meson-gxbb-usbC*
alias:          of:N*T*Camlogic,meson-gxbb-usb
alias:          of:N*T*Camlogic,meson8b-usbC*
alias:          of:N*T*Camlogic,meson8b-usb
alias:          of:N*T*Camlogic,meson8-usbC*
alias:          of:N*T*Camlogic,meson8-usb
alias:          of:N*T*Csamsung,s3c6400-hsotgC*
alias:          of:N*T*Csamsung,s3c6400-hsotg
alias:          of:N*T*Csnps,dwc2C*
alias:          of:N*T*Csnps,dwc2
alias:          of:N*T*Clantiq,xrx200-usbC*
alias:          of:N*T*Clantiq,xrx200-usb
alias:          of:N*T*Clantiq,arx100-usbC*
alias:          of:N*T*Clantiq,arx100-usb
alias:          of:N*T*Crockchip,rk3066-usbC*
alias:          of:N*T*Crockchip,rk3066-usb
alias:          of:N*T*Chisilicon,hi6220-usbC*
alias:          of:N*T*Chisilicon,hi6220-usb
alias:          of:N*T*Cbrcm,bcm2835-usbC*
alias:          of:N*T*Cbrcm,bcm2835-usb
depends:        udc-core,roles
intree:         Y
name:           dwc2
vermagic:       5.10.60-v7+ SMP mod_unload modversions ARMv7 p2v8
pi@raspberrypi:~ $ modinfo dwc2 -v

 

dtoverlay 상으로는 dr_mode 에 host / peripheral / otg를 넣을수 있다고 한다.

$ sudo dtoverlay -h dwc2
Name:   dwc2

Info:   Selects the dwc2 USB controller driver

Usage:  dtoverlay=dwc2,<param>=<val>

Params: dr_mode                 Dual role mode: "host", "peripheral" or "otg"

        g-rx-fifo-size          Size of rx fifo size in gadget mode

        g-np-tx-fifo-size       Size of non-periodic tx fifo size in gadget
                                mode

 

otg 설정에 주변기기로 인식을 시키네..?

dtoverlay=dwc2,dr_mode=peripheral in file /boot/config.txt.

[링크 : https://gist.github.com/gbaman/50b6cca61dd1c3f88f41]

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

rpi3 2초만에 부팅하기  (0) 2021.10.30
rpi 4는 USB to Ethernet이 아닌가?  (0) 2021.09.29
스피커가 부실했군..  (0) 2021.09.26
rpi 2b g_mass_storage  (0) 2021.09.25
rpi4에서 gpio readall 실행 안될 때  (0) 2021.09.24
Posted by 구차니
embeded/odroid2021. 9. 27. 17:21

odroid c2용 18.04 버전정보를 보니 커널이 3.16

# uname -a
Linux odroid 3.16.72-46 #1 SMP PREEMPT Tue Aug 13 18:09:58 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

 

20.04는 커널 버전이 올라갔으려나?

ubuntu-18.04.3-3.16-minimal-odroid-c2-20190814.img
ubuntu-20.04-3.16-minimal-odroid-c2-20210201.img

파일명을 보아하니.. 커널은 둘다 동일하게 3.16이고 배포판 버전만 올라간듯..

 

[링크 : https://wiki.odroid.com/getting_started/os_installation_guide#tab__odroid-c2]

[링크 : https://dn.odroid.com/S905/Ubuntu/]

 

4.17에 대한 글은 2018년도에 멈춰있네..

[링크 : https://www.hardkernel.com/ko/tag/odroid-c2/]

[링크 : https://forum.odroid.com/viewtopic.php?f=135&t=22717&start=850#p226092]

 

'embeded > odroid' 카테고리의 다른 글

g_mass_storage rpi - odroid c2  (0) 2021.09.28
g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 usb otg, libcomposite usb hid  (0) 2021.09.26
odorid c2 usb otg gadget keyboard as hid  (0) 2021.09.23
odroid c2 OTG와 mass storage  (0) 2021.09.19
Posted by 구차니
Linux2021. 9. 27. 16:33

단순하게

$ echo "ls" > /dev/pts/1

을 실행하면

해당 터미널에서 ls 라고만 나오지 실행이 되진 않는다.

 

누군가가 만들어 둔 ttyecho 라는 예제 프로그램만 눈에 보이네..

[링크 : https://www.humbug.in/2010/utility-to-send-commands-or-data-to-other-terminals-ttypts/]

  [링크 : https://unix.stackexchange.com/questions/260503/how-do-i-run-a-command-in-a-different-tty]

[링크 : https://stackoverflow.com/questions/24725051/execute-a-command-in-another-terminal-via-dev-pts]

[링크 : https://admin-ahead.com/forum/general-linux/execute-a-command-on-a-different-ttypts/]

'Linux' 카테고리의 다른 글

convert fb(rgb565) to png 실..패?  (0) 2021.10.18
bash multiple session history  (0) 2021.10.01
socat을 이용한 ttyUSB to TCP  (0) 2021.09.16
리눅스 콘솔에서 gmail 통해 메일 보내기는 실패 ㅠㅠ  (0) 2021.09.15
linux sw raid  (0) 2021.08.30
Posted by 구차니
embeded/raspberry pi2021. 9. 26. 17:33

일단 앰프는 class D 앰프고

얘는 PWM 어쩌구 하던데 원리까지 알아보려니 급 귀찮고..

 

The PAM8403 is a 3W, class-D audio amplifier.

[링크 : https://pdf1.alldatasheet.com/datasheet-pdf/view/1132029/DIODES/PAM8403.html]

[링크 : https://blog.naver.com/iknowiknow/40021691136]

 

지금보니 스피커는 0.5W

드라이브는 3W+3W 가능한데 오늘 odroid에 연결해서 5V 어댑터 전원 끌어오니 음질이 썩 나쁘진 않은것 같기도?

0.5W 면은 5V * 0.1A 일텐데, 두개니까 0.2A

전에도 그렇겠지만 딱히 커버 불가능한 수준은 아닌것 같은데 왜였을까..

[링크 : https://blog.naver.com/damtaja/221848352426]

2020.04.17 - [embeded/arduino(genuino)] - PAM8403 3W 스테레오 오디오 앰프

 

다른 저가형 사운드바를 봐도 3W 를 많이 쓰는데 비슷한 등급의 부품을 써서 만드는 것 같네.

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

rpi 4는 USB to Ethernet이 아닌가?  (0) 2021.09.29
rpi zero otg  (0) 2021.09.27
rpi 2b g_mass_storage  (0) 2021.09.25
rpi4에서 gpio readall 실행 안될 때  (0) 2021.09.24
rpi 4 lirc tx, rx  (0) 2021.09.23
Posted by 구차니