Archives mensuelles : mars 2018

image_pdfimage_print

Caméra jevois + raspberry pi 0 W

wget http://jevois.org/data/jevois-image-latest-8G.zip
unzip jevois-image-latest-8G.zip
sudo dd if=jevois-image-1.0-8G.img of=/dev/sdX bs=1M # exact .img file name may vary
sync

ne fonctionne pas : pas de partitions

installer etcher :

https://github.com/resin-io/etcher#redhat-rhel-and-fedora-based-package-repository-gnulinux-x86x64

wget https://bintray.com/resin-io/redhat/rpm -O /etc/yum.repos.d/bintray-resin-io-redhat.repo
760 dnf install -y etcher-electron
761 etcher-electron

[155313.184801] usb 1-1: New USB device found, idVendor=1d6b, idProduct=0102
[155313.184808] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[155313.184813] usb 1-1: Product: JeVois-A33 Smart Camera
[155313.184817] usb 1-1: Manufacturer: JeVois Inc
[155313.186345] uvcvideo: Found UVC 1.00 device JeVois-A33 Smart Camera (1d6b:0102)
[155313.187136] uvcvideo 1-1:1.0: Entity type for entity Processing 2 was not initialized!
[155313.187145] uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
[155313.187497] input: JeVois-A33 Smart Camera: JeVois as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/input/input32
[155313.191735] usb-storage 1-1:1.4: USB Mass Storage device detected
[155313.192743] scsi host3: usb-storage 1-1:1.4
[155313.275458] cdc_acm 1-1:1.2: ttyACM0: USB ACM device
[155313.276457] usbcore: registered new interface driver cdc_acm
[155313.276459] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[155314.216786] scsi 3:0:0:0: Direct-Access JeVois Smart Camera 0333 PQ: 0 ANSI: 2
[155314.217857] sd 3:0:0:0: Attached scsi generic sg1 type 0
[155314.218154] sd 3:0:0:0: Power-on or device reset occurred
[155314.221489] sd 3:0:0:0: [sdb] Attached SCSI removable disk

https://fablab.coagul.org/Installer_MJPG-Streamer_sur_Raspberry_Pi

sudo apt-get install subversion libjpeg8-dev imagemagick libv4l-dev
svn checkout http://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/
sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h

cd mjpg-streamer
make
make install

Créer le fichier /etc/init.d/mjpg_streamer avec le contenu suivant, et le rendre exécutable.

#!/bin/sh
# /etc/init.d/mjpg_streamer
# v0.21 phillips321.co.uk and pila
### BEGIN INIT INFO
# Provides:          mjpg_streamer.sh
# Required-Start:    $network $local_fs
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mjpg_streamer for webcam
# Description:       Streams /dev/video0 to http://IP/?action=stream
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin 

INPUT="/usr/local/lib/input_uvc.so -d /dev/video0 -r 640x480 -f 20"
OUTPUT="/usr/local/lib/output_http.so -p 8080 -w /usr/local/www"
f_message(){
        echo "[+] $1"
}

# Carry out specific functions when asked to by the system
case "$1" in
        start)
                f_message "Starting mjpg_streamer"
                mjpg_streamer -b -i "$INPUT" -o "$OUTPUT"
                sleep 2
                f_message "mjpg_streamer started"
                ;;
        stop)
                f_message "Stopping mjpg_streamer..."
                killall mjpg_streamer
                f_message "mjpg_streamer stopped"
                ;;
        restart)
                f_message "Restarting daemon: mjpg_streamer"
                killall mjpg_streamer
                mjpg_streamer -b -i "$INPUT" -o "$OUTPUT"
                sleep 2
                f_message "Restarted daemon: mjpg_streamer"
                ;;
        *)
                f_message "Usage: $0 {start|stop|restart}"
                exit 1
                ;;
esac
exit 0

Il reste alors à l’ajouter aux scripts de démarrage :

 sudo chmod +x /etc/init.d/mjpg_streamer
 sudo update-rc.d mjpg_streamer defaults

Raspberry pi 0 W + caméra jevois + chargeur portable tel