ble

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ble provides a channel.Notifier that sends short status messages to a JCODE-* BLE IoT device using the Nordic UART Service (NUS).

The notifier auto-discovers nearby JCODE-* devices on first use and reconnects on failure. All sends are best-effort and non-blocking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier implements channel.Notifier for BLE IoT devices.

func New

func New() *Notifier

New creates a BLE notifier. It does NOT block — device discovery happens lazily on the first Notify call (in a background goroutine).

func (*Notifier) Available

func (n *Notifier) Available() bool

func (*Notifier) Close

func (n *Notifier) Close()

func (*Notifier) Name

func (n *Notifier) Name() string

func (*Notifier) Notify

func (n *Notifier) Notify(event channel.NotifyEvent)

Notify sends a command to the BLE device based on the event type. If the device is not connected yet, a background connection is triggered.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL