Skip to content

regression testing

Frank Bauernöppel edited this page Oct 12, 2018 · 40 revisions

Preparing the microSD card

image creation

rpi-test-image Yocto Project branch: rocko

cd /home/bauer/raspi/rocko
mkdir recipes
cd recipes
git clone -b rocko git://git.openembedded.org/meta-openembedded
git clone -b rocko git://git.yoctoproject.org/poky
git clone -b rocko https://github.com/frankbau/meta-raspberrypi.git
git clone -b rocko git://github.com/meta-qt5/meta-qt5.git 
cd ..
TEMPLATECONF=../recipes/meta-raspberrypi/conf source recipes/poky/oe-init-build-env rpi-build
# edit conf/bblayers.conf
# edit conf/local.conf
bitbake -k rpi-basic-image
# bitbake -k rpi-avg-image

You might want to change the download folder (DL_DIR) in local.conf according to your local host.

Build Configuration

(November 2017)

BB_VERSION        = "1.36.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "raspberrypi3"
DISTRO            = "poky"
DISTRO_VERSION    = "2.4"
TUNE_FEATURES     = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU        = "hard"
meta              
meta-poky         
meta-yocto-bsp    = "rocko:f7b90ab3eaf832bd81f3efc1dab4dcf6863ac284"
meta-oe           
meta-multimedia   
meta-networking   
meta-webserver    
meta-python       = "rocko:6e3fc5b8d904d06e3aa77e9ec9968ab37a798188"
meta-qt5          = "rocko:d87335a50a9dd35d890786edbd79b8953fdaa11a"
meta-raspberrypi  = "rocko:45b176a2c40215598ffc492bb82cb53366877af5"

copy image to microSD

sudo dd if='/home/bauer/raspi/rocko/rpi-build/tmp/deploy/images/raspberrypi3/rpi-av-image-raspberrypi3.rpi-sdimg' of=/dev/mmcblk0 bs=4M conv=fsync iflag=fullblock oflag=direct status=progress

modify image on microSD

  1. add an empty file named shh to root folder of boot partition to enable ssh login.
  2. optional: change HDMI settings in config.txt

Boot & login

boot preparation

  1. do not attach any USB device (USB keyboard/mouse may be used later)
  2. optionally: connect network cable to router or build host
  3. optionally: connect HDMI monitor
  4. optionally: connect serial port UART with USB adapter cable to build host and run minicom -D /dev/ttyUSB0 -c on -a on -t linux on the build host.

boot sequence

  1. while Raspi powered off: insert microSD card
  2. attach power supply: red LED goes on, Raspi will boot
  3. if HDMI Monitor connected: shows rainbow square, 4 raspberries, Yocto splash screen and finally a login prompt (fbcon - framebuffer console).
  4. if USB keyboard connected: after boot, you can login. Note: by default, HDMI switches of after an idle period
  5. if serial port cable connected: watch boot log on the build host with minicom. Finally, a login prompt will appear.
  6. if network cable is attached, you may login from build host via ssh root@raspberrypi3.local (tested in a LAN with DHCP server, worked also from Ubuntu 16.04 laptop with avahi).

Note: Do not power-off Raspi without halting it first: Login and execute the halt command. Wait 5+ seconds for the green LED to calm down before unplugging power.

