Elixir Wizards

Blue Heron: Bluetooth Low Energy (BLE) for Elixir & Nerves with Connor Rigby


Listen Later

Connor Rigby joins the Elixir Wizards to talk about Blue Heron BLE (Bluetooth Low Energy) support for Elixir apps. Blue Heron implements the BLE specs in pure Elixir, leveraging binary pattern matching and concurrent message processing to handle Bluetooth protocols. Unlike most solutions that require C ports or NIFs, Blue Heron runs entirely in user space, so it works seamlessly in both Nerves-based embedded projects and (eventually) desktop Elixir applications.

We discuss how Nerves development differs from building Phoenix apps. Connor shares challenges he's experienced with hardware compatibility, where some chips only partially implement the spec, and he discusses the surprisingly deep (but sometimes incomplete) world of BLE device profiles. His tip for anyone entering the BLE space: read the official spec instead of trusting secondhand blog posts. Tools like Nerves LiveBook give you hands-on examples, so you can get a BLE prototype running on a Raspberry Pi and your phone in no time.

Key topics discussed in this episode:
  • Blue Heron origins and “bird” naming convention
  • BLE vs. Bluetooth Classic: core differences
  • Pure Elixir implementation—no C dependencies
  • Binary pattern matching for packet parsing
  • Hardware transport options: UART, SPI, USB, SDIO
  • GenServer patterns in Nerves vs. Phoenix
  • Linux requirement and power-consumption trade-offs
  • GATT (Generic Attribute Table) implementation patterns
  • SQLite integration for Nerves apps
  • Hardware chip quirks and spec compliance
  • Manufacturer-specific commands and workarounds
  • BLE device profiles and spec gaps
  • Security Management Profile (SMP) for encryption
  • Device connection and pairing workflows
  • Web vs. embedded development differences
  • Where to get started: hardware recommendations and docs
  • Links mentioned:

    https://github.com/ConnorRigby/

    https://github.com/blue-heron/
    https://nerves-project.org/
    BLE (Bluetooth Low Energy) https://en.wikipedia.org/wiki/Bluetooth_Low_Energy
    https://developer.apple.com/ibeacon/

    https://learnyousomeerlang.com/building-otp-applications
    Linux https://www.linux.org/
    HCI (Host Controller Interface) https://en.wikipedia.org/wiki/Host_controller_interface
    Circuits UART Library https://hexdocs.pm/circuits_uart/readme.html
    SPI (Serial Peripheral Interface) https://github.com/elixir-circuits/circuits_spi
    SDIO (Secure Digital Input Output https://en.wikipedia.org/wiki/SDIO
    Raspberry Pi https://www.raspberrypi.com/
    Coral SoM Dev Board https://coral.ai/products/dev-board/
    BeagleBone Single-Board Linux Computer https://www.beagleboard.org/boards/beaglebone-black
    https://www.bluetooth.com/bluetooth-resources/intro-to-bluetooth-gap-gatt/
    Genservers https://hexdocs.pm/elixir/1.12/GenServer.html
    https://hexdocs.pm/ecto/Ecto.html
    https://github.com/elixir-sqlite/ecto_sqlite3
    https://github.com/nerves-livebook/nerves_livebook

    Special Guest: Connor Rigby.

    ...more
    View all episodesView all episodes
    Download on the App Store

    Elixir WizardsBy SmartLogic LLC

    • 4.9
    • 4.9
    • 4.9
    • 4.9
    • 4.9

    4.9

    22 ratings


    More shows like Elixir Wizards

    View all
    Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

    Software Engineering Radio - the podcast for professional software developers

    272 Listeners

    The Changelog: Software Development, Open Source by Changelog Media

    The Changelog: Software Development, Open Source

    282 Listeners

    Startups For the Rest of Us by Rob Walling

    Startups For the Rest of Us

    693 Listeners

    Software Engineering Daily by Software Engineering Daily

    Software Engineering Daily

    627 Listeners

    Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

    Syntax - Tasty Web Development Treats

    984 Listeners

    REWORK by 37signals

    REWORK

    210 Listeners

    CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

    CoRecursive: Coding Stories

    189 Listeners

    Elixir Mix by Charles M Wood

    Elixir Mix

    13 Listeners

    The Stack Overflow Podcast by The Stack Overflow Podcast

    The Stack Overflow Podcast

    64 Listeners

    Thinking Elixir Podcast by ThinkingElixir.com

    Thinking Elixir Podcast

    32 Listeners

    Beam Radio by Lars Wikman

    Beam Radio

    11 Listeners

    Software Unscripted by Richard Feldman

    Software Unscripted

    26 Listeners

    Oxide and Friends by Oxide Computer Company

    Oxide and Friends

    47 Listeners

    Elixir Mentor by Jacob Luetzow

    Elixir Mentor

    2 Listeners

    Elixir Friends by German Velasco

    Elixir Friends

    0 Listeners