
{"id":162318,"date":"2026-05-07T08:42:50","date_gmt":"2026-05-07T08:42:50","guid":{"rendered":"https:\/\/mycryptomania.com\/?p=162318"},"modified":"2026-05-07T08:42:50","modified_gmt":"2026-05-07T08:42:50","slug":"bitchat-integration-for-meshcore","status":"publish","type":"post","link":"https:\/\/mycryptomania.com\/?p=162318","title":{"rendered":"Bitchat Integration for MeshCore"},"content":{"rendered":"<h3>Overview<\/h3>\n<p>The Bitchat integration enables MeshCore devices to communicate with the Bitchat Android app through a bridge layer that translates between Bitchat protocol and MeshCore mesh networking. This is an <strong>additive feature<\/strong> that preserves all existing MeshCore functionality while adding Bitchat compatibility.<\/p>\n<h3>Key Principles<\/h3>\n<p><strong>Additive, Not Substitutive<\/strong>: Bitchat support is added alongside MeshCore, not replacing it<strong>No Infrastructure Changes<\/strong>: Repeaters and room servers require no modifications<strong>Encapsulation Strategy<\/strong>: Bitchat messages are encapsulated in standard MeshCore\u00a0packets<strong>Backward Compatible<\/strong>: Existing MeshCore nodes continue to work\u00a0normally<\/p>\n<h3>Architecture<\/h3>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\u2502                            MeshCore Device                               \u2502<br \/>\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\u2502                                                                          \u2502<br \/>\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u2502<br \/>\u2502  \u2502    WITH DISPLAY (Menu)      \u2502    \u2502     BUTTON-ONLY (T1000-E)      \u2502  \u2502<br \/>\u2502  \u2502   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u2502    \u2502   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u2502  \u2502<br \/>\u2502  \u2502   \u2502   BITCHAT Page      \u2502   \u2502    \u2502   \u2502   5x Button Press      \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u2500\u2500\u2500\u2510   \u2502   \u2502    \u2502   \u2502   (Quintuple)          \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2502  \u2502  M  \u2502  \u2502  B  \u2502   \u2502   \u2502    \u2502   \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2502  \u2502Mesh \u2502  \u2502BitC \u2502   \u2502   \u2502    \u2502   \u2502  \u2502 LED: 3 blinks    \u2502  \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2502  \u2514\u2500\u2500\u252c\u2500\u2500\u2518  \u2514\u2500\u2500\u252c\u2500\u2500\u2518   \u2502   \u2502    \u2502   \u2502  \u2502 Buzzer: tone     \u2502  \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2502     \u2514\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2518      \u2502   \u2502    \u2502   \u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2502   \u2502  \u2502<br \/>\u2502  \u2502   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502    \u2502   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502  \u2502<br \/>\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2502<br \/>\u2502                 \u2502                                   \u2502                    \u2502<br \/>\u2502                 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                    \u2502<br \/>\u2502                                     \u25bc                                    \u2502<br \/>\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502<br \/>\u2502  \u2502                    SerialBLEInterface                               \u2502 \u2502<br \/>\u2502  \u2502  \u2022 MeshCore UART Service (6E400001-B5A3-F393-E0A9-E50E24DCCA9E)    \u2502 \u2502<br \/>\u2502  \u2502  \u2022 Bitchat Service (F47B5E2D-4A9E-4C5A-9B3F-8E1D2C3A4B5C)        \u2502 \u2502<br \/>\u2502  \u2502  \u2022 Only ONE service advertised at a time                           \u2502 \u2502<br \/>\u2502  \u2502  \u2022 Auto-disconnects clients on mode switch                         \u2502 \u2502<br \/>\u2502  \u2502  \u2022 PIN auth (MeshCore) \/ Open access (Bitchat)                    \u2502 \u2502<br \/>\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502<br \/>\u2502                                   \u2502                                      \u2502<br \/>\u2502                       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                        \u2502<br \/>\u2502                       \u2502    BitchatBridge       \u2502                        \u2502<br \/>\u2502                       \u2502  \u2022 Encapsulate         \u2502\u2500\u2500\u25ba MeshCore GRP\/TXT    \u2502<br \/>\u2502                       \u2502  \u2022 Decapsulate         \u2502\u25c4\u2500\u2500 BC magic header     \u2502<br \/>\u2502                       \u2502  \u2022 Loop prevention     \u2502                        \u2502<br \/>\u2502                       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                        \u2502<br \/>\u2502                                   \u2502                                      \u2502<br \/>\u2502                       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                        \u2502<br \/>\u2502                       \u2502       MyMesh           \u2502                        \u2502<br \/>\u2502                       \u2502     (MeshCore)         \u2502                        \u2502<br \/>\u2502                       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                        \u2502<br \/>\u2502                                   \u2502                                      \u2502<br \/>\u2502                       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                        \u2502<br \/>\u2502                       \u2502     LoRa Radio         \u2502                        \u2502<br \/>\u2502                       \u2502    (SX1262\/etc)        \u2502                        \u2502<br \/>\u2502                       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                        \u2502<br \/>\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<h3>Platform Support<\/h3>\n<h3>With Display (Menu-Based)<\/h3>\n<p>Navigate to the <strong>BITCHAT<\/strong> page and press <strong>ENTER<\/strong> to toggle between modes. Display shows large <strong>M<\/strong> (MeshCore) or <strong>B<\/strong> (Bitchat).<\/p>\n<h3>Button-Only (T1000-E)<\/h3>\n<p>Press the user button <strong>5 times rapidly<\/strong> (within ~3 seconds) to toggle modes. See <a href=\"https:\/\/github.com\/eddieoz\/MeshCore-BC\/blob\/feature\/bitchat-1.13.0\/docs\/bitchat\/button_ble_controller.md?ref=eddieoz.com\">Button-Based Mode Switching<\/a> for\u00a0details.<\/p>\n<h3>Quick Start<\/h3>\n<h3>Enable Bitchat (For Developers)<\/h3>\n<p>Add to your platformio.ini:<\/p>\n<p>build_flags =<br \/>    -D ENABLE_BITCHAT=1<br \/>    -D BLE_MODE_SWITCHING=1<\/p>\n<h3>Check Device Compatibility<\/h3>\n<p>Bitchat requires <strong>either a display with buttons<\/strong> OR <strong>button-only with LED feedback<\/strong> for mode switching.<\/p>\n<p><a href=\"https:\/\/github.com\/eddieoz\/MeshCore-BC\/blob\/feature\/bitchat-1.13.0\/docs\/bitchat\/compatibility_devices.md?ref=eddieoz.com\"><strong>\ud83d\udccb See Complete Device List<\/strong><\/a>\u200a\u2014\u200aFind your specific\u00a0device<\/p>\n<h3>Quick Start<\/h3>\n<h3>Enable Bitchat\u00a0Support<\/h3>\n<p># Build with Bitchat support<br \/>export ENABLE_BITCHAT=1<br \/>pio run -e WioTrackerL1_companion_radio_ble<\/p>\n<h3>Runtime Control<\/h3>\n<p>Bitchat mode is controlled <strong>on-device<\/strong> via the UI or button\u00a0presses:<\/p>\n<p><strong>With Display:<\/strong><\/p>\n<p>Navigate to <strong>BITCHAT<\/strong> page using LEFT\/RIGHT buttonsPress <strong>ENTER<\/strong> to toggle between MeshCore and Bitchat\u00a0modesDisplay shows large <strong>M<\/strong> (MeshCore) or <strong>B<\/strong> (Bitchat)<\/p>\n<p><strong>Button-Only (T1000-E):<\/strong><\/p>\n<p>Press user button <strong>5 times rapidly<\/strong> (within ~3\u00a0seconds)LED blinks 3 times (fast=Bitchat 150ms, slow=MeshCore 500ms)Buzzer plays acknowledgment tone (if available)<\/p>\n<p><strong>Note:<\/strong> The device always boots in <strong>MeshCore mode<\/strong>. Mode is not persisted across\u00a0reboots.<\/p>\n<h3>Message Flow<\/h3>\n<h3>Bitchat \u2192\u00a0MeshCore<\/h3>\n<p>Bitchat app sends MESSAGE via BLE to #mesh\u00a0channelBitchatBLEService receives and parses\u00a0messageBitchatBridge formats for MeshCore with \ud83d\udcf1\u00a0prefixMessage sent as PAYLOAD_TYPE_GRP_TXT via mesh on #mesh\u00a0channel<\/p>\n<h3>MeshCore \u2192\u00a0Bitchat<\/h3>\n<p>MeshCore receives group message on #mesh\u00a0channelBitchatBridge verifies channel secret matches SHA256(&#8220;#mesh&#8221;)BitchatBridge detects non-Bitchat origin (no \ud83d\udcf1\u00a0prefix)Message formatted as Bitchat MESSAGE with TLV\u00a0payloadSent to Bitchat app via BLE notification for #mesh\u00a0channel<\/p>\n<h3>#mesh Channel<\/h3>\n<p>The #mesh hashtag channel is the primary interoperability channel between Bitchat and MeshCore.<\/p>\n<h3>Channel Key Derivation<\/h3>\n<p>#mesh secret = first_16_bytes(SHA256(&#8220;#mesh&#8221;))<br \/>             = 0x5B664CDE0B08B220612113DB980650F3<\/p>\n<p>The channel secret is the <strong>first 16 bytes<\/strong> of the SHA256 hash of the UTF-8 encoded channel name string (including the #\u00a0prefix).<\/p>\n<p>Both Bitchat Android app and MeshCore firmware derive the same channel secret using this mechanism, enabling seamless group messaging.<\/p>\n<h3>Firmware Implementation<\/h3>\n<p><strong>Secret Computation<\/strong>: BitchatBridge::computeMeshSecret() derives the secret at initialization<strong>Channel Verification<\/strong>: BitchatBridge::isMeshChannel() verifies messages belong to\u00a0#mesh<strong>Channel Initialization<\/strong>: MyMesh::addHashtagChannel(&#8220;mesh&#8221;) creates the channel on\u00a0startup<\/p>\n<p>See <a href=\"https:\/\/github.com\/eddieoz\/MeshCore-BC\/blob\/feature\/bitchat-1.13.0\/docs\/bitchat\/protocol_specification.md?ref=eddieoz.com#hashtag-channels\">Protocol Specification<\/a> for technical details.<\/p>\n<h3>Known Limitations<\/h3>\n<h3>Menu-Based BLE Mode Switching<\/h3>\n<p>Due to BLE advertising size constraints, both nRF52 and ESP32 platforms use <strong>menu-based switching<\/strong> rather than simultaneous services:<\/p>\n<p><strong>Navigation:<\/strong><\/p>\n<p>Use <strong>LEFT\/RIGHT<\/strong> keys to navigate to the <strong>BITCHAT<\/strong>\u00a0pageDisplay shows:<strong>\u201cM\u201d<\/strong> with \u201cMeshCore\u201d text \u2192 MeshCore mode\u00a0active<strong>\u201cB\u201d<\/strong> with \u201cBitchat\u201d text \u2192 Bitchat mode\u00a0activePress <strong>ENTER<\/strong> to toggle between\u00a0modes<\/p>\n<p><strong>Platform-Specific Implementation:<\/strong><\/p>\n<p><strong>nRF52<\/strong>: Switches advertisement data between Nordic UART and Bitchat service\u00a0UUIDs<strong>ESP32<\/strong>: Uses setBitChatMode() to dynamically change advertised UUID via SerialBLEInterface<\/p>\n<p>Both platforms provide identical user experience for mode switching.<\/p>\n<h3>Compatibility<\/h3>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/github.com\/bitchat\/bitchat-android?ref=eddieoz.com\">Bitchat Android\u00a0App<\/a>MeshCore Companion Protocol: <a href=\"https:\/\/github.com\/eddieoz\/MeshCore-BC\/blob\/feature\/bitchat-1.13.0\/docs\/companion_protocol.md?ref=eddieoz.com\">companion_protocol.md<\/a>MeshCore Packet Structure: <a href=\"https:\/\/github.com\/eddieoz\/MeshCore-BC\/blob\/feature\/bitchat-1.13.0\/docs\/packet_format.md?ref=eddieoz.com\">packet_format.md<\/a><\/p>\n<p><a href=\"https:\/\/medium.com\/coinmonks\/bitchat-integration-for-meshcore-36b9d7aa5773\">Bitchat Integration for MeshCore<\/a> was originally published in <a href=\"https:\/\/medium.com\/coinmonks\">Coinmonks<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview The Bitchat integration enables MeshCore devices to communicate with the Bitchat Android app through a bridge layer that translates between Bitchat protocol and MeshCore mesh networking. This is an additive feature that preserves all existing MeshCore functionality while adding Bitchat compatibility. Key Principles Additive, Not Substitutive: Bitchat support is added alongside MeshCore, not replacing [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":162319,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-162318","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interesting"],"_links":{"self":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/162318"}],"collection":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162318"}],"version-history":[{"count":0,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/162318\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/media\/162319"}],"wp:attachment":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}