google / aiyprojects-raspbian

API libraries, samples, and system images for AIY Projects (Voice Kit and Vision Kit)
https://aiyprojects.withgoogle.com/
Apache License 2.0
1.63k stars 694 forks source link

AIY Vision Kit: Could not enable camera whatsoever #618

Open tommyjtl opened 5 years ago

tommyjtl commented 5 years ago

Assembled the new AIY Vision Kit (only the hardware part), at startup it won't run the default Joy Detection demo, then I stopped the daemon service, and try the image classification demo from inside AIY-projects-python folder (~/AIY-projects-python/src/examples/vision/), then it shows:

pi@raspberrypi:~/AIY-projects-python/src/examples/vision $ ./image_classification_camera.py 
mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0xd69810 (ENOSPC)
mmal: mmal_connection_enable: output port couldn't be enabled
Traceback (most recent call last):
  File "./image_classification_camera.py", line 64, in <module>
    main()
  File "./image_classification_camera.py", line 54, in main
    with PiCamera(sensor_mode=4, framerate=30) as camera, \
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 433, in __init__
    self._init_preview()
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview
    self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
  File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in __init__
    self.renderer.inputs[0].connect(source).enable()
  File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable
    prefix="Failed to enable connection")
  File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

it doesn't works, then I ran raspistill to check if this util could work:

pi@raspberrypi:~/AIY-projects-python/src/examples/vision $ raspistill -o output.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

It did not work. Then I did some upgrade things like here https://github.com/google/aiyprojects-raspbian/issues/390:

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

After all upgrades done, the demo still won't work.

I have checked my wiring, no problem at all (at least I think so), here's what the whole thing look like:

image

image

I have try to tighten the short flex between boards, but again, not working whatsoever. Can any one help me fix this?


Update 1: The system image I used is the latest release.


Update 2: I have tried manually start the Joy Detection demo, after I ran the command sudo systemctl start joy_detection_demo (I made sure that the demo was closed before), the LED blinked multiple times in Red very quickly, then I use systemctl status to check the status, it gives me these:

