diff --git a/AGENTS.md b/AGENTS.md index 5754ffe..8394f35 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -463,7 +463,7 @@ mc.subscribe(EventType.ACK, handler) |----------|---------|-------------| | `MESHCORE_SERIAL_PORT` | auto-detect | Serial port for radio | | `MESHCORE_TCP_HOST` | *(none)* | TCP host for radio (mutually exclusive with serial/BLE) | -| `MESHCORE_TCP_PORT` | `4000` | TCP port (used with `MESHCORE_TCP_HOST`) | +| `MESHCORE_TCP_PORT` | `5000` | TCP port (used with `MESHCORE_TCP_HOST`) | | `MESHCORE_BLE_ADDRESS` | *(none)* | BLE device address (mutually exclusive with serial/TCP) | | `MESHCORE_BLE_PIN` | *(required with BLE)* | BLE PIN code | | `MESHCORE_SERIAL_BAUDRATE` | `115200` | Serial baud rate | diff --git a/README.md b/README.md index ccd51a4..97e411e 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ Only one transport may be active at a time. If multiple are set, the server will | `MESHCORE_SERIAL_PORT` | (auto-detect) | Serial port path | | `MESHCORE_SERIAL_BAUDRATE` | 115200 | Serial baud rate | | `MESHCORE_TCP_HOST` | | TCP host (mutually exclusive with serial/BLE) | -| `MESHCORE_TCP_PORT` | 4000 | TCP port | +| `MESHCORE_TCP_PORT` | 5000 | TCP port | | `MESHCORE_BLE_ADDRESS` | | BLE device address (mutually exclusive with serial/TCP) | | `MESHCORE_BLE_PIN` | | BLE PIN (required when BLE address is set) | | `MESHCORE_LOG_LEVEL` | INFO | `DEBUG`, `INFO`, `WARNING`, `ERROR` | @@ -193,7 +193,7 @@ Common launch patterns: MESHCORE_SERIAL_PORT=/dev/ttyUSB0 uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 # TCP -MESHCORE_TCP_HOST=192.168.1.100 MESHCORE_TCP_PORT=4000 uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 +MESHCORE_TCP_HOST=192.168.1.100 MESHCORE_TCP_PORT=5000 uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 # BLE MESHCORE_BLE_ADDRESS=AA:BB:CC:DD:EE:FF MESHCORE_BLE_PIN=123456 uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 diff --git a/app/config.py b/app/config.py index 6bc5e0d..36ed5a1 100644 --- a/app/config.py +++ b/app/config.py @@ -14,7 +14,7 @@ class Settings(BaseSettings): serial_port: str = "" # Empty string triggers auto-detection serial_baudrate: int = 115200 tcp_host: str = "" - tcp_port: int = 4000 + tcp_port: int = 5000 ble_address: str = "" ble_pin: str = "" log_level: Literal["DEBUG", "INFO", "WARNING", "ERROR"] = "INFO" diff --git a/tests/test_config.py b/tests/test_config.py index a917cd4..a893483 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -33,7 +33,7 @@ class TestTransportExclusivity: def test_tcp_default_port(self): s = Settings(tcp_host="192.168.1.1") - assert s.tcp_port == 4000 + assert s.tcp_port == 5000 def test_ble_only(self): s = Settings(ble_address="AA:BB:CC:DD:EE:FF", ble_pin="123456")