Boot log via serial console with attached serial cable, HDMI monitor, network and USB keyboard

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.50 (oe-user@oe-host) (gcc version 7.2.0 (GCC) ) #1 SMP Mon Nov 6 23:12:07 CET 2017
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] cma: Reserved 8 MiB at 0x37800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @b6fd0000 s25548 r8192 d23604 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227360
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 887576K/917504K available (7168K kernel code, 484K rwdata, 2028K rodata, 1024K init, 778K bss, 21736K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xb8800000 - 0xff800000   (1136 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xb8000000   ( 896 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80800000   (8160 kB)
[    0.000000]       .init : 0x80b00000 - 0x80c00000   (1024 kB)
[    0.000000]       .data : 0x80c00000 - 0x80c7902c   ( 485 kB)
[    0.000000]        .bss : 0x80c7b000 - 0x80d3d8d4   ( 779 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000006] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000021] Switching to timer-based delay loop, resolution 52ns
[    0.000306] Console: colour dummy device 80x30
[    0.000338] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpjnetwork cable=192000)
[    0.000356] pid_max: default: 32768 minimum: 301
[    0.000664] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000677] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001532] Disabling cpuset control group subsystem
[    0.001666] CPU: Testing write buffer coherency: ok
[    0.001704] ftrace: allocating 22341 entries in 66 pages
[    0.049804] CPU0: update cpu_capacity 1024
[    0.049830] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.049869] Setting up static identity map for 0x100000 - 0x100034
[    0.051657] CPU1: update cpu_capacity 1024
[    0.051664] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.052287] CPU2: update cpu_capacity 1024
[    0.052294] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.052903] CPU3: update cpu_capacity 1024
[    0.052909] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.052996] Brought up 4 CPUs
[    0.053031] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.053039] CPU: All CPU(s) started in HYP mode.
[    0.053046] CPU: Virtualization extensions available.
[    0.053822] devtmpfs: initialized
[    0.064450] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.064711] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.064733] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.065284] pinctrl core: initialized pinctrl subsystem
[    0.066172] NET: Registered protocol family 16
[    0.068217] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.076753] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.076764] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.076900] Serial: AMBA PL011 UART driver
[    0.078715] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.079224] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.079771] irq: no irq domain found for /soc/aux@0x7e215000 !
[    0.150613] bcm2835-dma 3f007000.dma: DMA legacy API manager at b880f000, dmachans=0x1
[    0.152403] SCSI subsystem initialized
[    0.152569] usbcore: registered new interface driver usbfs
[    0.152649] usbcore: registered new interface driver hub
[    0.152741] usbcore: registered new device driver usb
[    0.159612] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-08-08 12:05
[    0.160857] clocksource: Switched to clocksource arch_sys_counter
[    0.210474] VFS: Disk quotas dquot_6.6.0
[    0.210556] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.210757] FS-Cache: Loaded
[    0.211051] CacheFiles: Loaded
[    0.222921] NET: Registered protocol family 2
[    0.223782] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.223895] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.224083] TCP: Hash tables configured (established 8192 bind 8192)
[    0.224173] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.224218] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.224423] NET: Registered protocol family 1
[    0.224814] RPC: Registered named UNIX socket transport module.
[    0.224824] RPC: Registered udp transport module.
[    0.224832] RPC: Registered tcp transport module.
[    0.224840] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.225677] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.227910] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.243519] FS-Cache: Netfs 'nfs' registered for caching
[    0.244476] NFS: Registering the id_resolver key type
[    0.244504] Key type id_resolver registered
[    0.244513] Key type id_legacy registered
[    0.246807] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.246914] io scheduler noop registered
[    0.246924] io scheduler deadline registered
[    0.247178] io scheduler cfq registered (default)
[    0.253453] BCM2708FB: allocated DMA memory f7910000
[    0.253482] BCM2708FB: allocated DMA channel 0 @ b880f000
[    0.298412] Console: switching to colour frame buffer device 228x61
[    0.398290] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.399037] bcm2835-aux-uart 3f215040.serial: could not get clk: -517
[    0.400156] bcm2835-rng 3f104000.rng: hwrng registered
[    0.400277] vc-cma: Videocore CMA driver
[    0.400288] vc-cma: vc_cma_base      = 0x00000000
[    0.400297] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    0.400306] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    0.400508] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.401080] vc-sm: Videocore shared memory driver
[    0.415818] brd: module loaded
[    0.424793] loop: module loaded
[    0.424812] Loading iSCSI transport class v2.0-870.
[    0.425341] usbcore: registered new interface driver smsc95xx
[    0.425362] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.653457] Core Release: 2.80a
[    0.653471] Setting default values for core params
[    0.653500] Finished setting default values for core params
[    0.853871] Using Buffer DMA mode
[    0.853881] Periodic Transfer Interrupt Enhancement - disabled
[    0.853889] Multiprocessor Interrupt Enhancement - disabled
[    0.853898] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.853914] Dedicated Tx FIFOs mode
[    0.854260] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xb7904000 dma = 0xf7904000 len=9024
[    0.854292] FIQ FSM acceleration enabled for :
[    0.854292] Non-periodic Split Transactions
[    0.854292] Periodic Split Transactions
[    0.854292] High-Speed Isochronous Endpoints
[    0.854292] Interrupt/Control Split Transaction hack enabled
[    0.854365] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x80593e40
[    0.854379] WARN::hcd_init_fiq:460: FIQ ASM at 0x805941a4 length 36
[    0.854393] WARN::hcd_init_fiq:486: MPHI regs_base at 0xb887a000
[    0.854458] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.854495] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.854531] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    0.854581] Init: Port Power? op_state=1
[    0.854588] Init: Power Port (0)
[    0.854795] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.854808] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.854820] usb usb1: Product: DWC OTG Controller
[    0.854831] usb usb1: Manufacturer: Linux 4.9.50 dwc_otg_hcd
[    0.854842] usb usb1: SerialNumber: 3f980000.usb
[    0.855557] hub 1-0:1.0: USB hub found
[    0.855598] hub 1-0:1.0: 1 port detected
[    0.856450] usbcore: registered new interface driver usb-storage
[    0.856654] mousedev: PS/2 mouse device common for all mice
[    0.857611] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    0.857898] bcm2835-cpufreq: min=600000 max=1200000
[    0.858309] sdhci: Secure Digital Host Controller Interface driver
[    0.858317] sdhci: Copyright(c) Pierre Ossman
[    0.858612] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[    0.860798] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    0.860952] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.863596] ledtrig-cpu: registered to indicate activity on CPUs
[    0.863794] hidraw: raw HID events driver (C) Jiri Kosina
[    0.864004] usbcore: registered new interface driver usbhid
[    0.864012] usbhid: USB HID core driver
[    0.864820] vchiq: vchiq_init_state: slot_zero = 0xb7980000, is_master = 0
[    0.866503] [vc_sm_connected_init]: start
[    0.875845] [vc_sm_connected_init]: end - returning 0
[    0.876225] Initializing XFRM netlink socket
[    0.876253] NET: Registered protocol family 17
[    0.876370] Key type dns_resolver registered
[    0.876662] Registering SWP/SWPB emulation handler
[    0.877395] registered taskstats version 1
[    0.883732] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.885743] console [ttyS0] disabled
[    0.885778] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 220, base_baud = 31250000) is a 16550
[    1.870633] console [ttyS0] enabled
[    1.875021] sdhost: log_buf @ b7907000 (f7907000)
[    1.950880] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.953105] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    1.953111] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    1.981669] Indeed it is in host mode hprt0 = 00021501
[    2.070987] of_cfs_init
[    2.073551] of_cfs_init: OK
[    2.074034] random: fast init done
[    2.080997] Waiting for root device /dev/mmcblk0p2...
[    2.087878] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.095023] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.102137] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.110485] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.152709] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.167619] mmc0: new high speed SDHC card at address aaaa
[    2.174041] mmcblk0: mmc0:aaaa SS16G 14.8 GiB
[    2.180899] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.187555]  mmcblk0: p1 p2
[    2.190440] Indeed it is in host mode hprt0 = 00001101
[    2.301976] mmc1: new high speed SDIO card at address 0001
[    2.334841] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.343132] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.360456] devtmpfs: mounted
[    2.365371] Freeing unused kernel memory: 1024K
[    2.421198] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    2.428015] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.436153] hub 1-1:1.0: USB hub found
[    2.440045] hub 1-1:1.0: 5 ports detected
INIT: version 2.88 booting
[    2.760958] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.891386] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    2.898378] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.909524] smsc95xx v1.0.5
Starting udev
[    3.004371] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:3c:3c:1b
[    3.110411] udevd[134]: starting version 3.2.2
[    3.110948] usb 1-1.4: new low-speed USB device number 4 using dwc_otg
[    3.197132] udevd[135]: starting eudev-3.2.2
[    3.292425] usb 1-1.4: New USB device found, idVendor=046a, idProduct=0180
[    3.299438] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.306930] usb 1-1.4: Product: wired keyboard
[    3.311474] usb 1-1.4: Manufacturer:  
[    3.353519] input:   wired keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:046A:0180.0001/input/input0
[    3.359297] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    3.442151] hid-generic 0003:046A:0180.0001: input,hidraw0: USB HID v1.11 Keyboard [  wired keyboard] on usb-3f980000.usb-1.4/input0
[    3.489468] input:   wired keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.1/0003:046A:0180.0002/input/input1
[    3.565675] usbcore: registered new interface driver brcmfmac
[    3.571756] hid-generic 0003:046A:0180.0002: input,hidraw1: USB HID v1.11 Device [  wired keyboard] on usb-3f980000.usb-1.4/input1
[    3.782576] brcmfmac: Firmware version = wl0: Aug  7 2017 00:46:29 version 7.45.41.46 (r666254 CY) FWID 01-f8a78378
[    3.877768] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Tue Nov  7 01:14:38 UTC 2017
INIT: Entering runlevel: 5
Configuring network interfaces... [    4.873018] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
done.
Starting system message bus: dbus.
Starting Connection Manager
Starting Dropbear SSH server: [    5.394259] NET: Registered protocol family 10
[    5.400015] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
dropbear.
Starting atd: OK
Starting bluetooth: bluetoothd.
[    5.619013] Bluetooth: Core ver 2.22
[    5.622823] NET: Registered protocol family 31
[    5.627334] Bluetooth: HCI device and connection manager initialized
[    5.633875] Bluetooth: HCI socket layer initialized
[    5.638840] Bluetooth: L2CAP socket layer initialized
[    5.644053] Bluetooth: SCO socket layer initialized
[    5.711427] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.716843] Bluetooth: BNEP filters: protocol multicast
[    5.722196] Bluetooth: BNEP socket layer initialized
[    6.436148] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    6.443824] smsc95xx 1-1.1:1.0 eth0: link up, 10Mbps, full-duplex, lpa 0x4061
[    6.472672] 8021q: 802.1Q VLAN Support v1.8
[    6.532897] smsc95xx 1-1.1:1.0 eth0: link down
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
[ ok ]
Starting Telephony daemon
No makedumpfile found.
Starting crond: OK

