Archive for category Photography & Images

Logitech “Quickcam for Notebooks Deluxe” USB Camera Disassembly

My collection of old USB cameras emitted a Logitech Quickcam for Notebooks Deluxe, with a tag giving a cryptic M/N of V-UGB35. Given Logitech’s penchant for overlapping names, its USB identifiers may be more useful for positive ID:

ID 046d:08d8 Logitech, Inc. QuickCam for Notebook Deluxe

It works fine as a simple V4L camera and its 640×480 optical resolution may suffice for simple purposes, even if it’s not up to contemporary community standards.

The key disassembly step turned out to be simply pulling the pivoting base off, then recovering an errant spring clip from the Laboratory Floor:

Logitech V-UGB35 USB Camera - mount removed
Logitech V-UGB35 USB Camera – mount removed

The clips have a beveled side and fit into their recesses in only one orientation; there’s no need for brute force.

Removing the two obvious case screws reveals the innards:

Logitech V-UGB35 USB Camera - PCB rear
Logitech V-UGB35 USB Camera – PCB rear

Three more screws secure the PCB:

Logitech V-UGB35 USB Camera - PCB front
Logitech V-UGB35 USB Camera – PCB front

The ribbed focus knob around the lens makes it more useful than a nominally fixed-focus camera.

Reassembly is in reverse order.

I miss having obvious case screws …



1 Comment

Monthly Image: And Then There Were Two

The turkey hen who once had nine chicks, then seven, now has only two:

Turkey Hen with two chicks
Turkey Hen with two chicks

We haven’t seen the fox since it nailed the previous chick, but it may be responsible for taking a chick a day, every day, for a week.

We wonder if she misses the rest of her brood as much as we do …

Taken through two layers of 1950s window glass, zoomed all the way in, with a phone camera.

Leave a comment

Monthly Image: Turkey Hen and Chicks

Mary saw a fox trotting behind the garden, gripping a (dead) turkey chick in its jaws, with the hen in hot pursuit. The fox dropped the chick, circled the pine grove, picked up the chick, and departed stage right. The hen eventually led her remaining chicks into the yard, but gathered them underneath while watching for danger:

Turkey hen with chicks - alert
Turkey hen with chicks – alert

She settled down for a few minutes:

Turkey hen with chicks - resting
Turkey hen with chicks – resting

With the fox safely departed, she released the chicks:

Turkey hen with chicks - emerging
Turkey hen with chicks – emerging

Then they returned to foraging, with one chick trying out its wings:

Turkey hen with chicks - dispersing
Turkey hen with chicks – dispersing

Two days earlier, she led nine chicks through the yard; we think the fox picked off a chick a day. She lost two more during the next four days, suggesting they rapidly improve their ability to scamper out of harm’s way.


Xiaomi Dafang Hacks: Hostname for OSD and Filename

The config/hostname.conf file (found under /system/sdcard/when the camera is running) file defines the camera’s name:


That file overrides the contents of the usual etc/hostname.conf file, somewhat to my surprise, which remains the default Ingenic-uc1_1.

The bin/hostname utility returns the hostname:

[root@Cam4 ~]# which hostname
[root@Cam4 ~]# hostname

You can automagically get the hostname in the on-screen display by modifying the OSD formatting variable in config/osd.conf:

OSD="$(/bin/hostname) %Y-%m-%d %H:%M:%S"

Which works because the main OSD script sources the config file to set the variable:

Xiaomi Dafang - 15-04-2019_13.26.18
Xiaomi Dafang – 15-04-2019_13.26.18

It’s also helpful (at least for my purposes) to add the hostname to the image filenames. A one-line tweak in the scripts/ script does the trick:

snapshot_filename=$(/bin/hostname)_$(date "$snapshot_pattern")

Which produces names along these lines:

-rwxr-xr-x  1 ed   root 246K Apr 23  2019 Cam4_2019-04-23_17.51.02.jpg*

Having source code makes simple changes like this … simple!

1 Comment

Samsung EVO Pro 32 GB MicroSD Cards

Installing the Xiaomi Dafang Hacks firmware requires an MicroSD card in each camera and, my previous stock having run low, four more just arrived:

Samsung EVO Plus - 32 GB MicroSD
Samsung EVO Plus – 32 GB MicroSD

