{"id":15719414,"url":"https://github.com/targetdisk/snapcam-python","last_synced_at":"2026-02-06T15:05:35.879Z","repository":{"id":217570628,"uuid":"435026938","full_name":"targetdisk/snapcam-python","owner":"targetdisk","description":"A free software replacement for the iON Camera+ app you can run on your computer!","archived":false,"fork":false,"pushed_at":"2024-01-16T23:04:48.000Z","size":602,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T06:04:30.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/targetdisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-04T22:59:18.000Z","updated_at":"2025-04-05T18:25:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"98ee73f6-35ea-4da0-8b21-e89a256a6c41","html_url":"https://github.com/targetdisk/snapcam-python","commit_stats":null,"previous_names":["targetdisk/snapcam-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/targetdisk/snapcam-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetdisk%2Fsnapcam-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetdisk%2Fsnapcam-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetdisk%2Fsnapcam-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetdisk%2Fsnapcam-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/targetdisk","download_url":"https://codeload.github.com/targetdisk/snapcam-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetdisk%2Fsnapcam-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29165753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:55:41.346Z","updated_at":"2026-02-06T15:05:35.856Z","avatar_url":"https://github.com/targetdisk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SnapCam for Python\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"image of a SnapCam 1045/1050\" src=\"./img/snapcam.png\" width=223 height=223\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/psf/black\"\u003e\n    \u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/targetdisk/snapcam-python/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"License: AGPL v3\" src=\"./img/license.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## What is a SnapCam?\nA SnapCam is a small fixed-focus action camera capable of producing a 720p H.264\nvideo feed with AAC audio from the internal microphone.  It can save the feed in\nan `MP4` container to a microSD card, stream the feed in RTSP over WiFi, or do\nboth of these things simultaneously.\n\nThe device appears to use a Broadcom Bluetooth chip (mine is a `BCM20736`) with\nan ARM Cortex M3 as the main application processor.  It uses an OmniVision\n`OV788` chip (the same chip that the 720p\n[first generation Amazon Ring](https://www.exploitee.rs/index.php/Ring_Doorbell)\ndoorbell uses) for interfacing with the CMOS camera module and real-time 720p\nH.264+AAC encoding at 30 fps.  It uses a Wolfson `WM89606` ADC for the\nmicrophone.\n\nThe camera first starts up with only Bluetooth-LE enabled.  It uses Bluetooth\nfor sending picture taking commands, sending video recording commands, and\nconfiguring the camera's various settings.  All commands are in a JSON-like\nformat with a simple checksum at the end (that the camera never checks).  The\ncamera will pair with any device upon request with no authentication\nwhatsoever. 😈\n\nTo enable WiFi, you must send a special command (the `Type 22` command) to the\ncamera's `0x2d` handle using the Bluetooth attributes protocol.  Once that\ncommand is sent, the camera will spin up a WiFi access point on the 2.4GHz band.\nIf this is your first time connecting to the camera's WiFi, you may also want to\nsend the `Type 18` command to the camera to get the camera's WiFi SSID and WPA\nPSK.  Again, the camera will give this information to you with no authentication\nwhatsoever.\n\nWith WiFi access point enabled, you should be able to connect to it and get an\nIP address from the camera's DHCP server on the 192.168.2.0/24 subnet.  Every\nSnapCam I've tried so far has its IP address statically assigned to\n192.168.2.103.  Once connected, you'll have access to the camera's very secure\n(use `admin:admin` for the HTTP basic auth login) web interface on port 80, as\nwell as the RTSP server running on port 554.  There is also something that my\n`nmap` detects running on port 4000, but I have yet to poke around at it.\n\n## Getting a SnapCam\nYou can buy a SnapCam\n[on Amazon](https://www.amazon.com/iON-Camera-SnapCam-Wearable-Bluetooth/dp/B0131DSBN0)\nwhile supplies last.  The OmniVision video encoding/camera ASIC appears to be\n[end-of-life](https://www.ovt.com/sensors/OV788), so I'm not sure how long these\nwill be up for sale online.\n\n### Supported models\nNote that this project will only work on the SnapCam models with the onboard\nWiFi!  The SnapCam Lite 1046 model uses a completely different application\nprocessor and lacks onboard Bluetooth/WiFi.  Only buy the SnapCam 1045/1050\nmodel if you intend to try out the code in this repository!  Both are listed on\nthe same [Amazon page](https://www.amazon.com/iON-Camera-SnapCam-Wearable-Bluetooth/dp/B0131DSBN0),\nso be sure to verify that you are purchasing the correct model.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"SnapCam 1050 only!\" src=\"./img/supported-snaps.png\" width=100% height=auto\u003e\n\u003c/p\u003e\n\n## What is this repository for?\nThis is a proof-of-concept that allows you to setup and stream video from an iON\nSnapCam without the need for the Android app.  This software was made by\nreverse-engineering the Bluetooth traffic of the iON Camera+ app using my\nphone's onboard Android developer tools' Bluetooth packet capture.\n\nI have written the `Snapcam` and `SnapcamRTSP` classes that allow you to\ninteract with and stream video from a SnapCam.\n\n## Installing the Demo\nCurrently this software only supports running on Linux systems with Python 3.8 or\nnewer.  It also requires `bluez-tools`, a recent version of `ffmpeg`, and the\n`v4l2loopback` kernel module.\n\n### Video4Linux Loopback Setup\nYou must install the out-of-tree `v4l2loopback`\n[kernel module](https://github.com/umlaeute/v4l2loopback).\n\n#### With your distro's v4l2loopback package\nIf you install the kernel module from your distro's package manager and have the\n`/etc/modprobe.d` directory, make a file named\n`/etc/modprobe.d/v4l2loopback.conf` with the following contents:\n```\noptions v4l2loopback devices=4 video_nr=2 exclusive_caps=1\n```\n\nOnce that file is in place, you can `modprobe` the installed kernel module:\n```\n# modprobe v4l2loopback\n```\n\n#### With your own v4l2loopback build\nIf you build the `v4l2loopback` module\n[from GitHub](https://github.com/umlaeute/v4l2loopback), you can `insmod` it\nthusly (make sure you build it first):\n```\n# insmod ./v4l2loopback.ko devices=4 video_nr=2 exclusive_caps=1\n```\n\nCurrently my software is hardcoded to stream the video to `/dev/video4` (see\n`Snapcam/rtsp_util.py` line 54).  A lot of the video processing code will be\nrewritten in the future, including the part that only streams to `/dev/video4`.\n\n### Python setup\nSet up your virtual environment:\n```\n$ python3 -m venv .venv\n```\n\nEnter your virtual environment:\n```\n$ . .venv/bin/activate\n```\n\nInstall the `Snapcam` Python package:\n```\n(.venv)$ python3 setup.py install\n```\n\n## Powering on the Camera\nHold the power button on the camera until you hear two short beeps.  The camera\nshould now be on and ready to receive commands over Bluetooth-LE.  See the\ncamera's owner's manual for more information.\n\n## Starting your Computer's Bluetooth and Finding Your Camera\nIf you don't have a GUI control panel that allows you to enable your computer's\nBluetooth, you can run the following in a `root` shell or with `sudo`:\n```\n# systemctl start bluetooth\n```\n\nAs your regular user, start `bluetoothctl`:\n```\n(.venv)$ bluetoothctl\nAgent registered\n[bluetooth]#\n```\n\nFrom the `bluetoothctl` prompt, power on your computer's Bluetooth:\n```\n[bluetooth]# power on\nChanging power on succeeded\n```\n\nStart scanning for devices:\n```\n[bluetooth]# scan on\nDiscovery started\n[CHG] Controller 98:8D:46:DC:AB:BC Discovering: yes\n[CHG] Device D4:2C:3D:07:44:60 RSSI: -69\n[CHG] Device D4:2C:3D:07:44:60 TxPower: 4\n```\n\nLocate your SnapCam:\n```\n[bluetooth]# devices\nDevice D4:2C:3D:07:44:60 Snap4460\n```\n\nWrite/record the MAC address of your camera, it'll come in handy later.\n\nYou can now safely `exit` the `bluetoothctl` CLI:\n```\n[bluetooth]# exit\n(.venv)$\n```\n\n## Enabling your SnapCam's WiFi Access Point\nTo enable the WiFi run the `enable-sc-wifi` followed by your camera's\n**Bluetooth** MAC address:\n```\n(.venv)$ enable-sc-wifi D4:2C:3D:07:44:60\n{\"Type\": 18, \"ssid\": \"SnapCam_2264\", \"pwd\": \"123456789\"}\n```\n\nConnect to it using your computer's WiFi settings (or `wpa_cli` if you're too\ncool for NetworkManager).\n\n## Running the Demos\nPlugging in your SnapCam into a micro-USB charger while running the\ndemo is *highly recommended*, as its battery life is abysmal while streaming\nover WiFi.\n\n### Running the Bluetooth messaging demo\nThe first demo shows how you can use my `Snapcam` class to interact with a\nSnapCam 1050.\n\nEdit the **Bluetooth** MAC address in line 8 of `examples/demo.py` to your\ncamera's Bluetooth MAC (find it by scanning with `bluetoothctl`):\n```python\nsc = Snapcam(\"d4:2c:3d:07:44:60\", debug=True)\n```\n\nRun it like so:\n```\n(.venv)$ python3 examples/demo.py\n```\n\nThis demo will demonstrate toggling and changing some settings on your SnapCam,\njust like the Android and iOS apps do.\n\n### Running the V4L2 webcam demo\nEnsure your computer is connected to the SnapCam's WiFi AP and has gotten a DHCP\naddress.\n\nRun the demo in a terminal (keep the terminal open):\n```\n(.venv)$ python3 examples/rtsp-demo.py\n```\n\nWith the other terminal open, you should now be able to use the SnapCam as a\nwebcam in any software that uses Video4Linux webcams on Linux like Cheese,\nDiscord, FFmpeg, MPV, OBS Studio, VLC, or Zoom!\n\n## Notes\n- This software currently does not parse the RTP headers at all (will be handled\n  in the future in a C extension), leading to some interesting video corruption\n  and frame rate fluctuation from out-of-order video packets.\n- This is just an initial proof-of-concept.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetdisk%2Fsnapcam-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftargetdisk%2Fsnapcam-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetdisk%2Fsnapcam-python/lists"}