Poky (Yocto Project Reference Distro) 2.4 raspberrypi3 /dev/ttyS0

raspberrypi3 login: 

[    7.502498] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.356279] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.363942] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   36.830250] random: crng init done

Testing framebuffer

/dev/fb0 access

fill framebuffer with random noise, watch it on HDMI monitor and clear it again.

root@raspberrypi3:~# cp /dev/urandom /dev/fb0
cp: error writing '/dev/fb0': No space left on device
root@raspberrypi3:~# cp /dev/zero /dev/fb0
cp: error writing '/dev/fb0': No space left on device

fbset

root@raspberrypi3:~# fbset 

mode "1920x1080-0"
	# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
	geometry 1920 1080 1920 1080 32
	timings 0 0 0 0 0 0 0
	accel false
	rgba 8/16,8/8,8/0,8/24
endmode

Note: full 1920x1080 resolution requires changes of HDMI settings.

play a video: omxplayer

root@raspberrypi3:~# omxplayer --with-info /usr/share/movies/sintel_trailer-1080p.mp4
...
Video codec omx-h264 width 1920 height 1080 profile 100 fps 24.000000
Audio codec aac channels 2 samplerate 48000 bitspersample 16
...

Video plays fine on HDMI monitor. Audio plays fine at analog audio output.