Prices have collapsed to the point where known-good (all four passed f3probe testing) cards direct from Samsung (as opposed to Amazon’s “commingled inventory” counterfeit situation) now cost $12-ish each with free shipping.

After I finish fiddling with the first camera, I’ll copy its card onto these four, unique-ify the IP addresses / hostnames /suchlike, and bring ’em all online.

Leave a comment

Xiaomi Dafang Hacks: Motion Detection

Given a camera running Xiaomi Dafang Hacks software, you can set up motion-triggered image capture and save the images either locally or on an FTP server. The latter makes sense, as it automatically plunks the images where they’re more generally available.

Define the FTP server parameters in config/motion.conf:

# Configure FTP snapshots and videos

The FTP server should have the Cam4 directory in place and shared for read-write access before attempting to plunk files therein. Ahem.

The camera’s Services menu leads to the motion configuration page:

Xiaomi Dafang - Motion Settings page
Xiaomi Dafang – Motion Settings page

Limiting the detection region to the lower-left corner cuts out all the waving-in-the-breeze foliage in the yard, while covering the driveway. High sensitivity detects squirrel-sized objects in the foreground, although your mileage will certainly differ.

The camera seems rate-limited at 5 s/image, which may come from FTP transfer overhead; I don’t know if the code includes a built-in delay or if it just works like that. The NAS drive requires upwards of 7 s to spin up if it hasn’t been used for a while, but afterwards the transfers don’t take that long.

Mounting the NAS drive’s CIFS shared directory from my desktop PC works as before:

sudo mount -v -o rw,credentials=/root/.nas-id,vers=1.0,uid=ed -t cifs // /mnt/part

Then view / edit / delete images as needed:

Xiaomi Dafang - IR motion capture - 15-04-2019_20.02.06
Xiaomi Dafang – IR motion capture – 15-04-2019_20.02.06

The camera has built-in IR LEDs, but they’re nowhere near powerful enough to illuminate the entire yard.

Motion detection works better in daylight:

Xiaomi Dafang - Daylight motion capture - 16-04-2019_09.53.51
Xiaomi Dafang – Daylight motion capture – 16-04-2019_09.53.51

Unlike the original Wyze firmware, the Xiaomi Dafang Hacks firmware & software keep all the images & metadata within my network and under my control.


Xiaomi Dafang Hacks: Timelapse Images

With the Wyze and Xiamoi Dafang cameras running the Xiaomi-Dafang Hacks firmware and software, I tried the timelapse functions on the yard camera.

The config/timelapse.conf file:

# Interval between snaps, in seconds
# Duration of the script should run, in minutes, set to 0 for unlimited
# Save dir config
# Enable compression

The images, named along the lines of 13-04-2019_191810_001.jpg, appear in the DCIM/timelapse directory, tucked into daily directories with names like 2019-04-13, a mismatch obviously in need of tweaking. There’s also a time_lapse directory which seems like cruft from an earlier revision; you can configure the target directory in scripts/

Start the script manually or from a crontab entry, wait until it’s done, then transfer the images to somewhere more convenient with a Bash one-liner:

find /system/sdcard/DCIM/timelapse/ -name \*jpg -exec curl -s -n -T {} \; 

The -s silences all curl output; omit it until you’re sure the lashup works as you expect. I always forget the backslash before the semicolon terminating the -exec command.

The -n pulls the userID and password from the ~/.netrc file you previously set up for manual ftp sessions:

login ftp-user-id
password secret-password

The IP address corresponds to my ancient NAS drive; your mileage may vary.

From my desktop box, mount the NAS drive:

sudo mount -t cifs -o "credentials=/root/.nas-id,vers=1.0,uid=ed" "//nasty/Timelapse" /mnt/part

The drive’s credentials aren’t particularly secret, but tucking them into /root/.nas-id means you could automount the drive with no hassle. The NAS drive requires the oldest possible CIFS version, of course.

Then view the pix:

Xiaomi Dafang - 15-04-2019_13.26.18
Xiaomi Dafang – 15-04-2019_13.26.18

You could set up the camera as an NFS share, but having all the cameras deposit their pix in a common location seems more convenient, particularly after I get around to automating the image transfer. Regrettably, the NAS drive doesn’t support subdirectories.