Skip to content

Core Library Functions

The Hublink library provides several key functions for managing BLE communication and file transfer:

Manages BLE advertising and connection cycles. Returns true if a connection was established.

  • temporaryConnectFor: Optional duration in seconds to override the default advertising period
  • Returns: boolean indicating if connection was successful

Puts the ESP32 into light sleep mode for the specified duration to conserve battery.

Sets the battery level for the node characteristic. Range 0-255 (0 indicates not set).

Sets an alert message that will be synced to the cloud. The user must persist the alert in their sketch—it is automatically cleared after the hublink.sync() completes. Alerts can also be cleared in the dashboard by a user.