Initial commit

This commit is contained in:
Seth Hillbrand
2026-02-15 12:50:49 -08:00
commit c17ab8607c
61 changed files with 11607 additions and 0 deletions
+215
View File
@@ -0,0 +1,215 @@
# yolocam-ctl CLI User Guide
Command-line tool for controlling the YoloCam S3 camera on Linux.
## Prerequisites
1. YoloCam S3 connected via USB
2. CDC NCM network interface configured (host at 192.168.126.11, camera at 192.168.126.10)
3. `yolocam-lib` installed: `cd yolocam-lib && pip install -e .`
## Connection Setup
The camera exposes a CDC NCM network adapter over USB. Most Linux systems auto-configure
this via NetworkManager/DHCP. If not:
```bash
# Find the USB network interface
ip link show
# Configure manually
sudo ip link set usb0 up
sudo ip addr add 192.168.126.11/24 dev usb0
```
Verify connectivity:
```bash
yolocam-ctl status
```
## Commands
### status
Show camera connection status including USB detection, network, and firmware info.
```bash
yolocam-ctl status
```
Output:
```
YoloCam S3 Status
────────────────────────────────────
USB Device: Connected
Network: Interface configured
Control Port: Reachable (192.168.126.10:12345)
Firmware: YunxiCamera-ch131b-0.0.6
Serial: 524A25501202
ID: ...
```
### list
List all available camera parameters with read/write access and descriptions.
```bash
yolocam-ctl list
yolocam-ctl --json list # JSON output
```
Parameters are categorized: Image Quality, Zoom, Exposure, White Balance, Focus,
Video, Lens Correction, HDMI, Color / Tuning, Audio, LED / Indicator, AI Features,
Streaming, Device Info.
Access types:
- **RW** -- read and write
- **RO** -- read-only
- **WO** -- write-only (set commands only)
### get
Read one or more camera parameters.
```bash
yolocam-ctl get brightness
yolocam-ctl get brightness contrast saturation
yolocam-ctl --json get exposure-mode exposure-iso exposure-time
```
### get-all
Read all readable parameters. Automatically handles reconnection if the camera
stops responding.
```bash
yolocam-ctl get-all
yolocam-ctl --json get-all
```
### set
Set a camera parameter by name and value.
```bash
yolocam-ctl set brightness 60
yolocam-ctl set contrast 55
yolocam-ctl set exposure-mode 1 # 0=Auto, 1=Manual
yolocam-ctl set focus-mode 3 # 1=AFS, 2=Manual, 3=AFC, 4=Face
yolocam-ctl set hdr 1 # Enable HDR
yolocam-ctl set zoom 2.5 # 2.5x digital zoom (range 1.0-4.0)
```
### iso
Set ISO by actual value.
```bash
yolocam-ctl iso 400
yolocam-ctl iso 1600
```
Valid values: 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250,
1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 9600, 12800.
### shutter
Set shutter speed by denominator.
```bash
yolocam-ctl shutter 60 # 1/60s
yolocam-ctl shutter 1000 # 1/1000s
yolocam-ctl shutter 8000 # 1/8000s
```
Valid denominators: 25, 30, 50, 60, 80, 100, 125, 160, 200, 250, 320, 400,
500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000.
### wb-temp
Set white balance color temperature in Kelvin.
```bash
yolocam-ctl wb-temp 5500 # Daylight
yolocam-ctl wb-temp 3200 # Tungsten
yolocam-ctl wb-temp 7500 # Shade
```
Range: 2000K to 10000K. Requires `wb-mode` set to 0 (Manual).
### aperture
Set aperture by f-stop value. Finds the nearest supported value.
```bash
yolocam-ctl aperture 2.8
yolocam-ctl aperture F4.0
```
Note: The S3 has a fixed lens; aperture control applies to compatible YoloLiv lenses.
### raw
Send a raw protobuf command by numeric Command ID.
```bash
yolocam-ctl raw 7 # GET CID_BRIGHTNESS (CID 7)
yolocam-ctl raw 7 50 # SET CID_BRIGHTNESS to 50
```
Useful for exploring undocumented commands. See the proto file for all CID values.
### init
Run the full camera initialization sequence.
```bash
yolocam-ctl init
```
Sends heartbeat, queries firmware version, frame rate, aperture range, lens status,
USB version, and HDMI format.
### probe
Quick connectivity check verifying the wire format protocol works.
```bash
yolocam-ctl probe
```
### monitor
Watch real-time camera notifications (NOTIFY messages).
```bash
yolocam-ctl monitor
```
Shows timestamped notifications including parameter changes, face detection boxes,
recording state changes, and other events. Press Ctrl+C to stop.
## Global Options
| Option | Default | Description |
|--------|---------|-------------|
| `--ip` | 192.168.126.10 | Camera IP address |
| `--port` | 12345 | Camera control port |
| `--timeout` | 5.0 | Socket timeout in seconds |
| `--json` | off | Output in JSON format |
## Troubleshooting
**Connection refused**
- Check USB connection: `lsusb | grep 46f8:0855`
- Ensure network interface is up: `ip addr show`
- Try `yolocam-ctl status` for diagnostics
**Camera stops responding**
- The camera overwhelms easily with rapid requests
- Restart the camera app: `telnet 192.168.126.10` then `/app/bin/live_camera_app &`
- Or power-cycle the camera
**Timeout errors**
- Add `--timeout 10` for slow operations
- Some parameters (set-only) do not return responses