It’s still hanging when trying the demo programs. This time I ran strace to see what might be going on.
$ strace -o foo.txt ./list_format
(hangs)
(reboot)
$ wc -l foo.txt
27519 foo.txt
(27k lines)
$ tail foo.txt
futex(0xdf0eb8, FUTEX_WAKE_PRIVATE, 1) = 1
munmap(0xb42fc000, 8392704) = 0
ioctl(3, _IOC(_IOC_WRITE, 0xc4, 0x4, 0xc), 0xbef0c0ec) = 0
futex(0xb6cdd3c4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, FUTEX_BITSET_MATCH_ANY) = 0
ioctl(3, _IOC(_IOC_NONE, 0xc4, 0xd, 0), 0x1e400e) = 0
close(10) = 0
ioctl(3, _IOC(_IOC_NONE, 0xc4, 0xb, 0), 0x1e400e) = 0
write(2, “close camera status = 0\n”, 24) = 24
exit_group(0) = ?
+++ exited with 0 +++
$ grep “write(” foo.txt
write(1, “Hardware platform: a03111\r\n”, 27) = 27
write(2, “Found sensor ov7251 at address 6”…, 34) = 34
write(2, “mode: 0, width: 640, height: 480”…, 66) = 66
write(2, “mode: 1, width: 640, height: 480”…, 66) = 66
write(2, “mode: 2, width: 640, height: 480”…, 66) = 66
write(2, “mode: 3, width: 640, height: 240”…, 66) = 66
write(2, “mode: 4, width: 640, height: 120”…, 66) = 66
write(2, “mode: 5, width: 320, height: 240”…, 66) = 66
write(2, “index: 0, CID: 0x00980914, desc:”…, 88) = 88
write(2, “index: 1, CID: 0x00980915, desc:”…, 88) = 88
write(2, “index: 2, CID: 0x00980911, desc:”…, 98) = 98
write(2, “index: 3, CID: 0x00980913, desc:”…, 91) = 91
write(2, “index: 4, CID: 0x00981901, desc:”…, 98) = 98
write(2, “close camera status = 0\n”, 24) = 24
Does this help with diagnosing the problem? It looks like it tries to print the formats correctly, but something else causes it to hang.
If you know of any other diagnostics I could run let me know.