From 534be4967c77e66edde3585ca27b7768b6c7b779 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 30 Jun 2024 11:41:40 -0700 Subject: [PATCH] document the new BLE logging characteristic for https://github.com/meshtastic/firmware/issues/4210 --- docs/development/device/client-api.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/development/device/client-api.mdx b/docs/development/device/client-api.mdx index ba85507a..5b58b951 100644 --- a/docs/development/device/client-api.mdx +++ b/docs/development/device/client-api.mdx @@ -78,6 +78,15 @@ read,notify,write fromnum - the current packet # in the message waiting inside fromradio, if the phone sees this notify it should read messages until it catches up with this number. +6c6fd238-78fa-436b-aacf-15c5be1ef2e3 +notify +A log message as LogRecord protobuf. Clients are encouraged to listen for this notification and give the option of logging these +debug messages. + +6c6fd238-78fa-436b-aacf-15c5be1ef2e2 +notify +A raw log message as a string (with a newline). This characteristic is DEPRECATED and shouldn't be used on new client code. + The phone can write to this register to go backwards up to FIXME packets, to handle the rare case of a fromradio packet was dropped after the ESP32 callback was called, but before it arrives at the phone. If the phone writes to this register the ESP32 will discard older packets and put the next packet >= fromnum in fromradio. When the ESP32 advances fromnum, it will delay doing the notify by 100ms, in the hopes that the notify will never actually need to be sent if the phone is already pulling from fromradio.