{ "cells": [ { "cell_type": "markdown", "metadata": { "cell_id": "00003-1f86a49d-297f-42cd-8eba-4cedbd53bd69", "deepnote_cell_type": "markdown", "tags": [] }, "source": [ "# V-R3X Beacon Decoder\n", "\n", "## How To\n", "\n", "1. Paste your beacon in byte format between the brackets: `beacon = []` in the block below.\n", " - Double-click to enter the block for editing\n", " - See below for examples of what the byte string should look like\n", " - separate multiple beacons with a comma `,`\n", "2. Click the fast-forward button at the top of this page and select `Restart and Run All Cells` when prompted.\n", "3. A decoded beacon message will be displayed at the bottom of this notebook\n", "\n", "## More Info\n", "Beacons are 45 bytes in length.\n", "- An example of a Python byte string is: `b'3<\\x1a\\x00\\x1a\\x00\\x00\\xb2\\x82\\xa0\\x00\\x00\\x00'`\n", "- When in doubt, use this complete beacon to test your notebook: `b'3<\\x1a\\x00\\x1a\\x00\\x00\\xb2\\x82\\xa0\\x00\\x00\\x00\\x00\\x03\\x06\\x00\\x00\\x00\\x00\\x0c\\x84\\x82}S\\x00\\n\\x00\\x0e\\x00\\x06\\xa8\\x04\\xb3$\\x80\\x00\\x80\\x00\\x80\\x00\\x87\\x00\\x00\\x95'`\n", "\n", "If your data is \"hexlified\":\n", "- set `HEXLIFIED_DATA = False` to `True` in the code block below\n", "- paste your data as described previously. It should look like: `b'333a0000'` etc..." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "cell_id": "00001-84bd2054-58c5-4cd2-9c38-a910c7f6d507", "deepnote_cell_type": "code", "deepnote_to_be_reexecuted": false, "execution_millis": 0, "execution_start": 1610050542522, "source_hash": "7ff8681a", "tags": [] }, "outputs": [], "source": [ "beacon = []" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "cell_id": "00002-cffc8519-3639-428a-a26b-43550a14af80", "deepnote_cell_type": "code", "deepnote_to_be_reexecuted": false, "execution_millis": 1, "execution_start": 1610050542522, "output_cleared": true, "source_hash": null, "tags": [] }, "outputs": [], "source": [ "from gs_parse_standalone import parse_beacon\n", "from binascii import unhexlify\n", "\n", "HEXLIFIED_DATA = True\n", "\n", "for i in beacon:\n", " if HEXLIFIED_DATA:\n", " i = unhexlify(i)\n", " parse_beacon(i)" ] } ], "metadata": { "deepnote_execution_queue": [], "deepnote_notebook_id": "bfe05181-be20-4c04-8f37-ec10b312484e", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.8" } }, "nbformat": 4, "nbformat_minor": 2 }