● joy_detection_demo.service - AIY Joy Detection Demo
   Loaded: loaded (/home/pi/AIY-projects-python/src/examples/vision/joy/joy_detection_demo.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2019-05-10 09:40:11 UTC; 6s ago
  Process: 2767 ExecStart=/usr/bin/python3 /home/pi/AIY-projects-python/src/examples/vision/joy/joy_detection_demo.py --enable_streaming --mdns_name ${AIY_BOARD_NAME} --blink_on_error (code=exited, status
 Main PID: 2767 (code=exited, status=0/SUCCESS)

May 10 09:40:09 raspberrypi python3[2767]:     self._init_preview()
May 10 09:40:09 raspberrypi python3[2767]:   File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview
May 10 09:40:09 raspberrypi python3[2767]:     self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
May 10 09:40:09 raspberrypi python3[2767]:   File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in __init__
May 10 09:40:09 raspberrypi python3[2767]:     self.renderer.inputs[0].connect(source).enable()
May 10 09:40:09 raspberrypi python3[2767]:   File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable
May 10 09:40:09 raspberrypi python3[2767]:     prefix="Failed to enable connection")
May 10 09:40:09 raspberrypi python3[2767]:   File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check
May 10 09:40:09 raspberrypi python3[2767]:     raise PiCameraMMALError(status, prefix)
May 10 09:40:09 raspberrypi python3[2767]: picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

Update 3: Verbose output for camera version check:

pi@raspberrypi:~/AIY-projects-python/src/examples/vision $ raspistill -v

raspistill Camera App v1.3.11

Width 3280, Height 2464, quality 85, filename (null)
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

Update 4: My dmesg output:

pi@raspberrypi:~ $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.71+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1145 Fri Sep 21 15:06:38 BST 2018
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Zero W Rev 1.1
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 8 MiB at 0x17400000
[    0.000000] On node 0 totalpages: 98304
[    0.000000] free_area_init_node: node 0, pgdat c09c2630, node_mem_map d7c89c00
[    0.000000]   Normal zone: 864 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 98304 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 97440
[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:2B:85:20 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=9952ad1e-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 370284K/393216K available (6431K kernel code, 587K rwdata, 1988K rodata, 436K init, 673K bss, 14740K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd8800000 - 0xff800000   ( 624 MB)
                   lowmem  : 0xc0000000 - 0xd8000000   ( 384 MB)
                   modules : 0xbf000000 - 0xc0000000   (  16 MB)
                     .text : 0xc0008000 - 0xc064fed0   (6432 kB)
                     .init : 0xc08cd000 - 0xc093a000   ( 436 kB)
                     .data : 0xc093a000 - 0xc09ccfe0   ( 588 kB)
                      .bss : 0xc09d28f0 - 0xc0a7ae6c   ( 674 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 24110 entries in 71 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000030] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000062] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000143] bcm2835: system timer (irq = 27)
[    0.000726] Console: colour dummy device 80x30
[    0.000752] console [tty1] enabled
[    0.000788] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060291] pid_max: default: 32768 minimum: 301
[    0.060793] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060814] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.062093] Disabling memory control group subsystem
[    0.062254] CPU: Testing write buffer coherency: ok
[    0.063382] Setting up static identity map for 0x8200 - 0x8238
[    0.064598] devtmpfs: initialized
[    0.074043] random: get_random_u32 called from bucket_table_alloc+0x88/0x1c4 with crng_init=0
[    0.075030] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.075408] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.075453] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.076783] pinctrl core: initialized pinctrl subsystem
[    0.078084] NET: Registered protocol family 16
[    0.081161] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.087521] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.087538] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.087661] Serial: AMBA PL011 UART driver
[    0.090519] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    0.091260] uart-pl011 20201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.131218] bcm2835-dma 20007000.dma: DMA legacy API manager at d880d000, dmachans=0x1
[    0.133411] SCSI subsystem initialized
[    0.133632] usbcore: registered new interface driver usbfs
[    0.133727] usbcore: registered new interface driver hub
[    0.133934] usbcore: registered new device driver usb
[    0.140800] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-09-21 15:48
[    0.142894] clocksource: Switched to clocksource timer
[    0.228974] VFS: Disk quotas dquot_6.6.0
[    0.229097] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.229394] FS-Cache: Loaded
[    0.229724] CacheFiles: Loaded
[    0.246568] NET: Registered protocol family 2
[    0.247758] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.247845] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.247939] TCP: Hash tables configured (established 4096 bind 4096)
[    0.248089] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.248118] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.248472] NET: Registered protocol family 1
[    0.249203] RPC: Registered named UNIX socket transport module.
[    0.249215] RPC: Registered udp transport module.
[    0.249220] RPC: Registered tcp transport module.
[    0.249225] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.251264] hw perfevents: no irqs for PMU, sampling events not supported
[    0.251338] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    0.255078] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.267063] FS-Cache: Netfs 'nfs' registered for caching
[    0.268360] NFS: Registering the id_resolver key type
[    0.268409] Key type id_resolver registered
[    0.268417] Key type id_legacy registered
[    0.268443] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.273258] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.273687] io scheduler noop registered
[    0.273700] io scheduler deadline registered (default)
[    0.274221] io scheduler cfq registered
[    0.274235] io scheduler mq-deadline registered
[    0.274242] io scheduler kyber registered
[    0.276538] BCM2708FB: allocated DMA memory 57500000
[    0.276602] BCM2708FB: allocated DMA channel 0 @ d880d000
[    0.284676] Console: switching to colour frame buffer device 82x26
[    0.292430] bcm2835-rng 20104000.rng: hwrng registered
[    0.292656] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    0.293806] vc-sm: Videocore shared memory driver
[    0.294409] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[    0.312739] brd: module loaded
[    0.324659] loop: module loaded
[    0.324681] Loading iSCSI transport class v2.0-870.
[    0.325514] usbcore: registered new interface driver smsc95xx
[    0.325544] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.325713] dwc_otg: FIQ enabled
[    0.325721] dwc_otg: NAK holdoff enabled
[    0.325726] dwc_otg: FIQ split-transaction FSM enabled
[    0.325740] Module dwc_common_port init
[    0.326164] usbcore: registered new interface driver usb-storage
[    0.326569] mousedev: PS/2 mouse device common for all mice
[    0.326629] IR NEC protocol handler initialized
[    0.326636] IR RC5(x/sz) protocol handler initialized
[    0.326643] IR RC6 protocol handler initialized
[    0.326648] IR JVC protocol handler initialized
[    0.326653] IR Sony protocol handler initialized
[    0.326658] IR SANYO protocol handler initialized
[    0.326663] IR Sharp protocol handler initialized
[    0.326668] IR MCE Keyboard/mouse protocol handler initialized
[    0.326673] IR XMP protocol handler initialized
[    0.327932] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer
[    0.328448] bcm2835-cpufreq: min=700000 max=1000000
[    0.329078] sdhci: Secure Digital Host Controller Interface driver
[    0.329088] sdhci: Copyright(c) Pierre Ossman
[    0.329683] mmc-bcm2835 20300000.mmc: could not get clk, deferring probe
[    0.330284] sdhost-bcm2835 20202000.mmc: could not get clk, deferring probe
[    0.330470] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.330991] ledtrig-cpu: registered to indicate activity on CPUs
[    0.331140] hidraw: raw HID events driver (C) Jiri Kosina
[    0.331375] usbcore: registered new interface driver usbhid
[    0.331384] usbhid: USB HID core driver
[    0.332303] vchiq: vchiq_init_state: slot_zero = d7580000, is_master = 0
[    0.334344] [vc_sm_connected_init]: start
[    0.343880] [vc_sm_connected_init]: end - returning 0
[    0.344825] Initializing XFRM netlink socket
[    0.344888] NET: Registered protocol family 17
[    0.345053] Key type dns_resolver registered
[    0.346842] registered taskstats version 1
[    0.355244] uart-pl011 20201000.serial: cts_event_workaround enabled
[    0.355390] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    0.358274] mmc-bcm2835 20300000.mmc: mmc_debug:0 mmc_debug2:0
[    0.358293] mmc-bcm2835 20300000.mmc: DMA channel allocated
[    0.416432] sdhost: log_buf @ d7510000 (57510000)
[    0.451724] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    0.453445] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    0.455089] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    0.458026] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    0.492954] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    0.494207] of_cfs_init
[    0.494339] of_cfs_init: OK
[    0.495351] Waiting for root device PARTUUID=9952ad1e-02...
[    0.516517] random: fast init done
[    0.559623] NOHZ: local_softirq_pending 40
[    0.561577] NOHZ: local_softirq_pending 40
[    0.561688] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.564131] mmc0: new high speed SDXC card at address 0007
[    0.565026] mmcblk0: mmc0:0007 SD64G 57.9 GiB (quirks 0x80000000)
[    0.567054] NOHZ: local_softirq_pending 40
[    0.567351]  mmcblk0: p1 p2
[    0.589937] mmc1: new high speed SDIO card at address 0001
[    0.595887] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    0.595997] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    0.597067] devtmpfs: mounted
[    0.599501] Freeing unused kernel memory: 436K
[    0.599510] This architecture does not have kernel memory protection.
[    1.065148] systemd[1]: System time before build time, advancing clock.
[    1.112975] NOHZ: local_softirq_pending 40
[    1.222241] NET: Registered protocol family 10
[    1.224150] Segment Routing with IPv6
[    1.246568] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.272018] random: systemd: uninitialized urandom read (16 bytes read)
[    1.280713] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    1.281770] systemd[1]: Detected architecture arm.
[    1.284430] systemd[1]: Set hostname to <raspberrypi>.
[    1.296175] systemd[1]: Initializing machine ID from D-Bus machine ID.
[    1.296584] systemd[1]: Installed transient /etc/machine-id file.
[    1.373864] random: systemd: uninitialized urandom read (16 bytes read)
[    1.602505] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read)
[    2.439503] systemd[1]: Listening on udev Control Socket.
[    2.440829] systemd[1]: Reached target Swap.
[    2.441534] systemd[1]: Listening on udev Kernel Socket.
[    2.442595] systemd[1]: Listening on Journal Socket.
[    2.444636] systemd[1]: Created slice User and Session Slice.
[    3.150988] i2c /dev entries driver
[    3.176651] pwm_soft: loading out-of-tree module taints kernel.
[    3.177612] SoftPWM v0.1 initializing.
[    3.177625] Clock resolution is 1ns
[    3.177705] SoftPWM initialized.
[    4.801007] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    5.351408] systemd-journald[85]: Received request to flush runtime journal from PID 1
[    8.513831] dwc2 20980000.usb: 20980000.usb supply vusb_d not found, using dummy regulator
[    8.513970] dwc2 20980000.usb: 20980000.usb supply vusb_a not found, using dummy regulator
[    8.873340] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[    8.893399] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
[    8.893798] usbcore: registered new interface driver brcmfmac
[    8.973855] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    9.005247] dwc2 20980000.usb: DWC OTG Controller
[    9.005705] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    9.006203] dwc2 20980000.usb: irq 33, io mem 0x20980000
[    9.021665] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    9.021691] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.021786] usb usb1: Product: DWC OTG Controller
[    9.021800] usb usb1: Manufacturer: Linux 4.14.71+ dwc2_hsotg
[    9.021811] usb usb1: SerialNumber: 20980000.usb
[    9.064318] hub 1-0:1.0: USB hub found
[    9.096220] hub 1-0:1.0: 1 port detected
[    9.309638] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[    9.310790] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 7.11.15 Compiler: 1.24.2 ClmImport: 1.24.1 Creation: 2014-05-26 10:53:55 Inc Data: 9.10.39 Inc Compiler: 1.29.4 Inc ClmImport: 1.36.3 Creation: 2017-10-23 03:47:14 
[   15.019813] using random self ethernet address
[   15.019835] using random host ethernet address
[   15.683225] usb0: HOST MAC a6:d7:ec:6d:09:e8
[   15.693824] usb0: MAC c2:54:12:23:f1:05
[   15.694107] dwc2 20980000.usb: bound driver configfs-gadget
[   16.070870] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   16.315269] uart-pl011 20201000.serial: no DMA platform data
[   18.644736] EXT4-fs (mmcblk0p2): resizing filesystem from 1125376 to 15175680 blocks
[   20.773584] aiy-vision spi0.0: Initializing
[   20.813511] aiy-vision spi0.0: Failed to bind reset GPIO
[   21.153042] random: crng init done
[   21.153062] random: 7 urandom warning(s) missed due to ratelimiting
[   21.720659] ktd202x 1-0030: Driver loaded for a ktd2026.
[   21.720957] aiy-vision spi0.0: Initializing
[   21.721478] aiy-io-i2c 1-0051: Setting board type vision
[   21.722085] aiy-io-i2c 1-0051: Driver loaded
[   21.760642] aiy-vision spi0.0: Failed to bind reset GPIO
[   21.761295] aiy-vision spi0.0: Initializing
[   21.765462] aiy-vision spi0.0: Failed to bind reset GPIO
[   22.010042] Bluetooth: Core ver 2.22
[   22.010147] NET: Registered protocol family 31
[   22.010155] Bluetooth: HCI device and connection manager initialized
[   22.010180] Bluetooth: HCI socket layer initialized
[   22.010192] Bluetooth: L2CAP socket layer initialized
[   22.010232] Bluetooth: SCO socket layer initialized
[   22.130524] Bluetooth: HCI UART driver ver 2.3
[   22.130541] Bluetooth: HCI UART protocol H4 registered
[   22.130546] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   22.147418] Bluetooth: HCI UART protocol Broadcom registered
[   22.779252] pwm-aiy-io pwm-aiy-io: Driver loaded
[   22.779542] aiy-vision spi0.0: Initializing
[   22.796557] aiy-vision spi0.0: Failed to bind reset GPIO
[   23.213705] gpio-aiy-io gpio-aiy-io: Driver loaded
[   23.213976] aiy-vision spi0.0: Initializing
[   23.220549] aiy-vision spi0.0: Resetting myriad on probe
[   23.381372] aiy-adc aiy-adc: Vision bonnet ADC configuration.
[   23.403611] aiy-adc aiy-adc: Driver loaded
[   24.071461] aiy-vision spi0.0: Resetting myriad
[   24.654968] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   26.163017] aiy-vision spi0.0: Writing myriad firmware
[   27.450672] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   27.450706] Bluetooth: BNEP filters: protocol multicast
[   27.450749] Bluetooth: BNEP socket layer initialized
[   27.775614] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   27.775652] brcmfmac: power management disabled
[   28.250083] Bluetooth: RFCOMM TTY layer initialized
[   28.250160] Bluetooth: RFCOMM socket layer initialized
[   28.250213] Bluetooth: RFCOMM ver 1.11
[   30.128556] EXT4-fs (mmcblk0p2): resized to 3145728 blocks
[   30.834990] aiy-vision spi0.0: Myriad booting
[   31.017285] aiy-vision spi0.0: Myriad ready
[   40.758823] EXT4-fs (mmcblk0p2): resized to 5242880 blocks
[   49.531451] systemd[1]: apt-daily.timer: Adding 5h 49min 36.296460s random time.
[   49.575070] systemd[1]: apt-daily-upgrade.timer: Adding 48min 51.593804s random time.
[   51.426668] EXT4-fs (mmcblk0p2): resized to 7340032 blocks
[   56.273871] systemd[1]: apt-daily.timer: Adding 4h 21min 53.974946s random time.
[   56.275052] systemd[1]: apt-daily-upgrade.timer: Adding 30min 12.538395s random time.
[   61.817660] EXT4-fs (mmcblk0p2): resized to 9437184 blocks
[   72.374862] EXT4-fs (mmcblk0p2): resized to 11534336 blocks
[   83.003367] EXT4-fs (mmcblk0p2): resized to 13631488 blocks
[   90.648481] EXT4-fs (mmcblk0p2): resized filesystem to 15175680
[   95.311048] systemd[1]: apt-daily.timer: Adding 6h 45min 43.969645s random time.
[   95.312212] systemd[1]: apt-daily-upgrade.timer: Adding 45min 15.354406s random time.
[  100.173074] fuse init (API version 7.26)
[  147.445548] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  229.961081] NOHZ: local_softirq_pending 02
MrSolrac commented 5 years ago

