From fdb00de2117e847975f218aacdda458d6330406a Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 31 Aug 2025 20:11:29 +0200 Subject: [PATCH] Add AT command manual v1.1.1 specifications - Add complete AT command reference with all 22 supported commands - Document unlimited anchor support and multi-zone positioning capabilities - Include key hardware specifications and default configuration values - Update UWBHelper library description with latest firmware features - Add power management and performance optimization guidelines --- CLAUDE.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 146a7b5..04b5ef7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -60,11 +60,12 @@ Tags: Range to anchors � Collect coordinates � USB to PC � Real-time + log - Shared: UWBHelper library for AT commands, unified communication and display handling **2. UWBHelper Library Structure** -- **Complete AT Command Implementation**: All 21 commands from AT manual -- **Device Role Configuration**: `configureDevice(id, isAnchor)` sets anchor/tag mode +- **Complete AT Command Implementation**: All 22 commands from AT manual v1.1.1 (2025/07/29) +- **Device Role Configuration**: `configureDevice(id, isAnchor)` sets anchor/tag mode with unlimited anchors support - **Advanced Data Structures**: RangeResult, AnchorPosition, DeviceData for multi-device tracking - **Position Calculation**: PositionCalculator class with trilateration algorithms - **Data Filtering**: DistanceFilter for noise reduction +- **Multi-zone Positioning**: Tags auto-detect and select 8 nearest anchors from unlimited deployed anchors **3. Hardware Configuration** - **UWB Communication**: UART2 (pins 17/18) at 115200 baud @@ -98,11 +99,13 @@ Tags: Range to anchors � Collect coordinates � USB to PC � Real-time + log ## Configuration Constants Key values in config.h: -- `MAX_ANCHORS 8`: Tag connects to 8 closest anchors +- `MAX_ANCHORS 8`: Tag connects to 8 closest anchors (from unlimited deployed anchors) - `UWB_TAG_COUNT 64`: Network supports up to 64 tags -- `NETWORK_ID 1234`: UWB network identifier +- `NETWORK_ID 1234`: UWB network identifier (changeable via AT+SETPAN, default: 1111) - `DEVICE_TIMEOUT 5000`: Device inactivity timeout (ms) - `DISPLAY_UPDATE_INTERVAL 500`: OLED refresh rate (ms) +- `ANTENNA_DELAY 16336`: Default antenna calibration value +- `TRANSMISSION_POWER FD`: Default power setting (configurable via AT+SETPOW) ## Development Roadmap Context @@ -126,9 +129,53 @@ This ESP32 firmware implements the hardware foundation for the UWB positioning s - **Range**: Tested up to 100m line-of-sight, 30m through walls - **Network**: No WiFi required, pure UWB communication +## AT Command Reference (v1.1.1) + +Complete list of 22 supported AT commands for MaUWB module configuration: + +### Basic Commands +- `AT?`: Serial port communication test +- `AT+GETVER?`: Get software/hardware version +- `AT+RESTART`: Restart module +- `AT+RESTORE`: Factory reset (clear all configuration) +- `AT+SAVE`: Save configuration to flash (required after changes) + +### Configuration Commands +- `AT+SETCFG=(id,role,rate,filter)`: Set device ID (0-unlimited anchors, 0-63 tags), role (0=tag, 1=anchor), data rate (0=850K, 1=6.8M), range filtering (0=off, 1=on) +- `AT+GETCFG?`: Get current configuration +- `AT+SETANT=(delay)`: Set antenna delay for distance calibration (default: 16336) +- `AT+GETANT?`: Get antenna delay +- `AT+SETCAP=(capacity,slot_time,ext_mode)`: Set tag capacity (max 64), time slot duration, extended packet mode +- `AT+GETCAP?`: Get capacity settings + +### Network Commands +- `AT+SETPAN=(network_id)`: Set network ID for device isolation (default: 1111) +- `AT+GETPAN?`: Get network ID +- `AT+SETPOW=(power)`: Set transmission power (default: FD) +- `AT+GETPOW?`: Get transmission power + +### Operation Commands +- `AT+SETRPT=(auto_report)`: Enable/disable automatic distance reporting (0=off, 1=on) +- `AT+GETRPT?`: Get auto-report status +- `AT+RANGE`: Active distance measurement and reporting +- `AT+SLEEP=(time_ms)`: Put tag in sleep mode (0-65535ms, 65535=forever) +- `AT+DATA=(length,data)`: Send transparent data (up to 32 bytes, requires ext_mode=1) +- `AT+RDATA`: Receive data command +- `AT+SETPAN`: Network differentiation for multi-system environments +- `AT+GETPAN?`: Get network differentiation settings + +### Key Features from Manual +- **Unlimited Anchors**: System supports unlimited anchors with tags auto-selecting 8 nearest +- **Multi-zone Positioning**: Use 6.8Mbps rate with range filtering disabled for optimal performance +- **Data Rates**: 850Kbps and 6.8Mbps modes supported +- **Refresh Rate**: Configurable up to 100Hz (capacity × slot_time relationship) +- **Power Management**: Tag deep sleep current 35uA, working current 34mA +- **Distance Accuracy**: <10cm ranging precision with proper calibration + ## Important Notes - **No Sleep/OTA**: Removed for simplicity, focus on core positioning -- **AT Command Protocol**: Direct UART communication with UWB module +- **AT Command Protocol**: Direct UART communication with UWB module (115200 baud) - **Position Calculation**: Client-side (PC) processing, not on-device -- **Data Logging**: Raw distance data + anchor coordinates for offline analysis \ No newline at end of file +- **Data Logging**: Raw distance data + anchor coordinates for offline analysis +- **Multi-zone Support**: Firmware v1.1.3+ supports unlimited anchors with automatic selection \ No newline at end of file