SonyShell - an effort to "ssh into my Sony DSLR" A Linux-only helper built on Sony’s official Camera Remote SDK. It connects to a Sony A6700 camera over Wi-Fi/Ethernet, listens for new photos, downloads them automatically, and can optionally run a script on each downloaded file. Features Auto-connect via enumeration or direct IP/MAC . or . Watches for new capture events and fetches the newest files. Saves into a chosen directory with unique filenames . . Post-download hook : run any executable/script with the saved file path as argument. : run any executable/script with the saved file path as argument. Keepalive mode : auto-retry on startup failure or after disconnects. : auto-retry on startup failure or after disconnects. Cleaned, Linux-only code (no Windows ifdefs, simpler logging). Usage ./sony-remote --dir /photos [options] Options --dir : Directory to save files (required in most real setups). : Directory to save files (required in most real setups). --ip : Connect directly by IPv4 (e.g. 192.168.10.184 ). : Connect directly by IPv4 (e.g. ). --mac : Optional MAC (e.g. 10:32:2c:2a:1a:6d ) for direct IP. : Optional MAC (e.g. ) for direct IP. --cmd : Executable/script to run after each download, invoked as cmd /photos/DSC01234.JPG : Executable/script to run after each download, invoked as --keepalive : Retry interval when offline or after disconnect. : Retry interval when offline or after disconnect. -v , --verbose : Verbose property-change logging. Examples Enumerate + keep retrying every 2s, run a hook after each file: ./sony-remote --dir /photos --keepalive 2000 --cmd /usr/local/bin/ingest-photo Direct IP connect, verbose logs, retry every 3s: ./sony-remote --ip 192.168.10.184 --mac 10:32:2c:2a:1a:6d --dir /photos -v --keepalive 3000 Build Requires Linux, g++, and the Sony Camera Remote SDK. See INSTALL.md or (untested) g++ -std=c++17 sony-a6700-remote-cleaned.cpp \ -I/path/to/CrSDK/include \ -L/path/to/CrSDK/lib -lCameraRemoteSDK \ -lpthread -o sony-remote How It Works (short version) Connect to the camera (via IP or enumeration). Stores/reuses SDK fingerprint under ~/.cache/sonyshell/ . Wait for notifications: when the camera signals new contents, spawn a download thread. Download newest files to --dir . Safe naming ensures no overwrite ( file_1.jpg , etc.). Hook: if --cmd is set, fork/exec the script with the saved path. Reconnect on errors/disconnects if --keepalive is set. Developer Notes Core behavior is driven by QuietCallback (an IDeviceCallback impl). (an impl). Download workers use threads + condition variables to sync progress. Logging is plain std::cout / std::cerr with std::endl flushing. / with flushing. Minimal globals, coordinated by atomics for stop/reconnect flags. See DOCS.md for a deep dive into the internals. Personal Notes Built on/for Ubuntu 24.04 It uses Sony's official Camera Remote SDK (not included here). I leaned heavily on ChatGPT while creating this, so please don't mind the mess! ;) Links