|
MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
|
Platform-specific initialization and BLE Mesh provisioning for ESP32. This file contains functions to initialize the platform, Bluetooth, and BLE Mesh stack for the MeshX framework. More...
#include "esp_err.h"#include "esp_log.h"#include "nvs_flash.h"#include "driver/uart.h"#include "interface/meshx_platform.h"#include "interface/ble_mesh/server/meshx_ble_mesh_prov_srv.h"Macros | |
| #define | CONFIG_MESHX_CONSOLE_UART_PORT UART_NUM_0 |
| #define | CONFIG_MXSP_UART_PORT UART_NUM_1 |
| #define | CONFIG_MXSP_UART_BAUD 115200 |
| #define | CONFIG_MXSP_UART_TX_PIN 1 |
| #define | CONFIG_MXSP_UART_RX_PIN 3 |
Functions | |
| meshx_err_t | meshx_platform_init (void) |
| Initializes the MeshX platform for the ESP32. | |
| void | meshx_platform_reset (void) |
| Resets the MeshX platform. This function performs a system reset, restarting the platform. | |
| meshx_err_t | meshx_platform_serial_init (void) |
| Initializes the serial interface. | |
| void | meshx_platform_serial_write (const uint8_t *data, uint16_t len) |
| Writes data to the serial interface. | |
| int32_t | meshx_platform_serial_read (uint8_t *data, uint16_t len) |
| Reads data from the serial interface. | |
| meshx_err_t | meshx_platform_console_init (void) |
| Initializes the console interface. | |
| void | meshx_platform_console_write (const char *data, uint16_t len) |
| Writes data to the console interface. | |
| int32_t | meshx_platform_console_read (uint8_t *data, uint16_t len) |
| Reads data from the console interface. | |
Platform-specific initialization and BLE Mesh provisioning for ESP32. This file contains functions to initialize the platform, Bluetooth, and BLE Mesh stack for the MeshX framework.
Copyright (c) 2024 - 2025 MeshX
| #define CONFIG_MESHX_CONSOLE_UART_PORT UART_NUM_0 |
| #define CONFIG_MXSP_UART_BAUD 115200 |
| #define CONFIG_MXSP_UART_PORT UART_NUM_1 |
| #define CONFIG_MXSP_UART_RX_PIN 3 |
| #define CONFIG_MXSP_UART_TX_PIN 1 |
| meshx_err_t meshx_platform_console_init | ( | void | ) |
Initializes the console interface.
| int32_t meshx_platform_console_read | ( | uint8_t * | data, |
| uint16_t | len ) |
Reads data from the console interface.
| [out] | data | Pointer to the data buffer. |
| [in] | len | Length of the data to read. |
| void meshx_platform_console_write | ( | const char * | data, |
| uint16_t | len ) |
Writes data to the console interface.
| [in] | data | Pointer to the data buffer. |
| [in] | len | Length of the data to write. |
| meshx_err_t meshx_platform_init | ( | void | ) |
Initializes the MeshX platform for the ESP32.
Initializes the MeshX platform.
This function sets up the necessary components and configurations required for the MeshX platform to operate on the ESP32. It ensures that the platform is ready for use by other components of the MeshX system.
| void meshx_platform_reset | ( | void | ) |
Resets the MeshX platform. This function performs a system reset, restarting the platform.
| meshx_err_t meshx_platform_serial_init | ( | void | ) |
Initializes the serial interface.
Initializes the serial interface for communication.
This function initializes the serial interface for the MeshX platform. It configures the UART port, sets the baud rate, and enables the UART.
| int32_t meshx_platform_serial_read | ( | uint8_t * | data, |
| uint16_t | len ) |
Reads data from the serial interface.
| [out] | data | Pointer to the data buffer. |
| [in] | len | Length of the data to read. |
| void meshx_platform_serial_write | ( | const uint8_t * | data, |
| uint16_t | len ) |
Writes data to the serial interface.
| [in] | data | Pointer to the data buffer. |
| [in] | len | Length of the data to write. |