Have you re-flashed you image? I had an issue with mine that it would not work once I did an update to the stock image . Similar to this issue https://github.com/google/aiyprojects-raspbian/issues/505?

MrSolrac commented 5 years ago

Also, may look at https://github.com/google/aiyprojects-raspbian/issues/527

simonfrfr commented 5 years ago

I purchased two and one works but the other does not... I just swapped the SD card from one into the other, and I get the same error on one system. I think it might be a hardware issue with your device, I'll let you know if I find anything.

manoj7410 commented 4 years ago

@tommyjtl Can you try to reflash the kit with https://github.com/google/aiyprojects-raspbian/releases/tag/v20191113 ? If the issue still persists, try to connect the camera directly to your PI and run "raspistill -o test.jpg" and share the output.

ricardodeazambuja commented 4 years ago

I'm also having problems with the camera (original, V2.1) when it's connected through the AIY vision hat. When I connect it directly to the RPI Zero W, I'm able to run "raspistill -o test.jpg". The same command when connected to the AIY hat gives this msg: Camera control callback cmd=0x4f525245mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board

BTW, I just flashed the sdcard using the "aiyprojects-2019-11-13.img" after I got this problem. The funny thing is that I was using the camera connected to the AIY hat, around two months ago, without problems. What is the image doing during the first boot? I can see it's expanding the filesystem, is it also updating something?

