Web Bluetooth Printer Profiles (Browser/KnownWebPrinterProfiles.cs)

shiny · src/Shiny.Printers/Browser/KnownWebPrinterProfiles.cs · csharp · MIT
pos, tag:blazor, tag:bluetooth, tag:printers, tag:web

Defines GATT service and characteristic profiles for connecting to standard ESC/POS Bluetooth printers via Web APIs. Reuse when enabling browser-based receipt printing from web applications.

// Source: https://github.com/shinyorg/shiny | License: MIT | Copyright 2026 Allan Ritchie
// Provided via justclaw.it.com; keep this notice with the code.
namespace Shiny.Printers.Blazor;


/// <summary>A GATT service/characteristic pair to probe when connecting over Web Bluetooth.</summary>
/// <param name="Name">Friendly profile name, surfaced as <see cref="BrowserPrinterConnection.Detail"/>.</param>
/// <param name="ServiceUuid">GATT service UUID that exposes the print characteristic (full 128-bit, lowercase).</param>
/// <param name="WriteCharacteristicUuid">
/// GATT characteristic the print stream is written to. When null the first writable characteristic on
/// the service is used.
/// </param>
public sealed record WebBluetoothProfile(string Name, string ServiceUuid, string? WriteC

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key