Testing gstreamer video playback with OpenGL

root@raspberrypi3:~# gst-launch-1.0 filesrc location=sintel_trailer-720p.mp4 ! qtdemux ! h264parse ! omxh264dec ! glupload ! glfiltercube ! glimagesink

Note: The movie plays with some stutter. Playing 1080p is broken.

Testing Raspi CSI Camera Module

Caution: Shutdown Raspi and unplug power before connecting the camera module.

The CSI camera module (v2) must be attached to the CSI-2 connector.

using raspivid

Record few seconds of video with fullscreen preview on HDMI monitor:

root@raspberrypi3:~# raspivid -t 5000 -f -b 1000000 -g 30 -ih -pf baseline -w 640 -h 480 -fps 30 -l -v -o test.h264

raspivid Camera App v1.3.12

Width 640, Height 480, filename test.h264
bitrate 1000000, framerate 30, time delay 10000
H264 Profile baseline
H264 Level 4
H264 Quantisation level 0, Inline headers Yes
H264 Intra refresh type (null), period 30
Wait method : Simple capture
Initial state 'record'


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 preview input port
Starting video preview
Connecting camera video port to encoder input port
Opening output file "test.h264"
Enabling encoder output port
Starting video capture
Finished capture
Closing down
Close down completed, all components disconnected, disabled and destroyed