P.S.: I also tested the AIY hat with an image that was already saved in the sdcard and it printed me the classification results, so I suppose the AIY hat works and the only problem is related to the camera.

P.S. 2: $ raspistill -v

"raspistill" Camera App (commit )

Camera Name imx219
Width 3280, Height 2464, filename (null)
Using camera 0, sensor mode 0

GPS output Disabled

Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Closing down
Close down completed, all components disconnected, disabled and destroyed

This is different from what @tommyjtl got.

P.S. 3:

$ /opt/vc/bin/vcgencmd version

Sep 24 2019 17:39:25 
Copyright (c) 2012 Broadcom
version 6820edeee4ef3891b95fc01cf02a7abd7ca52f17 (clean) (release) (start_x)

P.S. 4: If I disconnect the camera from the AIY hat, raspistill -v gives a different msg:

mmal: Cannot read camera info, keeping the defaults for OV5647

"raspistill" Camera App (commit )

Camera Name OV5647
Width 2592, Height 1944, filename (null)
Using camera 0, sensor mode 0

GPS output Disabled

Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly

P.S. 5: With the camera connected, vcgencmd get_camera outputs supported=1 detected=1.

ricardodeazambuja commented 4 years ago

Ok, following my tests, I flashed, again, the image recommended by @manoj7410 and this time I run sudo apt upgrade, you know, just in case the problem was solved in the latest version. After that, raspistill behaviour changed! $ raspistill -v

