sendText

fun sendText(text: String, channel: ChannelIndex = ChannelIndex(0), to: NodeId = NodeId.BROADCAST): MessageHandle(source)

Convenience: send a text message.

Wraps the text in a MeshPacket with decoded.portnum = TEXT_MESSAGE_APP and decoded.payload = text.encodeToByteArray(), then calls send.

Return

a handle tracking delivery state

Parameters

text

the message text (UTF-8 encoded)

channel

the channel index (default: 0)

to

the destination NodeId (default: NodeId.BROADCAST)

Throws

if not currently connected

if the encoded text exceeds the device limit