raspberry_pi
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
raspberry_pi [2016/08/16 13:03] – [Port série] simon | raspberry_pi [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Raspberry Pi ====== | ||
- | Le Raspberry Pi est un micro-ordinateur conçu par [[https:// | ||
- | |||
- | ===== Choix de l'OS ===== | ||
- | On peut trouver les [[https:// | ||
- | |||
- | ==== Raspbian ==== | ||
- | Tous les détails sur la page de [[Raspbian]]. | ||
- | ==== Ubuntu Mate ==== | ||
- | On peut trouver [[Ubuntu Mate]] pour Raspberry Pi sur [[https:// | ||
- | <code bash> | ||
- | $ sudo aptitude install gddrescue xz-utils | ||
- | </ | ||
- | |||
- | Il faut utiliser [[unxz]] pour décompresser l' | ||
- | <code bash> | ||
- | $ unxz ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img.xz | ||
- | </ | ||
- | |||
- | L' | ||
- | <code bash> | ||
- | $ lsblk | ||
- | NAME | ||
- | sda 8:0 0 149, | ||
- | ├─sda1 | ||
- | ├─sda2 | ||
- | └─sda5 | ||
- | sdb 8:16 | ||
- | └─sdb1 | ||
- | |||
- | $ sudo ddrescue -D --force ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img /dev/sdb | ||
- | [sudo] Mot de passe de salon : | ||
- | GNU ddrescue 1.19 | ||
- | Press Ctrl-C to interrupt | ||
- | rescued: | ||
- | | ||
- | | ||
- | Finished | ||
- | </ | ||
- | |||
- | ==== HypriotOS ==== | ||
- | HypriotOS est une distribution basée sur Raspbian, optimisée pour l' | ||
- | <code bash> | ||
- | $ lsblk | ||
- | NAME | ||
- | sda 8:0 0 149, | ||
- | ├─sda1 | ||
- | └─sda5 | ||
- | sdb 8:16 | ||
- | |||
- | $ sudo ddrescue -D --force Téléchargements/ | ||
- | GNU ddrescue 1.19 | ||
- | Press Ctrl-C to interrupt | ||
- | rescued: | ||
- | | ||
- | | ||
- | Finished | ||
- | </ | ||
- | |||
- | ==== MINIBIAN ==== | ||
- | [[Minibian]] ([[https:// | ||
- | |||
- | ===== Trucs et astuces ===== | ||
- | |||
- | ==== Port série ==== | ||
- | === Repérer et récupérer des informations sur le port série === | ||
- | On débranche/ | ||
- | <code bash> | ||
- | $ dmesg | grep tty | ||
- | (...) | ||
- | [ 852.021751] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device | ||
- | [ 1009.732832] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device | ||
- | </ | ||
- | |||
- | Une autre possibilité consiste à utiliser ce script ([[http:// | ||
- | <code bash>$ nano find-uart-device.sh | ||
- | |||
- | $ cat find-uart-device.sh | ||
- | #!/bin/bash | ||
- | |||
- | for sysdevpath in $(find / | ||
- | ( | ||
- | syspath=" | ||
- | devname=" | ||
- | [[ " | ||
- | eval " | ||
- | [[ -z " | ||
- | echo "/ | ||
- | ) | ||
- | done | ||
- | |||
- | $ chmod +x find-uart-device.sh | ||
- | |||
- | $ ./ | ||
- | / | ||
- | </ | ||
- | |||
- | On peut également utiliser [[lsusb]] : | ||
- | <code bash> | ||
- | $ lsusb | ||
- | (...) | ||
- | Bus 001 Device 006: ID 26ac: | ||
- | (...) | ||
- | |||
- | $ lsusb -v | more | ||
- | (...) | ||
- | Bus 001 Device 008: ID 26ac: | ||
- | Device Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bcdUSB | ||
- | bDeviceClass | ||
- | bDeviceSubClass | ||
- | bDeviceProtocol | ||
- | bMaxPacketSize0 | ||
- | idVendor | ||
- | idProduct | ||
- | bcdDevice | ||
- | iManufacturer | ||
- | iProduct | ||
- | iSerial | ||
- | bNumConfigurations | ||
- | Configuration Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | wTotalLength | ||
- | bNumInterfaces | ||
- | bConfigurationValue | ||
- | iConfiguration | ||
- | bmAttributes | ||
- | (Bus Powered) | ||
- | MaxPower | ||
- | Interface Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bInterfaceNumber | ||
- | bAlternateSetting | ||
- | bNumEndpoints | ||
- | bInterfaceClass | ||
- | bInterfaceSubClass | ||
- | bInterfaceProtocol | ||
- | iInterface | ||
- | CDC Header: | ||
- | bcdCDC | ||
- | CDC ACM: | ||
- | bmCapabilities | ||
- | sends break | ||
- | line coding and serial state | ||
- | CDC Union: | ||
- | bMasterInterface | ||
- | bSlaveInterface | ||
- | Endpoint Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bEndpointAddress | ||
- | bmAttributes | ||
- | Transfer Type Interrupt | ||
- | Synch Type None | ||
- | Usage Type Data | ||
- | wMaxPacketSize | ||
- | bInterval | ||
- | Interface Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bInterfaceNumber | ||
- | bAlternateSetting | ||
- | bNumEndpoints | ||
- | bInterfaceClass | ||
- | bInterfaceSubClass | ||
- | bInterfaceProtocol | ||
- | iInterface | ||
- | Endpoint Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bEndpointAddress | ||
- | bmAttributes | ||
- | Transfer Type Bulk | ||
- | Synch Type None | ||
- | Usage Type Data | ||
- | wMaxPacketSize | ||
- | bInterval | ||
- | Endpoint Descriptor: | ||
- | bLength | ||
- | bDescriptorType | ||
- | bEndpointAddress | ||
- | bmAttributes | ||
- | Transfer Type Bulk | ||
- | Synch Type None | ||
- | Usage Type Data | ||
- | wMaxPacketSize | ||
- | bInterval | ||
- | Device Status: | ||
- | (Bus Powered) | ||
- | (...) | ||
- | </ | ||
- | |||
- | Un autre moyen de récupérer des informations, | ||
- | <code bash>$ udevadm info -a -n / | ||
- | (...) | ||
- | looking at device '/ | ||
- | KERNEL==" | ||
- | SUBSYSTEM==" | ||
- | DRIVER=="" | ||
- | (...) | ||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS==" | ||
- | DRIVERS==" | ||
- | ATTRS{bDeviceSubClass}==" | ||
- | ATTRS{bDeviceProtocol}==" | ||
- | ATTRS{devpath}==" | ||
- | ATTRS{idVendor}==" | ||
- | ATTRS{speed}==" | ||
- | ATTRS{bNumInterfaces}==" | ||
- | ATTRS{bConfigurationValue}==" | ||
- | ATTRS{bMaxPacketSize0}==" | ||
- | ATTRS{busnum}==" | ||
- | ATTRS{devnum}==" | ||
- | ATTRS{configuration}==" | ||
- | ATTRS{bMaxPower}==" | ||
- | ATTRS{authorized}==" | ||
- | ATTRS{bmAttributes}==" | ||
- | ATTRS{bNumConfigurations}==" | ||
- | ATTRS{maxchild}==" | ||
- | ATTRS{bcdDevice}==" | ||
- | ATTRS{avoid_reset_quirk}==" | ||
- | ATTRS{quirks}==" | ||
- | ATTRS{serial}==" | ||
- | ATTRS{version}==" | ||
- | ATTRS{urbnum}==" | ||
- | ATTRS{ltm_capable}==" | ||
- | ATTRS{manufacturer}==" | ||
- | ATTRS{removable}==" | ||
- | ATTRS{idProduct}==" | ||
- | ATTRS{bDeviceClass}==" | ||
- | ATTRS{product}==" | ||
- | |||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS==" | ||
- | DRIVERS==" | ||
- | ATTRS{bDeviceSubClass}==" | ||
- | ATTRS{bDeviceProtocol}==" | ||
- | ATTRS{devpath}==" | ||
- | ATTRS{idVendor}==" | ||
- | ATTRS{speed}==" | ||
- | ATTRS{bNumInterfaces}==" | ||
- | ATTRS{bConfigurationValue}==" | ||
- | ATTRS{bMaxPacketSize0}==" | ||
- | ATTRS{busnum}==" | ||
- | ATTRS{devnum}==" | ||
- | ATTRS{configuration}=="" | ||
- | ATTRS{bMaxPower}==" | ||
- | ATTRS{authorized}==" | ||
- | ATTRS{bmAttributes}==" | ||
- | ATTRS{bNumConfigurations}==" | ||
- | ATTRS{maxchild}==" | ||
- | ATTRS{bcdDevice}==" | ||
- | ATTRS{avoid_reset_quirk}==" | ||
- | ATTRS{quirks}==" | ||
- | ATTRS{version}==" | ||
- | ATTRS{urbnum}==" | ||
- | ATTRS{ltm_capable}==" | ||
- | ATTRS{removable}==" | ||
- | ATTRS{idProduct}==" | ||
- | ATTRS{bDeviceClass}==" | ||
- | |||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS==" | ||
- | DRIVERS==" | ||
- | ATTRS{bDeviceSubClass}==" | ||
- | ATTRS{bDeviceProtocol}==" | ||
- | ATTRS{devpath}==" | ||
- | ATTRS{idVendor}==" | ||
- | ATTRS{speed}==" | ||
- | ATTRS{bNumInterfaces}==" | ||
- | ATTRS{bConfigurationValue}==" | ||
- | ATTRS{bMaxPacketSize0}==" | ||
- | ATTRS{authorized_default}==" | ||
- | ATTRS{busnum}==" | ||
- | ATTRS{devnum}==" | ||
- | ATTRS{configuration}=="" | ||
- | ATTRS{bMaxPower}==" | ||
- | ATTRS{authorized}==" | ||
- | ATTRS{bmAttributes}==" | ||
- | ATTRS{bNumConfigurations}==" | ||
- | ATTRS{maxchild}==" | ||
- | ATTRS{interface_authorized_default}==" | ||
- | ATTRS{bcdDevice}==" | ||
- | ATTRS{avoid_reset_quirk}==" | ||
- | ATTRS{quirks}==" | ||
- | ATTRS{serial}==" | ||
- | ATTRS{version}==" | ||
- | ATTRS{urbnum}==" | ||
- | ATTRS{ltm_capable}==" | ||
- | ATTRS{manufacturer}==" | ||
- | ATTRS{removable}==" | ||
- | ATTRS{idProduct}==" | ||
- | ATTRS{bDeviceClass}==" | ||
- | ATTRS{product}==" | ||
- | |||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS==" | ||
- | DRIVERS==" | ||
- | ATTRS{hnp}==" | ||
- | ATTRS{srp}==" | ||
- | ATTRS{regvalue}==" | ||
- | ATTRS{hsic_connect}==" | ||
- | ATTRS{guid}==" | ||
- | ATTRS{mode}==" | ||
- | ATTRS{srpcapable}==" | ||
- | ATTRS{regdump}==" | ||
- | ATTRS{gpvndctl}==" | ||
- | ATTRS{ggpio}==" | ||
- | ATTRS{hprt0}==" | ||
- | ATTRS{wr_reg_test}==" | ||
- | ATTRS{driver_override}==" | ||
- | ATTRS{hcd_frrem}==" | ||
- | ATTRS{mode_ch_tim_en}==" | ||
- | ATTRS{gnptxfsiz}==" | ||
- | ATTRS{remote_wakeup}==" | ||
- | ATTRS{busconnected}==" | ||
- | ATTRS{hcddump}==" | ||
- | ATTRS{gotgctl}==" | ||
- | ATTRS{spramdump}==" | ||
- | ATTRS{grxfsiz}==" | ||
- | ATTRS{gsnpsid}==" | ||
- | ATTRS{gusbcfg}==" | ||
- | ATTRS{hptxfsiz}==" | ||
- | ATTRS{devspeed}==" | ||
- | ATTRS{fr_interval}==" | ||
- | ATTRS{rem_wakeup_pwrdn}=="" | ||
- | ATTRS{bussuspend}==" | ||
- | ATTRS{buspower}==" | ||
- | ATTRS{hnpcapable}==" | ||
- | ATTRS{rd_reg_test}==" | ||
- | ATTRS{enumspeed}==" | ||
- | ATTRS{inv_sel_hsic}==" | ||
- | ATTRS{regoffset}==" | ||
- | |||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS==" | ||
- | DRIVERS=="" | ||
- | ATTRS{driver_override}==" | ||
- | |||
- | looking at parent device '/ | ||
- | KERNELS==" | ||
- | SUBSYSTEMS=="" | ||
- | DRIVERS=="" | ||
- | |||
- | $ udevadm info -a -n / | ||
- | ATTRS{idVendor}==" | ||
- | ATTRS{idVendor}==" | ||
- | ATTRS{idVendor}==" | ||
- | |||
- | $ udevadm info -a -n / | ||
- | ATTRS{idProduct}==" | ||
- | ATTRS{idProduct}==" | ||
- | ATTRS{idProduct}==" | ||
- | |||
- | $ udevadm info -a -n / | ||
- | ATTRS{serial}==" | ||
- | ATTRS{serial}==" | ||
- | |||
- | $ udevadm info -a -n / | ||
- | ATTRS{manufacturer}==" | ||
- | ATTRS{manufacturer}==" | ||
- | |||
- | $ udevadm info -a -n / | ||
- | ATTRS{product}==" | ||
- | ATTRS{product}==" | ||
- | </ | ||
- | |||
- | Ou encore, en regardant dans les logs : | ||
- | <code bash> | ||
- | $ sudo cat / | ||
- | (...) | ||
- | Aug 16 14:10:22 raspberrypi kernel: [ 1060.450258] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 | ||
- | Aug 16 14:10:22 raspberrypi kernel: [ 1060.450296] usb 1-1.2: SerialNumber: | ||
- | </ | ||
- | |||
- | === Fixer le chemin d' | ||
- | Pour fixer le chemin d' | ||
- | <code bash> | ||
- | $ sudo nano / | ||
- | |||
- | $ sudo cat / | ||
- | SUBSYSTEM==" | ||
- | |||
- | #on recharge les règles udev | ||
- | $ sudo udevadm control --reload | ||
- | |||
- | #matériel débranché : | ||
- | $ ls -al /dev/a* | ||
- | crw------- 1 root root 10, 235 aoû 16 13:50 /dev/autofs | ||
- | |||
- | #matériel branché : | ||
- | $ $ ls -alh /dev/a* | ||
- | crw------- 1 root root 10, 235 aoû 16 14:40 /dev/autofs | ||
- | lrwxrwxrwx 1 root root 7 aoû 16 14:43 / | ||
- | </ | ||
- | ( sources : [[http:// |
raspberry_pi.1471352590.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)