"raspistill" Camera App (commit a14ee020d361 Tainted)

Camera Name imx219
Width 3280, Height 2464, filename (null)
Using camera 0, sensor mode 0

GPS output Disabled

Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

And, apparently, the firmware changed too: $ /opt/vc/bin/vcgencmd version

Jan 10 2020 17:02:31 
Copyright (c) 2012 Broadcom
version f3e39fed4763ce4efbffabb2d4787aaacddeda0f (clean) (release) (start_x)

However, I'm still capable to use the AIY hat, e.g. image_classification.py, on a previously saved image.

P.S.: $ raspistill -o test.jpg

Camera control callback  cmd=0x4f525245mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board
tuttelikz commented 4 years ago

raspivid -t 10000 was not working initially. But once I did recommended: sudo apt-get update sudo apt-get upgrade # took long time sudo rpi-update my camera started to display stream from raspivid

ricardodeazambuja commented 4 years ago

@tuttelikz Would you mind telling me if your camera was connected to the AIY Vision Bonnet or directly to the RPI Zero W?

tuttelikz commented 4 years ago

@tuttelikz Would you mind telling me if your camera was connected to the AIY Vision Bonnet or directly to the RPI Zero W?

@ricardodeazambuja Through Bonnet, omg, forgot to mention that.

ricardodeazambuja commented 4 years ago

