BirdDog SSH Access and Custom Firmware [4K Flex In Variant]
This page was a draft, but I’m leaving it here in case someone needs this.
This page is specific to detailing the runtime of the BirdDog 4K Flex In firmware. The Mini and 4K are very similar in terms of firmware, but there are some notable differences, probably enough to warrant a separate page. If you’re looking for the Mini-specific guide, you can find it here.
Much like the Mini, the 4K Flex In runs a read-write root filesystem, which is bad. This fs is also mounted async, very bad. RSyslogd is enabled and active and it writes to the rootfs, silly bad.
The mount of root is a little different (reported differently) but it looks like this is a bind mount.
The 4K Flex In and Mini share the same CPU, RAM and storage. The entire system board seems to be a System-On-Module approach. The Mini can’t do 4K due to the HDMI receiver chip in use (NXP TDA1997 on the Mini vs ADV7619 on the 4K Flex In).
The Flex 4K In has a 2.5mm TRRS jack for “RS-232” functions (namely Visca signaling for PTZ cameras). BirdDog hasn’t detailed how to use this port. lsof indicates that the serial port (ttyPS1) is not in use most of the time). An oscilloscope connected to the port indicates that the levels are not RS232 but rather 3.3v TTL, so an adapter would be required for most PTZ cameras (ala MAX232). Running socat could easily expose this port on a TCP port (something I’d like to do to enable use of older PTZ cameras I have).
NTP will happily install and run on the 4k Flex In with sub-millisecond jitter from internet time sources.
Some interesting bits:
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-snickerdoodle+ armv7l)
* Documentation: https://help.ubuntu.com/
root@4k-four:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.7G 1.4G 1.2G 56% /
devtmpfs 344M 0 344M 0% /dev
tmpfs 472M 0 472M 0% /dev/shm
tmpfs 472M 13M 460M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 472M 0 472M 0% /sys/fs/cgroup
/dev/mmcblk0p1 64M 13M 52M 20% /boot
tmpfs 95M 0 95M 0% /run/user/0
root@4k-four:~# mount
/dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=351468k,nr_inodes=87867,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
configfs on /config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=96536k,mode=700)
root@4k-four:~# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.5 0.3 5316 3696 ? Ss 08:47 0:03 /sbin/init earlyprintk
root 2 0.0 0.0 0 0 ? S 08:47 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 08:47 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/0:0]
root 5 0.0 0.0 0 0 ? S< 08:47 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/u4:0]
root 7 0.0 0.0 0 0 ? S 08:47 0:00 [rcu_preempt]
root 8 0.0 0.0 0 0 ? S 08:47 0:00 [rcu_sched]
root 9 0.0 0.0 0 0 ? S 08:47 0:00 [rcu_bh]
root 10 0.0 0.0 0 0 ? S 08:47 0:00 [migration/0]
root 11 0.0 0.0 0 0 ? S 08:47 0:00 [migration/1]
root 12 0.0 0.0 0 0 ? S 08:47 0:00 [ksoftirqd/1]
root 14 0.0 0.0 0 0 ? S< 08:47 0:00 [kworker/1:0H]
root 15 0.0 0.0 0 0 ? S 08:47 0:00 [kdevtmpfs]
root 17 0.0 0.0 0 0 ? S< 08:47 0:00 [perf]
root 49 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/1:1]
root 96 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/u4:2]
root 295 0.0 0.0 0 0 ? S< 08:47 0:00 [writeback]
root 297 0.0 0.0 0 0 ? S< 08:47 0:00 [crypto]
root 298 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 300 0.0 0.0 0 0 ? S< 08:47 0:00 [kblockd]
root 332 0.0 0.0 0 0 ? S< 08:47 0:00 [edac-poller]
root 346 0.0 0.0 0 0 ? S< 08:47 0:00 [cfg80211]
root 433 0.0 0.0 0 0 ? S< 08:47 0:00 [rpciod]
root 447 0.0 0.0 0 0 ? S 08:47 0:00 [kswapd0]
root 448 0.0 0.0 0 0 ? S< 08:47 0:00 [vmstat]
root 449 0.0 0.0 0 0 ? S 08:47 0:00 [fsnotify_mark]
root 450 0.0 0.0 0 0 ? S< 08:47 0:00 [nfsiod]
root 506 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 507 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 508 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 509 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 510 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 511 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 512 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 513 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 514 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 515 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 516 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 517 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 518 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 519 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 520 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 521 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 555 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 558 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 561 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 564 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 567 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 570 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 573 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 576 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 595 0.0 0.0 0 0 ? S 08:47 0:00 [spi32766]
root 605 0.0 0.0 0 0 ? S 08:47 0:00 [spi0]
root 609 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 709 0.0 0.0 0 0 ? S< 08:47 0:00 [kpsmoused]
root 740 0.0 0.0 0 0 ? S 08:47 0:00 [irq/150-mmc0]
root 766 0.0 0.0 0 0 ? S< 08:47 0:00 [ipv6_addrconf]
root 771 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 772 0.1 0.0 0 0 ? S 08:47 0:00 [mmcqd/0]
root 773 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 774 0.0 0.0 0 0 ? S 08:47 0:00 [mmcqd/0boot0]
root 775 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 776 0.0 0.0 0 0 ? S 08:47 0:00 [mmcqd/0boot1]
root 777 0.0 0.0 0 0 ? S< 08:47 0:00 [bioset]
root 778 0.0 0.0 0 0 ? S 08:47 0:00 [mmcqd/0rpmb]
root 794 0.0 0.0 0 0 ? S< 08:47 0:00 [deferwq]
root 796 0.0 0.0 0 0 ? S< 08:47 0:00 [kworker/1:1H]
root 797 0.0 0.0 0 0 ? S< 08:47 0:00 [kworker/0:1H]
root 798 0.0 0.0 0 0 ? S 08:47 0:00 [jbd2/mmcblk0p2-]
root 799 0.0 0.0 0 0 ? S< 08:47 0:00 [ext4-rsv-conver]
root 817 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/1:2]
root 824 0.0 0.0 0 0 ? S 08:47 0:00 [kworker/0:2]
root 827 0.2 0.2 9588 2676 ? Ss 08:47 0:01 /lib/systemd/systemd-journald
root 865 0.0 0.2 10636 2424 ? Ss 08:47 0:00 /lib/systemd/systemd-udevd
root 1540 0.0 0.1 3328 1916 ? Ss 08:47 0:00 /lib/systemd/systemd-logind
message+ 1541 0.0 0.2 5012 2748 ? Ss 08:47 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
avahi 1543 0.0 0.2 4872 2236 ? Ss 08:47 0:00 avahi-daemon: running [4k-four.local]
syslog 1544 0.0 0.2 31452 2084 ? Ssl 08:47 0:00 /usr/sbin/rsyslogd -n
avahi 1545 0.0 0.0 4872 284 ? S 08:47 0:00 avahi-daemon: chroot helper
root 1548 0.0 0.1 2852 1576 ? Ss 08:47 0:00 /usr/sbin/cron -f
root 1947 0.0 0.0 3968 612 ? Ss 08:47 0:00 /sbin/dhclient eth0
root 1970 0.3 1.1 22608 10696 ? Ssl 08:47 0:02 python /bin/birddog-websockets 6790 /tmp/birddog-dashboard-pipe /tmp/birddog-dashboard-log -j
root 1971 0.3 0.6 800432 6352 ? Ssl 08:47 0:01 /bin/birddog-web-ui -port 80 -data-dir /srv/birddog-web-ui -alsologtostderr
root 1974 0.0 0.1 2628 1896 ? Ss 08:47 0:00 /bin/bash /bin/BirdDogSrvr/./BashScript
root 1975 0.1 0.1 2648 1872 ? Ss 08:47 0:01 /bin/bash /bin/birddog-check-gpio
root 1978 0.0 0.1 2624 1300 ? S 08:47 0:00 /bin/bash /bin/BirdDogSrvr/./BashScript
root 1979 0.1 1.1 22608 10692 ? Ssl 08:47 0:01 python /bin/birddog-websockets 6789 /tmp/birddog-updater-pipe /tmp/birddog-updater-log -w
root 1980 0.2 3.4 86920 33352 ? Sl 08:47 0:01 node /bin/BirdDogSrvr/BirdDog.js
root 1981 0.2 3.4 86884 33132 ? Sl 08:47 0:01 node /bin/BirdDogSrvr/BirdDogCam.js
root 1983 0.0 0.4 8024 4136 ? Ss 08:47 0:00 /usr/sbin/sshd -D
root 1998 0.0 0.1 3984 1096 ? S 08:47 0:00 avahi-publish-service 4k-four _birddog._tcp 8080
root 2049 0.0 0.1 1808 1136 ttyPS0 Ss+ 08:47 0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyPS0 vt220
ntp 2051 0.0 0.3 14408 3412 ? Ss 08:47 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:118
root 2079 0.0 0.1 2616 1852 ? Ss 08:48 0:00 /bin/bash /bin/birddog-runner
root 2091 1.1 0.7 73588 7392 ? Ssl 08:48 0:07 /bin/bdg_headset_mic
root 2094 0.0 0.6 23424 6096 ? Ssl 08:48 0:00 /bin/bdg_headset_speaker
root 2095 0.0 0.4 41172 4524 ? S 08:48 0:00 /bin/tiny_4k_enc_app
root 2726 0.1 0.4 11816 4696 ? Ss 08:49 0:00 sshd: root@pts/0
root 2738 0.0 0.3 4828 2928 ? Ss 08:49 0:00 /lib/systemd/systemd --user
root 2741 0.0 0.1 6712 1172 ? S 08:49 0:00 (sd-pam)
root 2756 0.0 0.2 2752 2164 pts/0 Ss 08:49 0:00 -bash
root 4340 0.0 0.0 1356 320 ? S 08:58 0:00 sleep 1
root 4341 0.0 0.1 4728 1908 pts/0 R+ 08:58 0:00 ps aux
root@4k-four:~#
Thumbnail: Teletype Dataspeed 40, San Diego Air and Space Museum Archives (no known copyright restrictions)