{"id":23500554,"url":"https://github.com/dtgreene/ivy2","last_synced_at":"2025-07-14T12:35:26.520Z","repository":{"id":167660223,"uuid":"625355569","full_name":"dtgreene/ivy2","owner":"dtgreene","description":"Python API for the Canon Ivy 2 mini photo printer","archived":false,"fork":false,"pushed_at":"2025-03-04T16:30:14.000Z","size":240,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T18:51:05.717Z","etag":null,"topics":["bluetooth","bluetooth-printer","canon","printer","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtgreene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2023-04-08T21:22:31.000Z","updated_at":"2025-03-26T09:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f894dfbb-3774-44f9-866d-c5d014257e9b","html_url":"https://github.com/dtgreene/ivy2","commit_stats":null,"previous_names":["dtgreene/ivy2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dtgreene/ivy2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtgreene%2Fivy2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtgreene%2Fivy2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtgreene%2Fivy2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtgreene%2Fivy2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtgreene","download_url":"https://codeload.github.com/dtgreene/ivy2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtgreene%2Fivy2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265292827,"owners_count":23742159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bluetooth","bluetooth-printer","canon","printer","python","raspberry-pi"],"created_at":"2024-12-25T06:44:34.927Z","updated_at":"2025-07-14T12:35:26.203Z","avatar_url":"https://github.com/dtgreene.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ivy 2\r\n\r\n![20230516_133925](https://github.com/dtgreene/ivy2/assets/24302976/1e9d4931-caf8-4aab-a176-1239dbba6856)\r\n\r\n\r\nA Python API to control the [Canon Ivy 2 mini photo printer](https://www.usa.canon.com/shop/p/ivy-2-mini-photo-printer).\r\n\r\nNote: So far, this has only been tested on a Raspberry PI 3b+.  The underlying PyBluez library should be cross-compatible but the pairing process will likely vary from platform to platform.\r\n\r\n### Installation steps (Raspberry PI)\r\n\r\n1. Install deb packages\r\n```\r\nsudo apt install bluetooth bluez libbluetooth-dev\r\n```\r\n\r\n2. Install pip packages (you may need to create a [virtual environment](https://docs.python.org/3/library/venv.html) first)\r\n```\r\npip install -r requirements.txt\r\n```\r\n\r\n3. Install BlueZ directly from the source ([see this comment](https://github.com/pybluez/pybluez/issues/431#issuecomment-1107884273))\r\n```\r\npip install git+https://github.com/pybluez/pybluez.git#egg=pybluez\r\n```\r\n\r\n4. Disable legacy pairing\r\n\r\nThis will need to be done each time the computer reboots.  Otherwise you may get an \"Invalid exchange\" error when trying to connect with the printer.\r\n\r\n```\r\nsudo hciconfig 0 sspmode 0\r\n```\r\n\r\n5. Pair with the printer\r\n\r\nThis only needs to be done the first time.  \r\n\r\nStart the BlueZ CLI \r\n```\r\nbluetoothctl\r\n```\r\n\r\nIf this is your first time messing with Bluetooth on the PI, first register an agent:\r\n- `agent on`\r\n- `default-agent`\r\n\r\nTurn on the printer and wait about 30 seconds. Then enable scanning:\r\n- `scan on`\r\n\r\nYou should start to see local Bluetooth devices popping up.  Most of the devices will just show a mac address but the printer should have the name listed as well making it easy to spot.  You should see something like this:\r\n\r\n```\r\n[NEW] Device 04:7F:0E:B7:46:0B Canon (46:0B) Mini Printer\r\n             ^ mac address\r\n```\r\n\r\nOnce you've located the printer, take note of the mac address and attempt to pair:\r\n- `pair \u003cmac-addr\u003e`\r\n- `trust \u003cmac-addr\u003e`\r\n\r\nYou can now disable scanning and exit the BlueZ CLI:\r\n- `scan off`\r\n- `exit`\r\n\r\n### Usage\r\n\r\nSee [example.py](example.py) for basic usage.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtgreene%2Fivy2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtgreene%2Fivy2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtgreene%2Fivy2/lists"}