### Full ESP-IDF and XPowersLib Build Process Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/examples/ESP_IDF_Example/README.md This snippet provides a complete sequence of bash commands to set up the ESP-IDF development environment from scratch, clone the XPowersLib, install necessary tools, export environment variables, navigate to the example project, configure, build, flash, and monitor the project on an ESP32 device. ```bash mkdir -p ~/esp cd ~/esp git clone --recursive https://github.com/espressif/esp-idf.git git clone https://github.com/lewisxhe/XPowersLib.git cd esp-idf ./install.sh . ./export.sh cd .. cd XPowersLib/examples/ESP_IDF_Example idf.py menuconfig idf.py build idf.py -b 921600 flash idf.py monitor ``` -------------------------------- ### PubSubClient Arduino Test Case Conventions Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/tests/README.md This outlines the conventions for creating test cases for the Arduino test suite. Test cases must subclass `unittest.TestCase`, provide `setUpClass` and `tearDownClass` methods, and have test methods prefixed with `test_`. The `setUpClass` method is called before sketch upload for test setup. ```APIDOC Test Case Conventions: - Sub-class: unittest.TestCase - Class Methods: - setUpClass(): Called before uploading the sketch for test setup. - tearDownClass(): (TODO: make optional) - Test Method Naming: All names must begin with 'test_' ``` -------------------------------- ### View PMU Configuration Output Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/examples/ESP_IDF_Example/README.md This snippet displays the console output from an ESP-IDF project using XPowersLib, showing the initialization status and the configured voltage and enable/disable states for various DCDC, ALDO, and BLDO power management unit (PMU) components. ```text I (345) mian: I2C initialized successfully I (355) AXP2101: Init PMU SUCCESS! I (385) AXP2101: DCDC======================================================================= I (385) AXP2101: DC1 :ENABLE Voltage:3300 mV I (385) AXP2101: DC2 :DISABLE Voltage:900 mV I (395) AXP2101: DC3 :ENABLE Voltage:3300 mV I (395) AXP2101: DC4 :DISABLE Voltage:1100 mV I (405) AXP2101: DC5 :DISABLE Voltage:1200 mV I (405) AXP2101: ALDO======================================================================= I (415) AXP2101: ALDO1:ENABLE Voltage:1800 mV I (425) AXP2101: ALDO2:ENABLE Voltage:2800 mV I (425) AXP2101: ALDO3:ENABLE Voltage:3300 mV I (435) AXP2101: ALDO4:ENABLE Voltage:3000 mV I (435) AXP2101: BLDO======================================================================= I (445) AXP2101: BLDO1:ENABLE Voltage:3300 mV ``` -------------------------------- ### TinyGSM Library API Reference Overview Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md This section provides an overview of the TinyGSM library's API. It highlights that the library implements the standard Arduino Client interface for GPRS data streams, ensuring compatibility with existing Arduino network examples. For a comprehensive list of additional functions and their usage, users are directed to a specific example sketch provided within the library. ```APIDOC TinyGSM Library API Overview: - Provides standard Arduino Client interface for GPRS data streams. - For additional functions, refer to the 'AllFunctions/AllFunctions.ino' example sketch. ``` -------------------------------- ### Formatting HTTP Requests Manually for TCP Clients Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md This snippet illustrates the correct way to format HTTP GET requests when manually constructing them using a TCP client library. It highlights the importance of enclosing entire headers in single print statements to prevent character-by-character transmission and ensures proper line endings for HTTP compliance. ```cpp // Use this format for HTTP header lines: client.print(String("GET ") + resource + " HTTP/1.1\r\n"); // Instead of this (which can cause typewriter-style transmission): client.print("GET "); client.print(resource); client.println(" HTTP/1.1") ``` -------------------------------- ### Verify SIM7080G Firmware Version via AT Command Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/docs/sim7080_update_firmware.md This command is used in a serial terminal (e.g., Arduino IDE's serial monitor) to query and display the current firmware version of the SIM7080G module. It helps confirm successful firmware updates and module functionality by showing the installed firmware version. ```AT Command AT+CGMR ``` -------------------------------- ### Serialize JSON with ArduinoJson in C++ Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoJson-5/README.md This snippet shows how to create a JSON document programmatically using StaticJsonBuffer and JsonObject to add fields and a nested array, then print it to Serial in C++. ```c++ StaticJsonBuffer<200> jsonBuffer; JsonObject& root = jsonBuffer.createObject(); root["sensor"] = "gps"; root["time"] = 1351824120; JsonArray& data = root.createNestedArray("data"); data.add(48.756080); data.add(2.302038); root.printTo(Serial); // This prints: // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]} ``` -------------------------------- ### Deserialize JSON with ArduinoJson in C++ Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoJson-5/README.md This snippet demonstrates how to parse a JSON string into a JsonObject using StaticJsonBuffer and extract values for sensor, time, and data (latitude/longitude) in C++. ```c++ char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}"; StaticJsonBuffer<200> jsonBuffer; JsonObject& root = jsonBuffer.parseObject(json); const char* sensor = root["sensor"]; long time = root["time"]; double latitude = root["data"][0]; double longitude = root["data"][1]; ``` -------------------------------- ### Power Management API Methods for LilyGo T-SIM7080G Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/keywords.txt Provides a comprehensive list of API methods for controlling and monitoring power management features on the LilyGo T-SIM7080G. This includes functions for enabling/disabling voltage regulators (LDOs/SLDOs), setting and getting voltage levels, managing battery charging parameters, reading various sensor measurements (temperature, voltage), and checking interrupt statuses. ```APIDOC setALDO3Voltage getALDO3Voltage isEnableALDO4 enableALDO4 disableALDO4 setALDO4Voltage getALDO4Voltage isEnableBLDO1 enableBLDO1 disableBLDO1 setBLDO1Voltage getBLDO1Voltage isEnableBLDO2 enableBLDO2 disableBLDO2 setBLDO2Voltage getBLDO2Voltage isEnableCPUSLDO enableCPUSLDO disableCPUSLDO setCPUSLDOVoltage getCPUSLDOVoltage isEnableDLDO1 enableDLDO1 disableDLDO1 setDLDO1Voltage getDLDO1Voltage isEnableDLDO2 enableDLDO2 disableDLDO2 setDLDO2Voltage getDLDO2Voltage setIrqLevelTime getIrqLevelTime setPowerKeyPressOffTime getPowerKeyPressOffTime setPowerKeyPressOnTime getPowerKeyPressOnTime enableGeneralAdcChannel disableGeneralAdcChannel enableTemperatureMeasure disableTemperatureMeasure getTemperature enableSystemVoltageMeasure disableSystemVoltageMeasure getSystemVoltage enableVbusVoltageMeasure disableVbusVoltageMeasure getVbusVoltage enableTSPinMeasure disableTSPinMeasure enableTSPinLowFreqSample disableTSPinLowFreqSample getTsTemperature enableBattVoltageMeasure disableBattVoltageMeasure enableBattDetection disableBattDetection getBattVoltage getBatteryPercent setChargingLedMode getChargingLedMode setButtonBatteryChargeVoltage setPrechargeCurr getPrechargeCurr setChargerConstantCurr getChargerConstantCurr setChargerTerminationCurr getChargerTerminationCurr enableChargerTerminationLimit disableChargerTerminationLimit isChargerTerminationLimit setChargeTargetVoltage getChargeTargetVoltage setThermaThreshold getThermaThreshold getBatteryParameter isDropWarningLevel2Irq isDropWarningLevel1Irq isGaugeWdtTimeoutIrq isBatChargerOverTemperatureIrq isBatChargerUnderTemperatureIrq isBatWorkOverTemperatureIrq isBatWorkUnderTemperatureIrq isPekeyNegativeIrq isPekeyPositiveIrq isLdoOverCurrentIrq isBatfetOverCurrentIrq isBatDieOverTemperatureIrq isChagerOverTimeoutIrq isBatOverVoltageIrq ``` -------------------------------- ### Build and Run Local PubSubClient Tests Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/tests/README.md This section describes how to build and run the local regression tests for the `PubSubClient` library. It involves using a `Makefile` to compile executables, which are then run from the `./bin/` directory. These tests do not require a physical Arduino. ```Shell $ make # To run individual tests, execute them from the ./bin/ directory, e.g.: # $ ./bin/connect_spec ``` -------------------------------- ### Run Arduino PubSubClient Test Suite Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/tests/README.md This section explains how to execute the Arduino-based test suite. It assumes an MQTT server is already running and uses a Python script to manage the compilation, upload, and execution of Arduino sketches. A suitable Arduino board must be plugged in for full functionality. ```Python $ python testsuite.py ``` -------------------------------- ### BIGIOT Platform Library Methods and Functions Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoBIGIOT/keywords.txt Enumerates the available methods and functions in the BIGIOT Platform Library. These are categorized as KEYWORD2 for syntax highlighting, representing callable operations or actions that can be performed using the library. ```BIGIOT Syntax Definition login KEYWORD2 connectAttack KEYWORD2 disconnectAttack KEYWORD2 eventAttach KEYWORD2 handle KEYWORD2 upload KEYWORD2 loaction KEYWORD2 sendAlarm KEYWORD2 isOnline KEYWORD2 deviceName KEYWORD2 setHeartFreq KEYWORD2 setEmailHost KEYWORD2 setSender KEYWORD2 setRecipient KEYWORD2 sendEmail KEYWORD2 setSCKEY KEYWORD2 sendWechat KEYWORD2 uploadPhoto KEYWORD2 ``` -------------------------------- ### TinyGSM Library General Code Flow for Module Control Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md This snippet outlines the typical sequence of operations when developing with the TinyGSM library. It covers defining the modem, including necessary headers, instantiating modem and client objects, managing serial communication, initializing the modem, handling SIM unlock, connecting to WiFi or cellular networks (GPRS/EPS), and establishing TCP/SSL client connections for data transmission. It highlights various methods for single and multiple client connections, and notes on network registration and GPRS connection specifics. ```C++ // Define the module (choose one) #define TINY_GSM_MODEM_SIM800 // Include TinyGSM #include // Create a TinyGSM modem instance TinyGsm modem(SerialAT); // Create TinyGSM client instances // For a single connection: TinyGsmClient client(modem); // or TinyGsmClientSecure client(modem); // (on supported modules) // For multiple connections (on supported modules): TinyGsmClient clientX(modem, 0); TinyGsmClient clientY(modem, 1); // or TinyGsmClientSecure clientX(modem, 0); TinyGsmClientSecure clientY(modem, 1); // Initialize the modem modem.init(); // or modem.restart(); // Unlock SIM (if necessary) modem.simUnlock(GSM_PIN); // If using WiFi, specify SSID information modem.networkConnect(wifiSSID, wifiPass); // Wait for network registration to be successful modem.waitForNetwork(600000L); // If using cellular, establish GPRS or EPS data connection modem.gprsConnect(apn, gprsUser, gprsPass); // or simply modem.gprsConnect(apn); // Connect the TCP or SSL client client.connect(server, port); ``` -------------------------------- ### Basic CMakeLists.txt Boilerplate for ESP-IDF Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/examples/ESP_IDF_Example/CMakeLists.txt This snippet provides the fundamental boilerplate lines required at the beginning of a `CMakeLists.txt` file for an ESP-IDF project. It ensures CMake compatibility, specifies additional component directories like `XPowersLib`, integrates standard ESP-IDF project utilities, and sets the project name. ```CMake cmake_minimum_required(VERSION 3.5) set(EXTRA_COMPONENT_DIRS ../../../XPowersLib) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(XPowersLib_Example) ``` -------------------------------- ### PubSubClient API Elements Reference Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/keywords.txt Provides a structured reference to the core API elements of the PubSubClient library, including its main datatype, available methods, and functions for MQTT client operations, as well as any defined constants. ```APIDOC PubSubClient API: Datatypes: PubSubClient Methods and Functions: connect() disconnect() publish() publish_P() beginPublish() endPublish() write() subscribe() unsubscribe() loop() connected() setServer() setCallback() setClient() setStream() Constants: (No constants listed) ``` -------------------------------- ### BIGIOT Platform Library Constants Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoBIGIOT/keywords.txt Defines the constants used throughout the BIGIOT Platform Library. These fixed values are marked as LITERAL1 for syntax highlighting, providing predefined options or states within the library's functionality. ```BIGIOT Syntax Definition DISCONNECT LITERAL1 INVALD LITERAL1 STOP LITERAL1 PLAY LITERAL1 OFFON LITERAL1 MINUS LITERAL1 UP LITERAL1 PLUS LITERAL1 LEFT LITERAL1 PAUSE LITERAL1 RIGHT LITERAL1 BACKWARD LITERAL1 DOWN LITERAL1 FPRWARD LITERAL1 CUSTOM LITERAL1 ``` -------------------------------- ### Configure PubSubClient Arduino Test Settings Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/tests/README.md This describes how to configure the test environment using `testcases/settings.py`. It specifies the `server_ip` and `arduino_ip` variables, which are automatically substituted into Arduino sketches during compilation based on specific line prefixes. ```APIDOC Settings File: testcases/settings.py - server_ip: The IP address of the broker the client should connect to (broker port 1883 assumed). - arduino_ip: The IP address the Arduino should use (when not testing DHCP). Substitution Logic: - Values are automatically substituted into sketch lines starting with: - byte server[] = { - byte ip[] = { ``` -------------------------------- ### Enable AT Command Dumping for Diagnostics Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md To copy the entire AT command sequence exchanged with the module to the main serial port, define `DUMP_AT_COMMANDS`. This provides detailed insight into communication for advanced debugging. ```C++ #define DUMP_AT_COMMANDS ``` -------------------------------- ### Registering ESP-IDF Component Source Files and Includes Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/examples/ESP_IDF_Example/main/CMakeLists.txt This snippet demonstrates the use of the `idf_component_register` CMake function to define an ESP-IDF component. It lists the C++ source files (`SRCS`) that belong to the component and specifies the include directories (`INCLUDE_DIRS`) required for compilation. This configuration is typically placed in the `CMakeLists.txt` file within the component's directory. ```CMake idf_component_register(SRCS "main.cpp" "port_axp192.cpp" "port_axp2101.cpp" "port_i2c.cpp" INCLUDE_DIRS ".") ``` -------------------------------- ### MQTT 3.1.1 Support and API Enhancements in v2.0 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 2.0 introduces MQTT 3.1.1 support, fixes PROGMEM handling, adds overloaded constructors, chainable setters, and a state function for connection return codes. ```APIDOC Version 2.0 Changes: - Add (and default to) MQTT 3.1.1 support - Fix PROGMEM handling for Intel Galileo/ESP8266 - Add overloaded constructors for convenience - Add chainable setters for server/callback/client/stream - Add state function to return connack return code ``` -------------------------------- ### TinyGsm Module Methods and Functions Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/keywords.txt Details key methods and functions for controlling and querying the GSM module, including initialization, network management, GPRS connectivity, and status checks. ```APIDOC Methods and Functions: begin() restart() waitForNetwork() getSimStatus() gprsConnect() gprsDisconnect() isGprsConnected() isNetworkConnected() factoryReset() ``` -------------------------------- ### Integrate StreamDebugger for AT Command Logging Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md This C++ snippet demonstrates how to conditionally integrate `StreamDebugger` into your custom code. When `DUMP_AT_COMMANDS` is defined, `StreamDebugger` is used to log AT commands; otherwise, the standard `TinyGsm` initialization is used. ```C++ #ifdef DUMP_AT_COMMANDS #include StreamDebugger debugger(SerialAT, SerialMon); TinyGsm modem(debugger); #else TinyGsm modem(SerialAT); #endif ``` -------------------------------- ### BIGIOT Platform Library Datatypes Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoBIGIOT/keywords.txt Lists the core data types defined within the BIGIOT Platform Library. These are identified as KEYWORD1 for syntax highlighting purposes, indicating fundamental data structures or object types used in the library's API. ```BIGIOT Syntax Definition BIGIOT KEYWORD1 xEamil KEYWORD1 ServerChan KEYWORD1 ``` -------------------------------- ### ArduinoJson Library Types and Methods Reference Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/ArduinoJson-5/keywords.txt Provides a quick reference for the main data types and common methods used in the ArduinoJson library for efficient JSON manipulation. ```APIDOC Types (KEYWORD1): - JsonArray - JsonObject - JsonVariant - StaticJsonBuffer - DynamicJsonBuffer Methods (KEYWORD2): - add - createArray - createNestedArray - createNestedObject - createObject - parseArray - parseObject - prettyPrintTo - printTo - success ``` -------------------------------- ### API Changes and New Features in v1.9 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.9 includes significant API changes requiring a Client instance for constructors, adds username/password support, and introduces `publish_P` for PROGMEM messages. ```APIDOC Version 1.9 Changes: - Do not split MQTT packets over multiple calls to _client->write() - API change: All constructors now require an instance of Client to be passed in. - Fixed example to match 1.8 api changes - Added username/password support - Added publish_P - publishes messages from PROGMEM ``` -------------------------------- ### Initial Release Limitations in v1.0 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.0, the initial release, outlines key limitations including QOS 0 support only, a maximum message size of 128 bytes, a fixed keepalive interval, and no support for Will messages. ```APIDOC Version 1.0 Limitations: - Only Quality of Service (QOS) 0 messaging is supported - The maximum message size, including header, is 128 bytes - The keepalive interval is set to 30 seconds - No support for Will messages ``` -------------------------------- ### Default Constructor and Compile Fix in v1.5 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.5 adds a default constructor and fixes a compile error with newer Arduino versions. ```APIDOC Version 1.5 Changes: - Added default constructor - Fixed compile error when used with arduino-0021 or later ``` -------------------------------- ### TinyGsm Date/Time Literals Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/keywords.txt Defines literal constants used for specifying different date and time formats within the TinyGsm context. ```APIDOC Literals: DATE_FULL DATE_TIME DATE_DATE ``` -------------------------------- ### Set Fixed Baud Rate for TinyGSM Module Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md After establishing initial communication with the module, it is recommended to set a fixed baud rate using this function for production code. Avoid using auto-bauding features in stable deployments. ```C++ setBaud(#) ``` -------------------------------- ### Connection Lost Handling Fix in v1.4 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.4 addresses and fixes issues related to handling lost connections. ```APIDOC Version 1.4 Changes: - Fixed connection lost handling ``` -------------------------------- ### AXP2102 Power Management IC API Reference Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/keywords.txt Comprehensive list of API methods available for interacting with the AXP2102 PMIC. These methods allow for detailed control and monitoring of power states, battery charging, temperature thresholds, voltage regulation, and system wake-up/shutdown sequences. ```APIDOC AXP2102 API Methods: isBatInActiveModeState() getThermalRegulationStatus() getCurrnetLimitStatus() isStandby() isPowerOn() isPowerOff() getChargerStatus() enableInternalDischarge() disableInternalDischarge() enablePwrOkPinPullLow() disablePwrOkPinPullLow() enablePwronShutPMIC() disablePwronShutPMIC() resetPmuSocSystem() softPowerOff() setBatfetDieOverTempLevel1() getBatfetDieOverTempLevel1() enableBatfetDieOverTempDetect() disableBatfetDieOverTempDetect() setDieOverTempLevel1() getDieOverTempLevel1() enableDieOverTempDetect() disableDieOverTempDetect() getVbusVoltageLimit() getVinCurrentLimit() resetGauge() resetGaugeBesides() enableGauge() disableGauge() enableButtonBatteryCharge() disableButtonBatteryCharge() enableCellbatteryCharge() disableCellbatteryCharge() enableWatchdog() disableWatchdog() setWatchdogConfig() getWatchConfig() clrWatchdog() setWatchdogTimeout() getWatchdogTimerout() setLowBatWarnThreshold() getLowBatWarnThreshold() setLowBatShutdownThreshold() getLowBatShutdownThreshold() enablePoweronAlwaysHighSource() disablePoweronAlwaysHighSource() enableBattInsertOnSource() disableBattInsertOnSource() enableBattNormalOnSource() disableBattNormalOnSource() enableVbusInsertOnSource() disableVbusInsertOnSource() enableIrqLowOnSource() disableIrqLowOnSource() enablePwronLowOnSource() disablePwronLowOnSource() enableOverTemperatureOffSource() disableOverTemperatureOffSource() enableDcOverVoltageOffSource() disableDcOverVoltageOffSource() enableDcUnderVoltageOffSource() disableDcUnderVoltageOffSource() enableVbusOverVoltageOffSource() disableVbusOverVoltageOffSource() enableVsysUnderVoltageOffSource() disableVsysUnderVoltageOffSource() enablePwronAlwaysLowOffSource() disablePwronAlwaysLowOffSource() enableSwConfigOffSource() disableSwConfigOffSource() enablePwrSourcePullDown() disablePwrSourcePullDown() enableOverTemperatureLevel2PowerOff() disableOverTemperaturePowerOff() enableLongPressShutdown() disableLongPressShutdown() setLongPressRestart() setLongPressPowerOFF() enableDCHighVoltageTurnOff() disableDCHighVoltageTurnOff() enableDC5LowVoltageTurnOff() disableDC5LowVoltageTurnOff() enableDC4LowVoltageTurnOff() disableDC4LowVoltageTurnOff() enableDC3LowVoltageTurnOff() disableDC3LowVoltageTurnOff() enableDC2LowVoltageTurnOff() disableDC2LowVoltageTurnOff() enableDC1LowVoltageTurnOff() disableDC1LowVoltageTurnOff() setVsysPowerOffThreshold() getVsysPowerOffThreshold() wakeupControl() enableWakeup() disableWakeup() disableSleep() setIrqLevel() setOffLevel() setOnLevel() setDc4FastStartSequence() setDc3FastStartSequence() setDc2FastStartSequence() setDc1FastStartSequence() setAldo3FastStartSequence() setAldo2FastStartSequence() setAldo1FastStartSequence() setDc5FastStartSequence() setCpuldoFastStartSequence() setBldo2FastStartSequence() setBldo1FastStartSequence() setAldo4FastStartSequence() setDldo2FastStartSequence() setDldo1FastStartSequence() setFastPowerOnLevel() enableFastPowerOn() disableFastPowerOn() enableFastWakeup() disableFastWakeup() setDCHighVoltagePowerDowm() getDCHighVoltagePowerDowmEn() isEnableDC1() enableDC1() disableDC1() getDC1WorkMode() setDC1LowVoltagePowerDowm() getDC1LowVoltagePowerDowmEn() getDC2WorkMode() setDC2LowVoltagePowerDowm() getDC2LowVoltagePowerDowmEn() getDC3WorkMode() setDC3LowVoltagePowerDowm() getDC3LowVoltagePowerDowmEn() isEnableDC4() enableDC4() disableDC4() setDC4Voltage() getDC4Voltage() setDC4LowVoltagePowerDowm() getDC4LowVoltagePowerDowmEn() isEnableDC5() enableDC5() disableDC5() setDC5Voltage() getDC5Voltage() isDC5FreqCompensationEn() enableDC5FreqCompensation() disableFreqCompensation() setDC5LowVoltagePowerDowm() getDC5LowVoltagePowerDowmEn() isEnableALDO1() enableALDO1() disableALDO1() setALDO1Voltage() getALDO1Voltage() isEnableALDO2() enableALDO2() disableALDO2() setALDO2Voltage() getALDO2Voltage() isEnableALDO3() enableALDO3() disableALDO3() ``` -------------------------------- ### AXP192 Power Management Unit Monitoring and Configuration Constants Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/keywords.txt Defines constants for monitoring various parameters of the AXP192 Power Management Unit, such as TS pin, APS voltage, USB/AC current/voltage, battery current/voltage, ADC inputs, and temperature. Also includes constants for boot times and GPIO/TS pin definitions, and charging current limits. ```APIDOC MONITOR_TS_PIN LITERAL1 MONITOR_APS_VOLTAGE LITERAL1 MONITOR_USB_CURRENT LITERAL1 MONITOR_USB_VOLTAGE LITERAL1 MONITOR_AC_CURRENT LITERAL1 MONITOR_AC_VOLTAGE LITERAL1 MONITOR_BAT_CURRENT LITERAL1 MONITOR_BAT_VOLTAGE LITERAL1 MONITOR_ADC_IO3 LITERAL1 MONITOR_ADC_IO2 LITERAL1 MONITOR_ADC_IO1 LITERAL1 MONITOR_ADC_IO0 LITERAL1 MONITOR_TEMPERATURE LITERAL1 XPOWERS_BOOT_TIME_128MS LITERAL1 XPOWERS_BOOT_TIME_512MS LITERAL1 XPOWERS_BOOT_TIME_1S LITERAL1 XPOWERS_BOOT_TIME_2S LITERAL1 PMU_GPIO0 LITERAL1 PMU_GPIO1 LITERAL1 PMU_GPIO2 LITERAL1 PMU_GPIO3 LITERAL1 PMU_GPIO4 LITERAL1 PMU_GPIO5 LITERAL1 PMU_TS_PIN LITERAL1 XPOWERS_CHG_CUR_100MA LITERAL1 XPOWERS_CHG_CUR_190MA LITERAL1 XPOWERS_CHG_CUR_280MA LITERAL1 XPOWERS_CHG_CUR_360MA LITERAL1 XPOWERS_CHG_CUR_450MA LITERAL1 XPOWERS_CHG_CUR_550MA LITERAL1 XPOWERS_CHG_CUR_630MA LITERAL1 ``` -------------------------------- ### API Enhancements and Fixes in v2.7 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 2.7 introduces a large-payload API, improves reliability on ESP platforms, adds a Clean Session flag, and enhances ESP32 callback support, alongside various bug fixes. ```APIDOC Version 2.7 Changes: - Fix remaining-length handling to prevent buffer overrun - Add large-payload API: - beginPublish() - write() - publish() - endPublish() - Add yield call to improve reliability on ESP - Add Clean Session flag to connect options - Add ESP32 support for functional callback signature - Various other fixes ``` -------------------------------- ### Enable TinyGSM Library Debugging Output Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/TinyGSM/README.md To output debugging comments from the TinyGSM library to the serial monitor, define `TINY_GSM_DEBUG` before including the TinyGSM library. This is useful for diagnosing issues when other methods fail. ```C++ #define TINY_GSM_DEBUG SerialMon ``` -------------------------------- ### AXP2102 Power Management Unit Configuration Constants Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/keywords.txt Lists various constants for configuring the AXP2102 Power Management Unit, including interrupt timings, power-off/on durations, charging parameters (precharge, current, termination, voltage), thermal limits, charge LED frequencies, wakeup sources, DCDC/LDO fast enable options, power sequence levels, watchdog timer settings, VBUS voltage/current limits, and VSYS voltage settings. ```APIDOC XPOWERS_IRQ_TIME_1S LITERAL1 XPOWERS_IRQ_TIME_1S5 LITERAL1 XPOWERS_IRQ_TIME_2S LITERAL1 XPOWERS_PRESSOFF_2S5 LITERAL1 XPOWERS_POWEROFF_4S LITERAL1 XPOWERS_POWEROFF_6S LITERAL1 XPOWERS_POWEROFF_8S LITERAL1 XPOWERS_POWEROFF_10S LITERAL1 XPOWERS_POWERON_128MS LITERAL1 XPOWERS_POWERON_512MS LITERAL1 XPOWERS_POWERON_1S LITERAL1 XPOWERS_POWERON_2S LITERAL1 XPOWERS_CHG_LED_FRE_0HZ LITERAL1 XPOWERS_CHG_LED_FRE_1HZ LITERAL1 XPOWERS_CHG_LED_FRE_4HZ LITERAL1 XPOWERS_CHG_LED_DISABLE LITERAL1 XPOWERS_PRECHARGE_0MA LITERAL1 XPOWERS_PRECHARGE_25MA LITERAL1 XPOWERS_PRECHARGE_50MA LITERAL1 XPOWERS_PRECHARGE_75MA LITERAL1 XPOWERS_PRECHARGE_100MA LITERAL1 XPOWERS_PRECHARGE_125MA LITERAL1 XPOWERS_PRECHARGE_150MA LITERAL1 XPOWERS_PRECHARGE_175MA LITERAL1 XPOWERS_PRECHARGE_200MA LITERAL1 XPOWERS_ICC_CHG_0MA LITERAL1 XPOWERS_ICC_CHG_100MA LITERAL1 XPOWERS_ICC_CHG_125MA LITERAL1 XPOWERS_ICC_CHG_150MA LITERAL1 XPOWERS_ICC_CHG_175MA LITERAL1 XPOWERS_ICC_CHG_200MA LITERAL1 XPOWERS_ICC_CHG_300MA LITERAL1 XPOWERS_ICC_CHG_400MA LITERAL1 XPOWERS_ICC_CHG_500MA LITERAL1 XPOWERS_ICC_CHG_600MA LITERAL1 XPOWERS_ICC_CHG_700MA LITERAL1 XPOWERS_ICC_CHG_800MA LITERAL1 XPOWERS_ICC_CHG_900MA LITERAL1 XPOWERS_ICC_CHG_1000MA LITERAL1 XPOWERS_CHG_ITERM_0MA LITERAL1 XPOWERS_CHG_ITERM_25MA LITERAL1 XPOWERS_CHG_ITERM_50MA LITERAL1 XPOWERS_CHG_ITERM_75MA LITERAL1 XPOWERS_CHG_ITERM_100MA LITERAL1 XPOWERS_CHG_ITERM_125MA LITERAL1 XPOWERS_CHG_ITERM_150MA LITERAL1 XPOWERS_CHG_ITERM_175MA LITERAL1 XPOWERS_CHG_ITERM_200MA LITERAL1 XPOWERS_CHG_VOL_4V LITERAL1 XPOWERS_CHG_VOL_4V1 LITERAL1 XPOWERS_CHG_VOL_4V2 LITERAL1 XPOWERS_CHG_VOL_4V35 LITERAL1 XPOWERS_CHG_VOL_4V4 LITERAL1 XPOWERS_THREMAL_60DEG LITERAL1 XPOWERS_THREMAL_80DEG LITERAL1 XPOWERS_THREMAL_100DEG LITERAL1 XPOWERS_THREMAL_120DEG LITERAL1 XPOWERS_CHG_TRI_STATE LITERAL1 XPOWERS_CHG_PRE_STATE LITERAL1 XPOWERS_CHG_CC_STATE LITERAL1 XPOWERS_CHG_CV_STATE LITERAL1 XPOWERS_CHG_DONE_STATE LITERAL1 XPOWERS_CHG_STOP_STATE LITERAL1 XPOWERS_WAKEUP_IRQ_PIN_TO_LOW LITERAL1 XPOWERS_WAKEUP_PWROK_TO_LOW LITERAL1 XPOWERS_WAKEUP_DC_DLO_SELECT LITERAL1 XPOWERS_FAST_DCDC1 LITERAL1 XPOWERS_FAST_DCDC2 LITERAL1 XPOWERS_FAST_DCDC3 LITERAL1 XPOWERS_FAST_DCDC4 LITERAL1 XPOWERS_FAST_DCDC5 LITERAL1 XPOWERS_FAST_ALDO1 LITERAL1 XPOWERS_FAST_ALDO2 LITERAL1 XPOWERS_FAST_ALDO3 LITERAL1 XPOWERS_FAST_ALDO4 LITERAL1 XPOWERS_FAST_BLDO1 LITERAL1 XPOWERS_FAST_BLDO2 LITERAL1 XPOWERS_FAST_CPUSLDO LITERAL1 XPOWERS_FAST_DLDO1 LITERAL1 XPOWERS_FAST_DLDO2 LITERAL1 XPOWERS_SEQUENCE_LEVEL_0 LITERAL1 XPOWERS_SEQUENCE_LEVEL_1 LITERAL1 XPOWERS_SEQUENCE_LEVEL_2 LITERAL1 XPOWERS_SEQUENCE_DISABLE LITERAL1 XPOWERS_WDT_IRQ_TO_PIN LITERAL1 XPOWERS_WDT_IRQ_AND_RSET LITERAL1 XPOWERS_WDT_IRQ_AND_RSET_PD_PWROK LITERAL1 XPOWERS_WDT_IRQ_AND_RSET_ALL_OFF LITERAL1 XPOWERS_WDT_TIMEOUT_1S LITERAL1 XPOWERS_WDT_TIMEOUT_2S LITERAL1 XPOWERS_WDT_TIMEOUT_4S LITERAL1 XPOWERS_WDT_TIMEOUT_8S LITERAL1 XPOWERS_WDT_TIMEOUT_16S LITERAL1 XPOWERS_WDT_TIMEOUT_32S LITERAL1 XPOWERS_WDT_TIMEOUT_64S LITERAL1 XPOWERS_WDT_TIMEOUT_128S LITERAL1 XPOWER_CHGLED_TYPEA LITERAL1 XPOWER_CHGLED_TYPEB LITERAL1 XPOWER_CHGLED_MANUAL LITERAL1 XPOWERS_VBUS_VOL_LIM_3V88 LITERAL1 XPOWERS_VBUS_VOL_LIM_3V96 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V04 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V12 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V20 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V28 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V36 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V44 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V52 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V60 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V68 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V76 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V84 LITERAL1 XPOWERS_VBUS_VOL_LIM_4V92 LITERAL1 XPOWERS_VBUS_VOL_LIM_5V LITERAL1 XPOWERS_VBUS_VOL_LIM_5V08 LITERAL1 XPOWERS_VBUS_CUR_LIM_100MA LITERAL1 XPOWERS_VBUS_CUR_LIM_500MA LITERAL1 XPOWERS_VBUS_CUR_LIM_900MA LITERAL1 XPOWERS_VBUS_CUR_LIM_1000MA LITERAL1 XPOWERS_VBUS_CUR_LIM_1500MA LITERAL1 XPOWERS_VBUS_CUR_LIM_2000MA LITERAL1 XPOWERS_VSYS_VOL_4V1 LITERAL1 XPOWERS_VSYS_VOL_4V2 LITERAL1 XPOWERS_VSYS_VOL_4V3 LITERAL1 XPOWERS_VSYS_VOL_4V4 LITERAL1 XPOWERS_VSYS_VOL_4V5 LITERAL1 XPOWERS_VSYS_VOL_4V6 LITERAL1 XPOWERS_VSYS_VOL_4V7 LITERAL1 XPOWERS_VSYS_VOL_4V8 LITERAL1 ``` -------------------------------- ### Library Size Reduction and Will Messages in v1.1 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.1 reduces the library size, adds support for Will messages, and clarifies licensing. ```APIDOC Version 1.1 Changes: - Reduced size of library - Added support for Will messages - Clarified licensing - see LICENSE.txt ``` -------------------------------- ### Retained Message Publishing in v1.6 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 1.6 adds the capability to publish retained MQTT messages. ```APIDOC Version 1.6 Changes: - Added the ability to publish a retained message ``` -------------------------------- ### XPOWERS and AXP Power Management Configuration Constants Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/XPowersLib/keywords.txt This snippet lists various constants used for configuring XPOWERS and AXP series power management integrated circuits (PMICs). These constants define parameters such as charging current limits, termination current thresholds, power-on/off timings, long-press durations, charging LED behaviors, VBUS voltage/current limits, and backup battery settings. They are typically used in embedded C/C++ projects for hardware control. ```C/C++ XPOWERS_CHG_CUR_700MA XPOWERS_CHG_CUR_780MA XPOWERS_CHG_CUR_880MA XPOWERS_CHG_CUR_960MA XPOWERS_CHG_CUR_1000MA XPOWERS_CHG_CUR_1080MA XPOWERS_CHG_CUR_1160MA XPOWERS_CHG_CUR_1240MA XPOWERS_CHG_CUR_1320MA XPOWERS_CHG_ITERM_LESS_10_PERCENT XPOWERS_CHG_ITERM_LESS_15_PERCENT XPOWERS_ICC_CHG_100MA XPOWERS_ICC_CHG_190MA XPOWERS_ICC_CHG_280MA XPOWERS_ICC_CHG_360MA XPOWERS_ICC_CHG_450MA XPOWERS_ICC_CHG_550MA XPOWERS_ICC_CHG_630MA XPOWERS_ICC_CHG_700MA XPOWERS_ICC_CHG_780MA XPOWERS_ICC_CHG_880MA XPOWERS_ICC_CHG_960MA XPOWERS_ICC_CHG_1000MA XPOWERS_ICC_CHG_1080MA XPOWERS_ICC_CHG_1160MA XPOWERS_ICC_CHG_1240MA XPOWERS_ICC_CHG_1320MA XPOWERS_POWERON_128MS XPOWERS_POWERON_512MS XPOWERS_POWERON_1S XPOWERS_POWERON_2S XPOWERS_LONGPRESS_1000MS XPOWERS_LONGPRESS_1500MS XPOWERS_LONGPRESS_2000MS XPOWERS_LONGPRESS_2500MS XPOWERS_POWEROFF_4S XPOWERS_POWEROFF_65 XPOWERS_POWEROFF_8S XPOWERS_POWEROFF_16S XPOWERS_CHG_LED_DISABLE XPOWERS_CHG_LED_FRE_1HZ XPOWERS_CHG_LED_FRE_4HZ XPOWERS_CHG_LED_LEVEL_LOW XPOWERS_CHG_LED_CTRL_CHG XPOWERS_VBUS_VOL_LIM_4V XPOWERS_VBUS_VOL_LIM_4V1 XPOWERS_VBUS_VOL_LIM_4V2 XPOWERS_VBUS_VOL_LIM_4V3 XPOWERS_VBUS_VOL_LIM_4V4 XPOWERS_VBUS_VOL_LIM_4V5 XPOWERS_VBUS_VOL_LIM_4V6 XPOWERS_VBUS_VOL_LIM_4V7 XPOWERS_VBUS_CUR_LIM_500MA XPOWERS_VBUS_CUR_LIM_100MA XPOWER_CHGLED_CTRL_CHGER XPOWER_CHGLED_CTRL_MANUAL XPOWERS_CHG_VOL_4V1 XPOWERS_CHG_VOL_4V15 XPOWERS_CHG_VOL_4V2 XPOWERS_CHG_VOL_4V36 XPOWERS_CHG_CONS_TIMEOUT_7H XPOWERS_CHG_CONS_TIMEOUT_8H XPOWERS_CHG_CONS_TIMEOUT_9H XPOWERS_CHG_CONS_TIMEOUT_10H XPOWERS_BACKUP_BAT_VOL_3V1 XPOWERS_BACKUP_BAT_VOL_3V XPOWERS_BACKUP_BAT_VOL_3V0 XPOWERS_BACKUP_BAT_VOL_2V5 XPOWERS_BACKUP_BAT_CUR_50UA XPOWERS_BACKUP_BAT_CUR_100UA XPOWERS_BACKUP_BAT_CUR_200UA XPOWERS_BACKUP_BAT_CUR_400UA XPOWERS_DATA_BUFFER_SIZE AXP192_SLAVE_ADDRESS AXP202_SLAVE_ADDRESS AXP2101_SLAVE_ADDRESS ``` -------------------------------- ### Code Layout Update in v2.2 Source: https://github.com/xinyuan-lilygo/lilygo-t-sim7080g/blob/master/lib/pubsubclient/CHANGES.txt Version 2.2 updates the code layout to comply with Arduino Library requirements. ```APIDOC Version 2.2 Changes: - Change code layout to match Arduino Library reqs ```