{"id":19299193,"url":"https://github.com/bmatcuk/flipperzero-qrcode","last_synced_at":"2025-04-05T14:04:19.997Z","repository":{"id":65278004,"uuid":"583013261","full_name":"bmatcuk/flipperzero-qrcode","owner":"bmatcuk","description":"Display qrcodes on the Flipper Zero","archived":false,"fork":false,"pushed_at":"2025-01-26T10:44:00.000Z","size":74,"stargazers_count":148,"open_issues_count":1,"forks_count":7,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T13:05:20.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmatcuk.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":"2022-12-28T14:03:27.000Z","updated_at":"2025-03-09T23:01:20.000Z","dependencies_parsed_at":"2023-01-16T05:00:47.040Z","dependency_job_id":"7b8d3bf6-854b-4dc8-9de6-11983a07f626","html_url":"https://github.com/bmatcuk/flipperzero-qrcode","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fflipperzero-qrcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fflipperzero-qrcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fflipperzero-qrcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fflipperzero-qrcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmatcuk","download_url":"https://codeload.github.com/bmatcuk/flipperzero-qrcode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"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":[],"created_at":"2024-11-09T23:10:30.558Z","updated_at":"2025-04-05T14:04:19.977Z","avatar_url":"https://github.com/bmatcuk.png","language":"C","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"# flipperzero-qrcode\nDisplay qrcodes on the [Flipper Zero]\n\n![qrcode screenshot](https://github.com/bmatcuk/flipperzero-qrcode/blob/main/ss2.png?raw=true)\n\n## Download\nGrab the latest `qrcode.fap` from [Releases].\n\n## Installation\nCopy the `qrcode.fap` file onto your [Flipper Zero] sd card in the `apps/Tools`\ndirectory. Then create a top level directory called `qrcodes` to store your\nqrcode files. This can be done using [qFlipper], for example, by\ndraging-and-dropping `qrcode.fap` into `apps/Tools` and then navigating back to\nthe top level (where the directories like `infrared` and `nfc` live), right\nclick, and create a new folder called `qrcodes`.\n\n## Creating QR Codes\nqrcode files are simple text files with the extension `.qrcode`. This app will\nexpect them to live in a top-level directory on your sd card called `qrcodes`.\nThey should have the following content:\n\n```\nFiletype: QRCode\nVersion: 0\nMessage: your content here\n```\n\nqrcode v2 supports a newer format as well (the old format still works for\nbackward compatibility, or, if you don't need the newer features, the app will\nread version \"0\" files faster):\n\n```\nFiletype: QRCode\nVersion: 1\nQRMode: B\nQRVersion: 6\nQRECC: L\nMessage: your content here\nMessage: multi-line content is possible\n```\n\nIn a version \"1\" file, the `QRMode`, `QRVersion`, and `QRECC` are optional\n(though, must be in that order if more than one are specified). The app will\nattempt to use the specified mode, version, and/or ECC, if the content will\nfit. Otherwise, it may select a different mode, version, and/or ECC. Keep\nreading to learn about the meaning of `QRMode`, `QRVersion`, and `QRECC`.\n\nVersion \"1\" files also support multi-line content. Each line starting with\n`Message:` will be concatenated together with newline characters.\n\nMy recommendation is to allow the app to select a mode, version, and ECC level\nfor you and, then, if you find that your qrcode reader prefers specific\nsettings, update the file appropriately.\n\n### Message Format\nqrcodes support 4 formats called \"modes\": numeric, alpha-numeric, binary, and\nkanji. Because of the limited screen real-estate on the [Flipper Zero], you'll\nwant to pick the best mode for the data you are trying to display.\n\nIf unspecified in the `.qrcode` file, the app will automatically detect the\nbest mode to use based on the message content.\n\n#### Numeric Mode (QRMode: N)\nConsists of only numbers, nothing else. This mode can encode the most data and\nis useful for things like phone numbers. To use this mode, your message must\n_not_ contain non-numeric characters. For example, a message content of \"(xxx)\nxxx-xxxx\" can _not_ use numeric mode (it would require \"binary\" mode, in fact).\nInstead, your message should just be \"xxxxxxxxxx\".\n\n#### Alpha-Numeric Mode (QRMode: A)\nThis mode can encode numbers, uppercase letters *only*, spaces, and the\nfollowing symbols: `$%*+-./:`. This format _may_ be appropriate for urls, as\nlong as you're only encoding the domain name and you remember to use uppercase\nletters (ex: `HTTP://EXAMPLE.COM`). If your url includes some path after the\ndomain, you'll likely need to use binary mode because the paths are usually\ncase-sensitive.\n\nA qrcode in alpha-numeric mode can encode ~40% less data than numeric mode.\n\n#### Binary Mode (QRMode: B)\nThis mode is a little bit of a misnomer: binary mode simply means that the\nmessage will be encoded as 8-bit bytes. The qrcode standard stipulates that\ntext will use ISO-8859-1 (also known as Latin-1) encoding, _not_ utf8 as would\nbe the standard these days. However, _some_ readers _may_ automatically detect\nutf8. To be standard-compliant, that basically means you can only use Latin\nletters, numbers, and symbols.\n\nMulti-line messages will always be in binary mode, since the other modes cannot\nencode a newline character.\n\nA qrcode in binary mode can encode ~60% less data than numeric mode, and ~30%\nless than alpha-numeric.\n\n#### Kanji Mode (QRMode: K)\nThis mode is unsupported, so I won't go into detail. A limitation of the\nunderlying qrcode library that I'm using, unfortunately. If there's interest,\nperhaps I'll hack in support sometime.\n\n### QRVersion\nA qrcode's version specifies how \"big\" it is. Higher versions contain more\n\"modules\" (ie, the \"pixels\" that make up qrcodes) and, thus, can encode more\ndata. A version 1 qrcode contains 21x21 modules, whereas a version 11 code (the\nlargest the Flipper Zero can display) contains 61x61 modules. The modules of a\nversion 1 code will be 3x3 pixels on the Flipper Zero screen; version 2 and 3\nqrcodes will each have 2x2 pixel modules; and version 4 through 11 qrcodes will\nhave single pixel modules.\n\nIf unspecified in the `.qrcode` file, the app will automatically select the\nlowest version that can contain all of the message content, given the mode\nselected in the previous step.\n\n### QRECC\nA qrcode's ECC level determines the qrcode's resilience to \"damage\". In the\ncase of the Flipper Zero, \"damage\" might be a dirty screen, dead pixels, or\neven screen glare. Higher ECC modes are more resilient, but can contain less\ndata. The ECC modes are Low, Medium, Quartile, and High and can be specified in\nthe `.qrcode` file using the first letter (L, M, Q, and H).\n\nqrcode readers may have an easier time reading qrcodes with higher ECC levels,\nso, if unspecified in the `.qrcode` file, the app will select the highest ECC\nlevel that can contain all of the message content, given the qrcode mode and\nversion selected in the previous steps.\n\n## Using the App\nThe app is fairly straightforward. When it first starts, the file browser will\nautomatically open to the `qrcodes` directory and display any `.qrcode` files.\nSelect one using the arrow keys and the center button. The qrcode will display.\nIf you push the right arrow, some stats will display: the qrcode \"Version\"; the\nECC level; and the qrcode Mode (Numeric, Alpha-Numeric, Binary, or Kanji).\n\nWhile viewing the stats, you can select Version or ECC using the up and down\narrows and the center button. You can then increase or decrease the Version or\nECC using up and down and save your choice using the center buttton. This\nfeature was mostly added for my own amusement and testing, but, theoretically,\nit may help a reader that's having trouble if the default ECC is less than the\nhighest value (\"H\"): you can increase the Version by 1 and then set the ECC to\n\"H\". Whether or not this helps depends on the reader.\n\nYou can hide the stats by pressing the left arrow.\n\nWhen you're done viewing the qrcode, press the back button to return to the\nfile browser. If you push the back button in the file browser, the app will\nexit.\n\nI will ask that you temper your expectations: the Flipper Zero screen is small\nand many readers may have difficulty reading the qrcodes, especially if they\nare encoding a lot of data. However, I have successfully got my iPhone to read\nqrcodes encoding phone numbers, wifi info, and a url, all the way up to a\nversion 11 qrcode (ie, the largest size the screen will fit).\n\n## Example: Wifi QRCodes\nMost phones can automatically connect to wifi networks from a qrcode. If you\nshould like to encode your wifi's connection info into a qrcode, here's how\nyou'd do it:\n\n```\nFiletype: QRCode\nVersion: 0\nMessage: WIFI:S:\u003cssid\u003e;P:\u003cpassword\u003e;T:\u003cencryption\u003e;\n```\n\nReplace `\u003cssid\u003e` with the name of your wifi, `\u003cpassword\u003e` with the password.\n`\u003cencryption\u003e` would be \"WPA\" or \"WEP\". If your wifi is open (no password),\nthis can be \"None\" and you can remove `P:\u003cpassword\u003e;` from the message. If your\nwifi is hidden (ie, does not broadcast the ssid), you can add `H:true;` to the\nend.\n\nNote that if your ssid or password contain any of these characters: `\\\";,:`,\nyou'll need to \"escape\" it by placing a backslash (`\\`) before it.\n\nFor example, if my ssid was \"wifiball\" and not broadcast, and the password was\n\"pa$$:word\" with WPA encryption, the message would be:\n\n```\nMessage: WIFI:S:wifiball;P:pa$$\\:word;T:WPA;H:true;\n```\n\n## Example: vCard\nPhones can scan [vCard] qrcodes to automatically add a contact to their address\nbook. Starting with qrcode v2, multi-line qrcodes can be created, allowing you\nto create vCards!\n\n```\nFiletype: QRCode\nVersion: 1\nMessage: BEGIN:VCARD\nMessage: VERSION:3.0\nMessage: N:Smith;John\nMessage: FN:John Smith\nMessage: ADR;TYPE=dom,home,postal,parcel:;;123 Example St;Exampleton;CA;90210;\nMessage: BDAY:1970-01-01\nMessage: TEL;TYPE=pref,voice,msg,cell:+18005551212\nMessage: END:VCARD\n```\n\nCheck the [vCard] specification to learn about all of the fields and their\nvalues.\n\n## Building\nFirst, clone the [flipperzero-firmware] repo and then clone this repo in the\n`applications_user` directory:\n\n```bash\ngit clone git@github.com:flipperdevices/flipperzero-firmware.git\ncd flipperzero-firmware/applications_user\ngit clone git@github.com:bmatcuk/flipperzero-qrcode.git\n```\n\nNext, in the base of the [flipperzero-firmware] directory, run fbt:\n\n```bash\n./fbt fap_qrcode\n```\n\nThis will automatically install dependencies and build the application. When it\nhas finished building, the .fap will be in\n`build/f7-firmware-D/.extapps/qrcode.fap` (fbt output will tell you where to\nfind the .fap, should it change in the future).\n\n## qrcode library\nThis application uses the [QRCode] library by ricmoo. This is the same library\nthat is in the lib directory of the flipper-firmware repo (which was originally\nincluded for a [now-removed demo app]), but modified slightly to fix some\ncompiler errors and allow the explicit selection of the qrcode mode.\n\n[now-removed demo app]: https://github.com/flipperdevices/flipperzero-firmware/pull/160/files\n[flipperzero-firmware]: https://github.com/flipperdevices/flipperzero-firmware\n[Flipper Zero]: https://flipperzero.one/\n[QRCode]: https://github.com/ricmoo/QRCode\n[qFlipper]: https://docs.flipperzero.one/qflipper\n[Releases]: https://github.com/bmatcuk/flipperzero-qrcode/releases/latest\n[vCard]: https://www.evenx.com/vcard-3-0-format-specification\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fflipperzero-qrcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmatcuk%2Fflipperzero-qrcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fflipperzero-qrcode/lists"}