The recorded file should have a reasonable size and be of the correct file type:

root@raspberrypi3:~# ls -l test.h264                                                                                                                          
-rw-r--r-- 1 root root 583385 Nov  7 02:13 test.h264
root@raspberrypi3:~# file test.h264                                                                                                                           
test.h264: JVT NAL sequence, H.264 video, baseline @ L 40 

It can be played by omxplayer, but at highest speed. The --fps is ignored (seems to be a known issue):

root@raspberrypi3:~# omxplayer -I --fps=25 test.h264 
which: no xset in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin)
which: no xrefresh in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin)

Input #0, h264, from 'test.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Video codec omx-h264 width 640 height 480 profile 66 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: 640x480@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
have a nice day ;)

Testing Ethernet

  1. boot without network cable connected
  2. After boot, insert Ethernet cable connected to LAN with DHCP server.
  3. Raspi gets IP address from DHCP server and can be connected via ssh, e.g.: ssh root@192.168.2.119
  4. Raspi implements mDNS protocol and can be connected via ssh: ssh root@raspberrypi3.local
  5. Raspi webserver can be connected via http://raspberrypi3.local/ showing default web page "It works!"
  6. remove Ethernet cable
  7. connect Ethernet cable to Ubuntu 16.04 Laptop with Ethernet connection set to "Link-local only"
  8. after a few seconds, Raspi generates Avahi (zeroconf) IP address and can be connected via ssh: ssh root@raspberrypi3.local or its new IP address, e.g. ssh root@169.254.203.164
  9. remove Ethernet cable
  10. connect Ethernet cable to LAN with DHCP server again. Raspi can be reached as above.

Testing WiFi

WiFi client in WPA2 PSK network

using connman, see https://gist.github.com/kylemanna/6930087, successfully tested with WPA2 PSK network:

root@raspberrypi3:~# connmanctl enable wifi
root@raspberrypi3:~# connmanctl scan wifi
root@raspberrypi3:~# connmanctl services
...

tethering

(user Raspi as wireless access point)

root@raspberrypi3:~# connmanctl tether wifi on raspi pipipipi

Date and Time

If connected, Raspi shall enquire current date and time from an ntp server. Servers are configured in @/etc/ntp.conf@.

The timezone is set to CET and displays the current local date and time:

root@raspberrypi3:~# date
Mon Nov 20 20:34:12 CET 2017
root@raspberrypi3:~# ls -l /etc/localtime 
lrwxrwxrwx 1 root root 23 Nov 20 07:51 /etc/localtime -> /usr/share/zoneinfo/CET

Note: since Raspi has no RTC, date and time maybe wrong if there is no internet connection.