{"id":16115270,"url":"https://github.com/iafan/hacksby","last_synced_at":"2025-03-16T08:32:44.219Z","repository":{"id":6482478,"uuid":"7722711","full_name":"iafan/Hacksby","owner":"iafan","description":"Description and unofficial implementation of Furby's audio protocol","archived":false,"fork":false,"pushed_at":"2013-01-26T13:54:52.000Z","size":375,"stargazers_count":211,"open_issues_count":5,"forks_count":39,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-02-27T05:56:14.559Z","etag":null,"topics":["decoding","fft","fsk","fun","microphone"],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/iafan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-20T22:17:49.000Z","updated_at":"2025-02-17T19:55:15.000Z","dependencies_parsed_at":"2022-09-07T11:00:23.647Z","dependency_job_id":null,"html_url":"https://github.com/iafan/Hacksby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iafan%2FHacksby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iafan%2FHacksby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iafan%2FHacksby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iafan%2FHacksby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iafan","download_url":"https://codeload.github.com/iafan/Hacksby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243807367,"owners_count":20350992,"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":["decoding","fft","fsk","fun","microphone"],"created_at":"2024-10-09T20:18:21.820Z","updated_at":"2025-03-16T08:32:43.634Z","avatar_url":"https://github.com/iafan.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"About Hacksby\n=============\n\n### Hacksby = Hack-a-Furby project\n\nHasbro's Furby toy (year 2012 model) uses audio protocol to communicate with other\nnearby Furbys and with the official 'Furby' applications for iOS and Android.\n\nThis project is an educational attempt to analyze and re-create the audio protocol\nand communicate with Furby using computer in a search for some easter eggs or\notherwise undocumented features.\n\nAt its current state, the project includes:\n\n 1. Description on the audio protocol (see below)\n 2. [An incomplete] description of various Furby commands\n 3. An Perl library and scripts that can generate and play WAV files\n    with arbitrary commands (to talk to Furby)\n 4. A script that can decode commands from a provided audio stream\n    (to interpret Furby's responses).\n\n\nDisclaimer\n==========\n\n### This information is provided for personal educational purposes only.\n### The author does not guarantee the accuracy of this information.\n### By using the provided information, libraries or software, you solely take the risks of damaging your hardware or your ears.\n\nSee `MIT-LICENSE.txt` for more information.\n\n\nAudio Protocol\n==============\n\nFurby audio protocol uses high-pitch frequencies to encode special commands (command\nis an integer number in [0..1023] range). Furby decodes such commands using its built-in\nmicrophone and may respond to some of them. When an event occurs (Furby pronounces\nsome phrase or performs an action), he can also emit such a command in addition to\nan audible sound. This feature is used in the official application 'Translator'\nmode, when it recognizes what Furby said and provides an instant translation.\n\nEach command is divided into two packages with 0.5 sec gap in between.\nThe first package carries the higher 5 bits of the command number, and the second one\ncarries the lower 5 bits. \n\nIf you record the responce from Furby or from iOS application and view its spectrum,\nYou will see that each packet looks like this: \n\n    2  --------##--------------------------------------##----\n    3  ----##----------------------##--##----------##--------\n    X  --##--##--##--##--##--##--##--##--##--##--##--##--##--\n    1  --------------------##--------------##----------------\n    0  ------------##--##------##--------------##------------\n\nThe total length of the packet is 0.5 second. Here `X` is a central frequency (17500 Hz),\nand `0`, `1`, `2` and `3` are the data frequencies. The distance between each adjacent frequency\nis approx. 557 Hz.\n\nThe central frequency carries no data and was likely introduce to aid in packet decoding.\nThe other four frequencies carry data. If one writes down the packet depicted above as a number in the\nquaternary numeral system using 0, 1, 2, 3 digits after the name of each frequency, he would\nget the following number: `3200 1033 1032` (for clarity, the number is separated into three quadruplets\neach representing a byte).\n\nThe first byte, `3200`, if written in the binary form, will look like this: `11 1 00000`, where the first\ntwo bits are always `11`, the second bit will be `0` for the first packet and `1` for the second, and\nthe remainder `00000` represents the 5 data bits themselves.\n\nThe second byte, `1033`, depends on the data bits and is used as a checksum (original algorithm is unknown).\nThe `lib/Furby/Packet.pm` file lists all 64 checksums (32 for the first packet and 32 for the second) needed\nto reconstruct any arbitrary command in [0..1023] range.\n\nThe last byte, `1032`, is always the same.\n\nTo eliminate ticks when playing back such audio packets, the original waveform uses smooth changes in\nfrequency between each data tone. Also, such frequencies are not noticable if combined with pretty loud\naudible responses Furby generates at the same time.\n\n\nCommands\n========\n\nBased on initial research, a list of known commands (or events) and their descriptions is provided in\n`lib/Furby/Commands.pm` and `lib/Furby/Dictionary.pm`. The list is incomplete and the already existing\ndescriptions may be inaccurate.\n\nThe task of interpreting the meaning of the commands is complicated further by the fact that Furby\ncan be in one of 6 personalities, and depending on its current personality, may respond to commands\ndifferently and produce different events on its own.\n\n### Furby Personality\n\nWhen Furby understands a command, it will respond back with his current personality id.\nKnown personalities (as listed in official Android application) are:\n\n  1. Princess (command id `901`) — a lovable one\n  2. Diva (command id `902`) — a musical one\n  3. Warrior (command id `903`) — also known as 'evil'\n  4. Joker (command id = `904`) — also known ad 'mad' or 'freaky'\n  5. Gossip Queen (command id `905`) — a chatty one\n\nThere is no known way to instantly change Furby's personality via some special command. Sending a command\nwith the personality id back to Furby seems to produce no effect.\n\n### Communication Mode\n\nWhen Furby chats or performs any action, it will ignore any commands sent to him.\nSo one needs to ensure Furby is listenting before sending any command. Luckily, there's command `820`\nwhich will put him into such listening mode for one minute (during this period, Furby just stay awake\nand listen for other commands). This comamnd is used in the official applications and is sent every 40\nseconds or so to keep Furby listen and stop doing silly things.\n\nUnfortunately, even if one sends this command periodically, Furby will go into deep sleep mode after\n10 minutes of inactivity. The only way to prevent it from sleep is turning or flippng Furby periodically\nso that its orientation sensor detects the movement.\n\nTools\n=====\n\nTools are located in `bin` directory.\n\n### Send Commands to Furby\n\n**CAUTION: setting the volume too high while playing back Furby commands may damage your ears!**\n\nPut your Furby near the speaker connected to your computer (or connect an earbud to a headphone jack\nand put it in front of Furby). Turn the volume all the way down. Wake up Furby and wait till it listens quietly.\nRun the command below:\n\n    perl furby-send.pl 350\n\nTurn the volume up a little and run the command again to see if Furby recognizes it\n(he should chew and then say something like \"mmm, yum!\"). If it doesn't, turn the volume up a bit and repeat\nthe procedure until it does.\n\n#### Troubleshooting\n\nIf you can hear a discomforting high-pitch noise when the command plays but Furby doesn't repsond,\nthen something is wrong. Try putting Furby closer to the speaker or the earbud and make sure Furby doesn't\ndo anything on his own while you play back the command. Normally, Furby should pick up the command even if\nyou are not hearing it yet.\n\n#### Interactive Mode\n\nYou can also run the tool in interactive mode:\n\n    perl furby-send.pl 350 --interactive\n\nAfter playing back the first command (`350`), the script will wait for your input. You can just press Enter to\nplay the next command in the range, or input a command number to play, or input anything else that doesn't\nevaluate to a number (for example, `r`) to repeat the last command. This mode will allow you to explore the\nFurby reactions to different commands.\n\nThe generated WAV file is saved as `out.wav` in the current directory. Under Windows, the playback is performed\nusing the provided command-line utility (`bin/win32/dsplay.exe`). Under Unix / Mac, an attempt to use\nalready existing console players is used (but not tested).\n\n\n### Listen and Decode Furby Commands\n\nThe provided `furby-decode.pl` decodes the RAW PCM data from STDIN and displays any commands it decodes.\nThe only supported format is 44.1KHz mono 16bit signed PCM format.\n\nYou can pre-record a WAV file using your microphone and then decode it using this tool like this:\n\n    perl furby-decode.pl \u003c record.wav\n\nor pipe in PCM data from a streaming application or virtual device. Under Windows, a binary tool is included \n(`bin/win32/rec_stdout.exe`) which records data from a default input source and constantly streams it to STDOUT.\nYou can use it like this:\n\n    win32\\rec_stdout.exe | perl furby-decode.pl\n\nor just run\n\n    furby-listen.bat\n\nBefore you run this command, make sure you have a microphone plugged in, that it is selected in Sound settings\nas a default capturing device and put your microphone close to Furby.\n\nThe sound capture hasn't been tested on platforms other than Windows.\n\n#### Troubleshooting\n\nSome microphones (especially the ones integrated into web cameras) use a low-pass filter that would essentially\nwipe out all frequencies that are used to transmit commands. If your decoding doesn't work, try recording\nthe audio sample into the 44.1KHz mono 16bit signed PCM WAV file (touch Furby's head or tum to make sure it responds\nto your interaction and thus emits an event command), then open the file in a sound editor like Audacity,\nmake sure the audio format is correct, switch to a spectrum view and see if there are any frequencies recorded\naround the 17.5KHz range (you will clearly see if there are command packets there).\n\n\n### Feedback\n\nFeedback and any further research results are always welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiafan%2Fhacksby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiafan%2Fhacksby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiafan%2Fhacksby/lists"}