@tuttelikz Thanks for your answer! Now, a probably silly question: is everything working on the AIY Vision Bonnet after the upgrade and which raspbian version are you using?

And would you mind posting here the output of $ /opt/vc/bin/vcgencmd version?

tuttelikz commented 4 years ago

What the irony, @ricardodeazambuja. I tried to raspivid right after you asked, now it gives exactly same error as yours: Camera control callback cmd=0x4f525245mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board

As for question asked: Yes, it WAS working on RPI Zero W, aiyprojects-raspbian, AIY Kits Release 2019-11-13, connecting Raspberry Camera Module v2 via AIY Vision Bonnet. Here is the response to /opt/vc/bin/vcgencmd version:

Jun 19 2020 15:45:52
Copyright (c) 2012 Broadcom
version 31eda665dcc45e61650a2ef018ef2cf94091c46f (clean) (release) (start_x)

Hope we find a clue how solve it.

ricardodeazambuja commented 4 years ago

@tuttelikz, my solution was to connect the camera directly to the RPI Zero W. Everything works fine that way, but I would like to verify if it's much slower compared to the direct connection to the AIY Vision Bonnet. So far I think the speed is the same or almost the same.

tuttelikz commented 4 years ago

@ricardodeazambuja connected directly, thanks, it worked. speed is same for me as well.

shoulih commented 2 years ago

with the same Vision Kit long flex cable?